Skip to content

Commit

Permalink
Merge remote-tracking branch 'enigmampc/master' into devenv
Browse files Browse the repository at this point in the history
  • Loading branch information
Cashmaney committed Jul 19, 2022
2 parents b3298bd + c6d3e91 commit 7a50ad0
Show file tree
Hide file tree
Showing 94 changed files with 537 additions and 510 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.17" # The Go version to download (if necessary) and use.
go-version: "^1.18" # The Go version to download (if necessary) and use.
- name: Install Intel's SGX SDK
run: |
mkdir -p "$HOME/.sgxsdk"
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.17" # The Go version to download (if necessary) and use.
go-version: "^1.18" # The Go version to download (if necessary) and use.
- name: Install Intel's SGX SDK
run: |
mkdir -p "$HOME/.sgxsdk"
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.17" # The Go version to download (if necessary) and use.
go-version: "^1.18" # The Go version to download (if necessary) and use.
- name: Install xgo
run: |
go install github.com/crazy-max/xgo@latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- uses: actions/setup-go@v2
with:
go-version: "^1.17" # The Go version to download (if necessary) and use.
go-version: "^1.18" # The Go version to download (if necessary) and use.
- name: Install Intel's SGX SDK
run: |
mkdir -p "$HOME/.sgxsdk"
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- uses: actions/setup-go@v2
with:
go-version: "^1.17" # The Go version to download (if necessary) and use.
go-version: "^1.18" # The Go version to download (if necessary) and use.
- name: Create api keys
run: |
echo $SPID_MAINNET > spid.txt
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: "^1.17" # The Go version to download (if necessary) and use.
go-version: "^1.18" # The Go version to download (if necessary) and use.
- name: Install xgo
run: |
go install github.com/crazy-max/xgo@latest
Expand Down
1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
image: ghcr.io/notional-labs/cosmos
20 changes: 9 additions & 11 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ package app

import (
"fmt"
"io"
"net/http"
"os"
"path/filepath"

store "github.com/cosmos/cosmos-sdk/store/types"

Expand Down Expand Up @@ -94,11 +98,6 @@ import (
reg "github.com/enigmampc/SecretNetwork/x/registration"
"github.com/spf13/cast"

"io"
"net/http"
"os"
"path/filepath"

"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
abci "github.com/tendermint/tendermint/abci/types"
Expand Down Expand Up @@ -242,13 +241,12 @@ func NewSecretNetworkApp(
skipUpgradeHeights map[int64]bool,
homePath string,
invCheckPeriod uint,
//enabledProposals []compute.ProposalType,
// enabledProposals []compute.ProposalType,
bootstrap bool,
appOpts servertypes.AppOptions,
computeConfig *compute.WasmConfig,
baseAppOptions ...func(*baseapp.BaseApp),
) *SecretNetworkApp {

encodingConfig := MakeEncodingConfig()
appCodec, legacyAmino := encodingConfig.Marshaler, encodingConfig.Amino
interfaceRegistry := encodingConfig.InterfaceRegistry
Expand All @@ -258,7 +256,7 @@ func NewSecretNetworkApp(
bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
bApp.SetInterfaceRegistry(interfaceRegistry)
//bApp.GRPCQueryRouter().RegisterSimulateService(bApp.Simulate, interfaceRegistry)
// bApp.GRPCQueryRouter().RegisterSimulateService(bApp.Simulate, interfaceRegistry)

keys := sdk.NewKVStoreKeys(
authtypes.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey,
Expand Down Expand Up @@ -442,7 +440,7 @@ func NewSecretNetworkApp(

// NOTE: we may consider parsing `appOpts` inside module constructors. For the moment
// we prefer to be more strict in what arguments the modules expect.
var skipGenesisInvariants = cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))
skipGenesisInvariants := cast.ToBool(appOpts.Get(crisis.FlagSkipGenesisInvariants))

// NOTE: Any module instantiated in the module manager that is later modified
// must be passed by reference here.
Expand Down Expand Up @@ -538,7 +536,7 @@ func NewSecretNetworkApp(
govtypes.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
//custom modules
// custom modules
compute.ModuleName,
reg.ModuleName,

Expand Down Expand Up @@ -585,7 +583,7 @@ func NewSecretNetworkApp(
// evidence.NewAppModule(app.evidenceKeeper),
//)

//app.sm.RegisterStoreDecoders()
// app.sm.RegisterStoreDecoders()

// initialize stores
app.MountKVStores(keys)
Expand Down
75 changes: 36 additions & 39 deletions app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,44 +52,42 @@ import (
"github.com/enigmampc/SecretNetwork/x/registration"
)

var (
mbasics = module.NewBasicManager(
append([]module.AppModuleBasic{
authz.AppModuleBasic{},
// accounts, fees.
auth.AppModuleBasic{},
// genesis utilities
genutil.AppModuleBasic{},
// tokens, token balance.
bank.AppModuleBasic{},
capability.AppModuleBasic{},
// validator staking
staking.AppModuleBasic{},
// inflation
mint.AppModuleBasic{},
// distribution of fess and inflation
distr.AppModuleBasic{},
// governance functionality (voting)
gov.NewAppModuleBasic(
paramsclient.ProposalHandler, distrclient.ProposalHandler,
upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler,
),
// chain parameters
params.AppModuleBasic{},
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
ibc.AppModuleBasic{},
upgrade.AppModuleBasic{},
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
feegrantmodule.AppModuleBasic{},
ica.AppModuleBasic{},
},
// our stuff
customModuleBasics()...,
)...,
)
var mbasics = module.NewBasicManager(
append([]module.AppModuleBasic{
authz.AppModuleBasic{},
// accounts, fees.
auth.AppModuleBasic{},
// genesis utilities
genutil.AppModuleBasic{},
// tokens, token balance.
bank.AppModuleBasic{},
capability.AppModuleBasic{},
// validator staking
staking.AppModuleBasic{},
// inflation
mint.AppModuleBasic{},
// distribution of fess and inflation
distr.AppModuleBasic{},
// governance functionality (voting)
gov.NewAppModuleBasic(
paramsclient.ProposalHandler, distrclient.ProposalHandler,
upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler,
),
// chain parameters
params.AppModuleBasic{},
crisis.AppModuleBasic{},
slashing.AppModuleBasic{},
ibc.AppModuleBasic{},
upgrade.AppModuleBasic{},
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
feegrantmodule.AppModuleBasic{},
ica.AppModuleBasic{},
},
// our stuff
customModuleBasics()...,
)...,
)

func customKVStoreKeys() []string {
Expand Down Expand Up @@ -163,5 +161,4 @@ func transientStoreKeys() map[string]*sdk.TransientStoreKey {

func memStoreKeys() map[string]*sdk.MemoryStoreKey {
return sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)

}
2 changes: 1 addition & 1 deletion app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package app

import (
"encoding/json"

servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
Expand Down Expand Up @@ -103,7 +104,6 @@ func (app *SecretNetworkApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllow

// reinitialize all validators
app.stakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) {

// donate any unwithdrawn outstanding reward fraction tokens to the community pool
scraps := app.distrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator())
feePool := app.distrKeeper.GetFeePool(ctx)
Expand Down
3 changes: 2 additions & 1 deletion app/legacy/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package legacy
import (
"encoding/json"
"fmt"
"github.com/cosmos/cosmos-sdk/x/authz"
"io/ioutil"
"time"

"github.com/cosmos/cosmos-sdk/x/authz"

"github.com/pkg/errors"
"github.com/spf13/cobra"
tmjson "github.com/tendermint/tendermint/libs/json"
Expand Down
1 change: 1 addition & 0 deletions app/legacy/v120/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package legacy

import (
"fmt"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys/multisig"
Expand Down
1 change: 0 additions & 1 deletion app/upgrades/v1.3/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const UpgradeName = "v1.3"
func CreateUpgradeHandler(mm *module.Manager, icamodule *icamodule.AppModule, configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {

// Assaf: Set version map for all modules because for some
// reason it's not already set in upgradekeepr.
// We upgrade from cosmos-sdk v0.44.5 to v0.45.4 and ibc-go v1.1.5 to v3.0.0
Expand Down
Loading

0 comments on commit 7a50ad0

Please sign in to comment.