Skip to content

Commit

Permalink
don't use x/compute for now
Browse files Browse the repository at this point in the history
  • Loading branch information
assafmo committed Apr 8, 2020
1 parent 3f18794 commit 1615567
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
44 changes: 20 additions & 24 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ import (
"encoding/json"
"io"
"os"
"path/filepath"

"github.com/enigmampc/EnigmaBlockchain/x/compute"
"github.com/spf13/viper"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
tmtypes "github.com/tendermint/tendermint/types"
Expand Down Expand Up @@ -60,7 +56,7 @@ var (
distr.AppModuleBasic{},
gov.NewAppModuleBasic(paramsclient.ProposalHandler, distr.ProposalHandler, upgradeclient.ProposalHandler),
params.AppModuleBasic{},
compute.AppModuleBasic{},
// compute.AppModuleBasic{},
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
supply.AppModuleBasic{},
Expand Down Expand Up @@ -120,7 +116,7 @@ type EnigmaChainApp struct {
paramsKeeper params.Keeper
upgradeKeeper upgrade.Keeper
evidenceKeeper evidence.Keeper
computeKeeper compute.Keeper
// computeKeeper compute.Keeper

// the module manager
mm *module.Manager
Expand All @@ -131,9 +127,9 @@ type EnigmaChainApp struct {

// WasmWrapper allows us to use namespacing in the config file
// This is only used for parsing in the app, x/compute expects WasmConfig
type WasmWrapper struct {
Wasm compute.WasmConfig `mapstructure:"wasm"`
}
// type WasmWrapper struct {
// Wasm compute.WasmConfig `mapstructure:"wasm"`
// }

// NewEnigmaChainApp is a constructor function for enigmaChainApp
func NewEnigmaChainApp(
Expand Down Expand Up @@ -165,7 +161,7 @@ func NewEnigmaChainApp(
params.StoreKey,
upgrade.StoreKey,
evidence.StoreKey,
compute.StoreKey,
// compute.StoreKey,
)

tKeys := sdk.NewTransientStoreKeys(staking.TStoreKey, params.TStoreKey)
Expand Down Expand Up @@ -260,20 +256,20 @@ func NewEnigmaChainApp(

app.evidenceKeeper = *evidenceKeeper

// just re-use the full router - do we want to limit this more?
var computeRouter = bApp.Router()
// better way to get this dir???
homeDir := viper.GetString(cli.HomeFlag)
computeDir := filepath.Join(homeDir, ".compute")
// // just re-use the full router - do we want to limit this more?
// var computeRouter = bApp.Router()
// // better way to get this dir???
// homeDir := viper.GetString(cli.HomeFlag)
// computeDir := filepath.Join(homeDir, ".compute")

wasmWrap := WasmWrapper{Wasm: compute.DefaultWasmConfig()}
err := viper.Unmarshal(&wasmWrap)
if err != nil {
panic("error while reading wasm config: " + err.Error())
}
wasmConfig := wasmWrap.Wasm
// wasmWrap := WasmWrapper{Wasm: compute.DefaultWasmConfig()}
// err := viper.Unmarshal(&wasmWrap)
// if err != nil {
// panic("error while reading wasm config: " + err.Error())
// }
// wasmConfig := wasmWrap.Wasm

app.computeKeeper = compute.NewKeeper(app.cdc, keys[compute.StoreKey], app.accountKeeper, app.bankKeeper, computeRouter, computeDir, wasmConfig)
// app.computeKeeper = compute.NewKeeper(app.cdc, keys[compute.StoreKey], app.accountKeeper, app.bankKeeper, computeRouter, computeDir, wasmConfig)

// register the proposal types
govRouter := gov.NewRouter()
Expand Down Expand Up @@ -309,7 +305,7 @@ func NewEnigmaChainApp(
staking.NewAppModule(app.stakingKeeper, app.accountKeeper, app.supplyKeeper),
upgrade.NewAppModule(app.upgradeKeeper),
evidence.NewAppModule(app.evidenceKeeper),
compute.NewAppModule(app.computeKeeper),
// compute.NewAppModule(app.computeKeeper),
)
// During begin block slashing happens after distr.BeginBlocker so that
// there is nothing left over in the validator fee pool, so as to keep the
Expand All @@ -333,7 +329,7 @@ func NewEnigmaChainApp(
crisis.ModuleName,
genutil.ModuleName,
evidence.ModuleName,
compute.ModuleName,
// compute.ModuleName,
)

// register all module routes and module queriers
Expand Down
1 change: 1 addition & 0 deletions cosmwasm/lib/incubator-teaclave-sgx-sdk
Submodule incubator-teaclave-sgx-sdk added at 5cef8f

0 comments on commit 1615567

Please sign in to comment.