diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f421723cc6..5d2016eafa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,8 +38,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-arch: ["amd64", "arm", "arm64"] + include: + - goarch: "amd64" + gcc: "gcc" + package: "" + - goarch: "arm64" + gcc: "aarch64-linux-gnu-gcc" + package: "g++-aarch64-linux-gnu" + - goarch: "arm" + gcc: "arm-linux-gnueabi-gcc" + package: "g++-arm-linux-gnueabi" steps: + - run: sudo apt update && sudo apt install -y ${{ matrix.package }} qemu-user-binfmt + if: "matrix.package != ''" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -52,7 +63,7 @@ jobs: go.mod go.sum - name: Build - run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build + run: GOOS=linux CGO_ENABLED=1 GOARCH=${{ matrix.goarch }} CC=${{ matrix.gcc }} LEDGER_ENABLED=false make build # TODO: disable test-race. please enable this after fixing concurrent checkTx # test-cosmovisor: diff --git a/CHANGELOG.md b/CHANGELOG.md index c064382428..0983d9ab5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ * (api) [\#130](https://github.com/line/lfb-sdk/pull/130) Rename rest apis * (auth) [\#265](https://github.com/line/lfb-sdk/pull/265) Introduce sig block height for the new replay protection * (global) [\#298](https://github.com/line/lfb-sdk/pull/298) Treat addresses as strings +* (ostracon) [\#317](https://github.com/line/lfb-sdk/pull/317) Integrate Ostracon including vrf election and voter concept ### Build, CI * (ci) [\#234](https://github.com/line/lfb-sdk/pull/234) Fix branch name in ci script diff --git a/baseapp/abci.go b/baseapp/abci.go index c157e6acb3..b9aceb226b 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -12,7 +12,7 @@ import ( "github.com/gogo/protobuf/proto" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" @@ -28,13 +28,13 @@ import ( func (app *BaseApp) InitChain(req abci.RequestInitChain) (res abci.ResponseInitChain) { // On a new chain, we consider the init chain block height as 0, even though // req.InitialHeight is 1 by default. - initHeader := ostproto.Header{ChainID: req.ChainId, Time: req.Time} + initHeader := ocproto.Header{ChainID: req.ChainId, Time: req.Time} // If req.InitialHeight is > 1, then we set the initial version in the // stores. if req.InitialHeight > 1 { app.initialHeight = req.InitialHeight - initHeader = ostproto.Header{ChainID: req.ChainId, Height: req.InitialHeight, Time: req.Time} + initHeader = ocproto.Header{ChainID: req.ChainId, Height: req.InitialHeight, Time: req.Time} err := app.cms.SetInitialVersion(req.InitialHeight) if err != nil { panic(err) diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index e94924ed2b..66d0fd52de 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -5,7 +5,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostprototypes "github.com/line/ostracon/proto/ostracon/types" + ocprototypes "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -106,7 +106,7 @@ func TestGetBlockRentionHeight(t *testing.T) { tc.bapp.SetParamStore(¶mStore{db: memdb.NewDB()}) tc.bapp.InitChain(abci.RequestInitChain{ ConsensusParams: &abci.ConsensusParams{ - Evidence: &ostprototypes.EvidenceParams{ + Evidence: &ocprototypes.EvidenceParams{ MaxAgeNumBlocks: tc.maxAgeBlocks, }, }, diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index b9b81b6d45..c47d649c69 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -11,7 +11,7 @@ import ( abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/crypto/tmhash" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" tmdb "github.com/line/tm-db/v2" "github.com/line/lfb-sdk/codec/types" @@ -274,7 +274,7 @@ func (app *BaseApp) init() error { } // needed for the export command which inits from store but never calls initchain - app.setCheckState(ostproto.Header{}) + app.setCheckState(ocproto.Header{}) app.Seal() // make sure the snapshot interval is a multiple of the pruning KeepEvery interval @@ -350,7 +350,7 @@ func (app *BaseApp) IsSealed() bool { return app.sealed } // (i.e. a CacheMultiStore) and a new Context with the same multi-store branch, // provided header, and minimum gas prices set. It is set on InitChain and reset // on Commit. -func (app *BaseApp) setCheckState(header ostproto.Header) { +func (app *BaseApp) setCheckState(header ocproto.Header) { ms := app.cms.CacheMultiStore() app.checkStateMtx.Lock() defer app.checkStateMtx.Unlock() @@ -369,7 +369,7 @@ func (app *BaseApp) setCheckState(header ostproto.Header) { // (i.e. a CacheMultiStore) and a new Context with the same multi-store branch, // and provided header. It is set on InitChain and BeginBlock and set to nil on // Commit. -func (app *BaseApp) setDeliverState(header ostproto.Header) { +func (app *BaseApp) setDeliverState(header ocproto.Header) { ms := app.cms.CacheMultiStore() app.deliverState = &state{ ms: ms, @@ -394,14 +394,14 @@ func (app *BaseApp) GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams { } if app.paramStore.Has(ctx, ParamStoreKeyEvidenceParams) { - var ep ostproto.EvidenceParams + var ep ocproto.EvidenceParams app.paramStore.Get(ctx, ParamStoreKeyEvidenceParams, &ep) cp.Evidence = &ep } if app.paramStore.Has(ctx, ParamStoreKeyValidatorParams) { - var vp ostproto.ValidatorParams + var vp ocproto.ValidatorParams app.paramStore.Get(ctx, ParamStoreKeyValidatorParams, &vp) cp.Validator = &vp diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index b1e02b7061..11e8284bb8 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -16,7 +16,7 @@ import ( "github.com/gogo/protobuf/jsonpb" abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" tmdb "github.com/line/tm-db/v2" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/assert" @@ -76,7 +76,7 @@ func (ps *paramStore) Get(_ sdk.Context, key []byte, ptr interface{}) { } func defaultLogger() log.Logger { - return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") + return log.NewOCLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") } func newBaseApp(name string, options ...func(*BaseApp)) *BaseApp { @@ -154,7 +154,7 @@ func setupBaseAppWithSnapshots(t *testing.T, blocks uint, blockTxs int, options r := rand.New(rand.NewSource(3920758213583)) keyCounter := 0 for height := int64(1); height <= int64(blocks); height++ { - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: height}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: height}}) for txNum := 0; txNum < blockTxs; txNum++ { tx := txTest{Msgs: []sdk.Msg{}} for msgNum := 0; msgNum < 100; msgNum++ { @@ -225,13 +225,13 @@ func TestLoadVersion(t *testing.T) { require.Equal(t, emptyCommitID, lastID) // execute a block, collect commit ID - header := ostproto.Header{Height: 1} + header := ocproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) res := app.Commit() commitID1 := sdk.CommitID{Version: 1, Hash: res.Data} // execute a block, collect commit ID - header = ostproto.Header{Height: 2} + header = ocproto.Header{Height: 2} app.BeginBlock(abci.RequestBeginBlock{Header: header}) res = app.Commit() commitID2 := sdk.CommitID{Version: 2, Hash: res.Data} @@ -330,7 +330,7 @@ func TestSetLoader(t *testing.T) { require.Nil(t, err) // "execute" one block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: 2}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: 2}}) res := app.Commit() require.NotNil(t, res.Data) @@ -375,7 +375,7 @@ func TestLoadVersionInvalid(t *testing.T) { err = app.LoadVersion(-1) require.Error(t, err) - header := ostproto.Header{Height: 1} + header := ocproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) res := app.Commit() commitID1 := sdk.CommitID{Version: 1, Hash: res.Data} @@ -425,7 +425,7 @@ func TestLoadVersionPruning(t *testing.T) { // Commit seven blocks, of which 7 (latest) is kept in addition to 6, 5 // (keep recent) and 3 (keep every). for i := int64(1); i <= 7; i++ { - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: i}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: i}}) res := app.Commit() lastCommitID = sdk.CommitID{Version: i, Hash: res.Data} } @@ -624,7 +624,7 @@ func TestInitChainer(t *testing.T) { require.Equal(t, value, res.Value) // commit and ensure we can still query - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.Commit() @@ -662,14 +662,14 @@ func TestBeginBlock_WithInitialHeight(t *testing.T) { require.PanicsWithError(t, "invalid height: 4; expected: 3", func() { app.BeginBlock(abci.RequestBeginBlock{ - Header: ostproto.Header{ + Header: ocproto.Header{ Height: 4, }, }) }) app.BeginBlock(abci.RequestBeginBlock{ - Header: ostproto.Header{ + Header: ocproto.Header{ Height: 3, }, }) @@ -951,7 +951,7 @@ func TestCheckTx(t *testing.T) { require.Equal(t, nTxs, storedCounter) // If a block is committed, CheckTx state should be reset. - header := ostproto.Header{Height: 1} + header := ocproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.EndBlock(abci.RequestEndBlock{}) app.Commit() @@ -990,7 +990,7 @@ func TestDeliverTx(t *testing.T) { txPerHeight := 5 for blockN := 0; blockN < nBlocks; blockN++ { - header := ostproto.Header{Height: int64(blockN) + 1} + header := ocproto.Header{Height: int64(blockN) + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) for i := 0; i < txPerHeight; i++ { @@ -1044,7 +1044,7 @@ func TestMultiMsgDeliverTx(t *testing.T) { // run a multi-msg tx // with all msgs the same route - header := ostproto.Header{Height: 1} + header := ocproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(0, 0, 1, 2) txBytes, err := codec.MarshalBinaryBare(tx) @@ -1125,7 +1125,7 @@ func TestSimulateTx(t *testing.T) { nBlocks := 3 for blockN := 0; blockN < nBlocks; blockN++ { count := int64(blockN + 1) - header := ostproto.Header{Height: count} + header := ocproto.Header{Height: count} app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(count, count) @@ -1180,7 +1180,7 @@ func TestRunInvalidTransaction(t *testing.T) { app := setupBaseApp(t, anteOpt, routerOpt) - header := ostproto.Header{Height: 1} + header := ocproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) // transaction with no messages @@ -1308,7 +1308,7 @@ func TestTxGasLimits(t *testing.T) { app := setupBaseApp(t, anteOpt, routerOpt) - header := ostproto.Header{Height: 1} + header := ocproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) testCases := []struct { @@ -1422,7 +1422,7 @@ func TestMaxBlockGasLimits(t *testing.T) { tx := tc.tx // reset the block gas - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) // execute the transaction multiple times @@ -1475,7 +1475,7 @@ func TestCustomRunTxPanicHandler(t *testing.T) { app := setupBaseApp(t, anteOpt, routerOpt) - header := ostproto.Header{Height: 1} + header := ocproto.Header{Height: 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error { @@ -1517,7 +1517,7 @@ func TestBaseAppAnteHandler(t *testing.T) { app.InitChain(abci.RequestInitChain{}) registerTestCodec(cdc) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) // execute a tx that will fail ante handler execution @@ -1625,7 +1625,7 @@ func TestGasConsumptionBadTx(t *testing.T) { app.InitChain(abci.RequestInitChain{}) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(5, 0) @@ -1689,7 +1689,7 @@ func TestQuery(t *testing.T) { require.Equal(t, 0, len(res.Value)) // query is still empty after a DeliverTx before we commit - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) _, resTx, err := app.Deliver(aminoTxEncoder(), tx) @@ -1715,7 +1715,7 @@ func TestGRPCQuery(t *testing.T) { app := setupBaseApp(t, grpcQueryOpt) app.InitChain(abci.RequestInitChain{}) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.Commit() @@ -1772,7 +1772,7 @@ func TestP2PQuery(t *testing.T) { func TestGetMaximumBlockGas(t *testing.T) { app := setupBaseApp(t) app.InitChain(abci.RequestInitChain{}) - ctx := app.NewContext(true, ostproto.Header{}) + ctx := app.NewContext(true, ocproto.Header{}) app.StoreConsensusParams(ctx, &abci.ConsensusParams{Block: &abci.BlockParams{MaxGas: 0}}) require.Equal(t, uint64(0), app.getMaximumBlockGas(ctx)) @@ -1990,7 +1990,7 @@ func TestWithRouter(t *testing.T) { txPerHeight := 5 for blockN := 0; blockN < nBlocks; blockN++ { - header := ostproto.Header{Height: int64(blockN) + 1} + header := ocproto.Header{Height: int64(blockN) + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) for i := 0; i < txPerHeight; i++ { diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index f36ad95062..8e4b35a96e 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -54,7 +54,7 @@ func TestRegisterQueryServiceTwice(t *testing.T) { // Setup baseapp. db := memdb.NewDB() encCfg := simapp.MakeTestEncodingConfig() - app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) testdata.RegisterInterfaces(encCfg.InterfaceRegistry) diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 9356bc80b0..6329bba196 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -6,7 +6,7 @@ import ( abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -23,7 +23,7 @@ func TestRegisterMsgService(t *testing.T) { // Create an encoding config that doesn't register testdata Msg services. encCfg := simapp.MakeTestEncodingConfig() - app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) require.Panics(t, func() { testdata.RegisterMsgServer( @@ -46,7 +46,7 @@ func TestRegisterMsgServiceTwice(t *testing.T) { // Setup baseapp. db := memdb.NewDB() encCfg := simapp.MakeTestEncodingConfig() - app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) testdata.RegisterInterfaces(encCfg.InterfaceRegistry) @@ -72,13 +72,13 @@ func TestMsgService(t *testing.T) { encCfg := simapp.MakeTestEncodingConfig() testdata.RegisterInterfaces(encCfg.InterfaceRegistry) db := memdb.NewDB() - app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) testdata.RegisterMsgServer( app.MsgServiceRouter(), testdata.MsgServerImpl{}, ) - _ = app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: 1}}) + _ = app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: 1}}) msg := testdata.NewServiceMsgCreateDog(&testdata.MsgCreateDog{Dog: &testdata.Dog{Name: "Spot"}}) txBuilder := encCfg.TxConfig.NewTxBuilder() diff --git a/baseapp/params.go b/baseapp/params.go index 70bb7a1149..3fda136ec6 100644 --- a/baseapp/params.go +++ b/baseapp/params.go @@ -5,7 +5,7 @@ import ( "fmt" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" sdk "github.com/line/lfb-sdk/types" ) @@ -50,7 +50,7 @@ func ValidateBlockParams(i interface{}) error { // ValidateEvidenceParams defines a stateless validation on EvidenceParams. This // function is called whenever the parameters are updated or stored. func ValidateEvidenceParams(i interface{}) error { - v, ok := i.(ostproto.EvidenceParams) + v, ok := i.(ocproto.EvidenceParams) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } @@ -73,7 +73,7 @@ func ValidateEvidenceParams(i interface{}) error { // ValidateValidatorParams defines a stateless validation on ValidatorParams. This // function is called whenever the parameters are updated or stored. func ValidateValidatorParams(i interface{}) error { - v, ok := i.(ostproto.ValidatorParams) + v, ok := i.(ocproto.ValidatorParams) if !ok { return fmt.Errorf("invalid parameter type: %T", i) } diff --git a/baseapp/params_test.go b/baseapp/params_test.go index b4ebaf7e79..247ce806c2 100644 --- a/baseapp/params_test.go +++ b/baseapp/params_test.go @@ -4,7 +4,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/baseapp" @@ -34,13 +34,13 @@ func TestValidateEvidenceParams(t *testing.T) { expectErr bool }{ {nil, true}, - {&ostproto.EvidenceParams{}, true}, - {ostproto.EvidenceParams{}, true}, - {ostproto.EvidenceParams{MaxAgeNumBlocks: -1, MaxAgeDuration: 18004000, MaxBytes: 5000000}, true}, - {ostproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: -1, MaxBytes: 5000000}, true}, - {ostproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxBytes: -1}, true}, - {ostproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxBytes: 5000000}, false}, - {ostproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxBytes: 0}, false}, + {&ocproto.EvidenceParams{}, true}, + {ocproto.EvidenceParams{}, true}, + {ocproto.EvidenceParams{MaxAgeNumBlocks: -1, MaxAgeDuration: 18004000, MaxBytes: 5000000}, true}, + {ocproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: -1, MaxBytes: 5000000}, true}, + {ocproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxBytes: -1}, true}, + {ocproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxBytes: 5000000}, false}, + {ocproto.EvidenceParams{MaxAgeNumBlocks: 360000, MaxAgeDuration: 18004000, MaxBytes: 0}, false}, } for _, tc := range testCases { @@ -54,10 +54,10 @@ func TestValidateValidatorParams(t *testing.T) { expectErr bool }{ {nil, true}, - {&ostproto.ValidatorParams{}, true}, - {ostproto.ValidatorParams{}, true}, - {ostproto.ValidatorParams{PubKeyTypes: []string{}}, true}, - {ostproto.ValidatorParams{PubKeyTypes: []string{"secp256k1"}}, false}, + {&ocproto.ValidatorParams{}, true}, + {ocproto.ValidatorParams{}, true}, + {ocproto.ValidatorParams{PubKeyTypes: []string{}}, true}, + {ocproto.ValidatorParams{PubKeyTypes: []string{"secp256k1"}}, false}, } for _, tc := range testCases { diff --git a/baseapp/test_helpers.go b/baseapp/test_helpers.go index 30a4e23258..07299ead8f 100644 --- a/baseapp/test_helpers.go +++ b/baseapp/test_helpers.go @@ -1,7 +1,7 @@ package baseapp import ( - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" sdk "github.com/line/lfb-sdk/types" sdkerrors "github.com/line/lfb-sdk/types/errors" @@ -36,7 +36,7 @@ func (app *BaseApp) Deliver(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, *s } // Context with current {check, deliver}State of the app used by tests. -func (app *BaseApp) NewContext(isCheckTx bool, header ostproto.Header) sdk.Context { +func (app *BaseApp) NewContext(isCheckTx bool, header ocproto.Header) sdk.Context { if isCheckTx { ctx := sdk.NewContext(app.checkState.ms, header, true, app.logger). WithMinGasPrices(app.minGasPrices) @@ -46,6 +46,6 @@ func (app *BaseApp) NewContext(isCheckTx bool, header ostproto.Header) sdk.Conte return sdk.NewContext(app.deliverState.ms, header, false, app.logger) } -func (app *BaseApp) NewUncachedContext(isCheckTx bool, header ostproto.Header) sdk.Context { +func (app *BaseApp) NewUncachedContext(isCheckTx bool, header ocproto.Header) sdk.Context { return sdk.NewContext(app.cms, header, isCheckTx, app.logger) } diff --git a/client/broadcast_test.go b/client/broadcast_test.go index 60a9a8b102..4b88ff109a 100644 --- a/client/broadcast_test.go +++ b/client/broadcast_test.go @@ -9,7 +9,7 @@ import ( "github.com/line/ostracon/mempool" "github.com/line/ostracon/rpc/client/mock" ctypes "github.com/line/ostracon/rpc/core/types" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/client/flags" @@ -21,15 +21,15 @@ type MockClient struct { err error } -func (c MockClient) BroadcastTxCommit(ctx context.Context, tx osttypes.Tx) (*ctypes.ResultBroadcastTxCommit, error) { +func (c MockClient) BroadcastTxCommit(ctx context.Context, tx octypes.Tx) (*ctypes.ResultBroadcastTxCommit, error) { return nil, c.err } -func (c MockClient) BroadcastTxAsync(ctx context.Context, tx osttypes.Tx) (*ctypes.ResultBroadcastTx, error) { +func (c MockClient) BroadcastTxAsync(ctx context.Context, tx octypes.Tx) (*ctypes.ResultBroadcastTx, error) { return nil, c.err } -func (c MockClient) BroadcastTxSync(ctx context.Context, tx osttypes.Tx) (*ctypes.ResultBroadcastTx, error) { +func (c MockClient) BroadcastTxSync(ctx context.Context, tx octypes.Tx) (*ctypes.ResultBroadcastTx, error) { return nil, c.err } diff --git a/client/flags/flags.go b/client/flags/flags.go index b5bf78d8bf..763fd8da58 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -5,6 +5,7 @@ import ( "strconv" ostcli "github.com/line/ostracon/libs/cli" + "github.com/line/ostracon/privval" "github.com/spf13/cobra" "github.com/line/lfb-sdk/crypto/keyring" @@ -70,10 +71,12 @@ const ( FlagCountTotal = "count-total" FlagTimeoutHeight = "timeout-height" FlagKeyAlgorithm = "algo" + FlagPrivKeyType = "priv_key_type" // Tendermint logging flags - FlagLogLevel = "log_level" - FlagLogFormat = "log_format" + FlagLogLevel = "log_level" + FlagLogFormat = "log_format" + DefaultPrivKeyType = privval.PrivKeyTypeEd25519 ) // LineBreak can be included in a command list to provide a blank line @@ -112,6 +115,8 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().String(FlagKeyringBackend, DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)") cmd.Flags().String(FlagSignMode, "", "Choose sign mode (direct|amino-json), this is an advanced feature") cmd.Flags().Uint64(FlagTimeoutHeight, 0, "Set a block timeout height to prevent the tx from being committed past a certain height") + cmd.Flags().String(FlagPrivKeyType, DefaultPrivKeyType, "specify validator's private key type (ed25519|composite). \n"+ + "set this to priv_key.type in priv_validator_key.json; default `ed25519`") // --gas can accept integers and "auto" cmd.Flags().String(FlagGas, "", fmt.Sprintf("gas limit to set per-transaction; set to %q to calculate sufficient gas automatically (default %d)", GasFlagAuto, DefaultGasLimit)) diff --git a/client/grpc/reflection/reflection_test.go b/client/grpc/reflection/reflection_test.go index 5f99038d64..1e285d23ca 100644 --- a/client/grpc/reflection/reflection_test.go +++ b/client/grpc/reflection/reflection_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/baseapp" @@ -21,7 +21,7 @@ type IntegrationTestSuite struct { func (s *IntegrationTestSuite) SetupSuite() { app := simapp.Setup(false) - sdkCtx := app.BaseApp.NewContext(false, ostproto.Header{}) + sdkCtx := app.BaseApp.NewContext(false, ocproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(sdkCtx, app.InterfaceRegistry()) queryClient := reflection.NewReflectionServiceClient(queryHelper) s.queryClient = queryClient diff --git a/client/keys/add.go b/client/keys/add.go index f6f4bf28f7..c42c71ea35 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -251,7 +251,7 @@ func RunAddCmd(cmd *cobra.Command, args []string, kb keyring.Keyring, inBuf *buf } if len(mnemonic) == 0 { - // read entropy seed straight from ostcrypto.Rand and convert to mnemonic + // read entropy seed straight from occrypto.Rand and convert to mnemonic entropySeed, err := bip39.NewEntropy(mnemonicEntropySize) if err != nil { return err diff --git a/client/rpc/status.go b/client/rpc/status.go index 607de9ef3b..74294ce33f 100644 --- a/client/rpc/status.go +++ b/client/rpc/status.go @@ -18,7 +18,7 @@ import ( "github.com/line/lfb-sdk/version" ) -// ValidatorInfo is info about the node's validator, same as Tendermint, +// ValidatorInfo is info about the node's validator, same as Ostracon, // except that we use our own PubKey. type validatorInfo struct { Address bytes.HexBytes @@ -26,7 +26,7 @@ type validatorInfo struct { VotingPower int64 } -// ResultStatus is node's info, same as Tendermint, except that we use our own +// ResultStatus is node's info, same as Ostracon, except that we use our own // PubKey. type resultStatus struct { NodeInfo p2p.DefaultNodeInfo @@ -50,8 +50,8 @@ func StatusCommand() *cobra.Command { return err } - // `status` has TM pubkeys, we need to convert them to our pubkeys. - pk, err := cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey) + // `status` has OC pubkeys, we need to convert them to our pubkeys. + pk, err := cryptocodec.FromOcPubKeyInterface(status.ValidatorInfo.PubKey) if err != nil { return err } @@ -61,7 +61,7 @@ func StatusCommand() *cobra.Command { ValidatorInfo: validatorInfo{ Address: status.ValidatorInfo.Address, PubKey: pk, - VotingPower: status.ValidatorInfo.VotingPower, + VotingPower: status.ValidatorInfo.StakingPower, }, } diff --git a/client/rpc/validators.go b/client/rpc/validators.go index b6456ab2e1..54e7ee1ee5 100644 --- a/client/rpc/validators.go +++ b/client/rpc/validators.go @@ -10,7 +10,7 @@ import ( "github.com/gorilla/mux" "github.com/spf13/cobra" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/client" "github.com/line/lfb-sdk/client/flags" @@ -102,8 +102,8 @@ func (rvo ResultValidatorsOutput) String() string { return b.String() } -func validatorOutput(validator *osttypes.Validator) (ValidatorOutput, error) { - pk, err := cryptocodec.FromTmPubKeyInterface(validator.PubKey) +func validatorOutput(validator *octypes.Validator) (ValidatorOutput, error) { + pk, err := cryptocodec.FromOcPubKeyInterface(validator.PubKey) if err != nil { return ValidatorOutput{}, err } diff --git a/codec/amino.go b/codec/amino.go index 21c99ec14b..80024c4aa7 100644 --- a/codec/amino.go +++ b/codec/amino.go @@ -7,7 +7,7 @@ import ( "fmt" "io" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" amino "github.com/tendermint/go-amino" "github.com/line/lfb-sdk/codec/types" @@ -30,8 +30,8 @@ func NewLegacyAmino() *LegacyAmino { // RegisterEvidences registers Tendermint evidence types with the provided Amino // codec. func RegisterEvidences(cdc *LegacyAmino) { - cdc.Amino.RegisterInterface((*osttypes.Evidence)(nil), nil) - cdc.Amino.RegisterConcrete(&osttypes.DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil) + cdc.Amino.RegisterInterface((*octypes.Evidence)(nil), nil) + cdc.Amino.RegisterConcrete(&octypes.DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil) } // MarshalJSONIndent provides a utility for indented JSON encoding of an object diff --git a/crypto/armor_test.go b/crypto/armor_test.go index e922217703..4e0fa2dbc1 100644 --- a/crypto/armor_test.go +++ b/crypto/armor_test.go @@ -7,7 +7,7 @@ import ( "io" "testing" - ostcrypto "github.com/line/ostracon/crypto" + occrypto "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/armor" "github.com/line/ostracon/crypto/xsalsa20symmetric" "github.com/stretchr/testify/require" @@ -47,10 +47,10 @@ func TestArmorUnarmorPrivKey(t *testing.T) { // armor key manually encryptPrivKeyFn := func(privKey cryptotypes.PrivKey, passphrase string) (saltBytes []byte, encBytes []byte) { - saltBytes = ostcrypto.CRandBytes(16) + saltBytes = occrypto.CRandBytes(16) key, err := bcrypt.GenerateFromPassword(saltBytes, []byte(passphrase), crypto.BcryptSecurityParameter) require.NoError(t, err) - key = ostcrypto.Sha256(key) // get 32 bytes + key = occrypto.Sha256(key) // get 32 bytes privKeyBytes := legacy.Cdc.Amino.MustMarshalBinaryBare(privKey) return saltBytes, xsalsa20symmetric.EncryptSymmetric(privKeyBytes, key) } @@ -162,7 +162,7 @@ func BenchmarkBcryptGenerateFromPassword(b *testing.B) { for securityParam := 9; securityParam < 16; securityParam++ { param := securityParam b.Run(fmt.Sprintf("benchmark-security-param-%d", param), func(b *testing.B) { - saltBytes := ostcrypto.CRandBytes(16) + saltBytes := occrypto.CRandBytes(16) b.ResetTimer() for i := 0; i < b.N; i++ { _, err := bcrypt.GenerateFromPassword(saltBytes, passphrase, param) diff --git a/crypto/codec/oc.go b/crypto/codec/oc.go new file mode 100644 index 0000000000..2b7f4abcfd --- /dev/null +++ b/crypto/codec/oc.go @@ -0,0 +1,68 @@ +package codec + +import ( + occrypto "github.com/line/ostracon/crypto" + "github.com/line/ostracon/crypto/encoding" + ocprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" + + "github.com/line/lfb-sdk/crypto/keys/ed25519" + "github.com/line/lfb-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/line/lfb-sdk/crypto/types" + sdkerrors "github.com/line/lfb-sdk/types/errors" +) + +// FromOcProtoPublicKey converts a OC's ocprotocrypto.PublicKey into our own PubKey. +func FromOcProtoPublicKey(protoPk ocprotocrypto.PublicKey) (cryptotypes.PubKey, error) { + switch protoPk := protoPk.Sum.(type) { + case *ocprotocrypto.PublicKey_Ed25519: + return &ed25519.PubKey{ + Key: protoPk.Ed25519, + }, nil + case *ocprotocrypto.PublicKey_Secp256K1: + return &secp256k1.PubKey{ + Key: protoPk.Secp256K1, + }, nil + default: + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Ostracon public key", protoPk) + } +} + +// ToOcProtoPublicKey converts our own PubKey to OC's ocprotocrypto.PublicKey. +func ToOcProtoPublicKey(pk cryptotypes.PubKey) (ocprotocrypto.PublicKey, error) { + switch pk := pk.(type) { + case *ed25519.PubKey: + return ocprotocrypto.PublicKey{ + Sum: &ocprotocrypto.PublicKey_Ed25519{ + Ed25519: pk.Key, + }, + }, nil + case *secp256k1.PubKey: + return ocprotocrypto.PublicKey{ + Sum: &ocprotocrypto.PublicKey_Secp256K1{ + Secp256K1: pk.Key, + }, + }, nil + default: + return ocprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Ostracon public key", pk) + } +} + +// FromOcPubKeyInterface converts OC's occrypto.PubKey to our own PubKey. +func FromOcPubKeyInterface(tmPk occrypto.PubKey) (cryptotypes.PubKey, error) { + ocProtoPk, err := encoding.PubKeyToProto(tmPk) + if err != nil { + return nil, err + } + + return FromOcProtoPublicKey(ocProtoPk) +} + +// ToOcPubKeyInterface converts our own PubKey to OC's occrypto.PubKey. +func ToOcPubKeyInterface(pk cryptotypes.PubKey) (occrypto.PubKey, error) { + ocProtoPk, err := ToOcProtoPublicKey(pk) + if err != nil { + return nil, err + } + + return encoding.PubKeyFromProto(&ocProtoPk) +} diff --git a/crypto/codec/tm.go b/crypto/codec/tm.go deleted file mode 100644 index f586c674db..0000000000 --- a/crypto/codec/tm.go +++ /dev/null @@ -1,68 +0,0 @@ -package codec - -import ( - ostcrypto "github.com/line/ostracon/crypto" - "github.com/line/ostracon/crypto/encoding" - ostprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" - - "github.com/line/lfb-sdk/crypto/keys/ed25519" - "github.com/line/lfb-sdk/crypto/keys/secp256k1" - cryptotypes "github.com/line/lfb-sdk/crypto/types" - sdkerrors "github.com/line/lfb-sdk/types/errors" -) - -// FromTmProtoPublicKey converts a TM's ostprotocrypto.PublicKey into our own PubKey. -func FromTmProtoPublicKey(protoPk ostprotocrypto.PublicKey) (cryptotypes.PubKey, error) { - switch protoPk := protoPk.Sum.(type) { - case *ostprotocrypto.PublicKey_Ed25519: - return &ed25519.PubKey{ - Key: protoPk.Ed25519, - }, nil - case *ostprotocrypto.PublicKey_Secp256K1: - return &secp256k1.PubKey{ - Key: protoPk.Secp256K1, - }, nil - default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk) - } -} - -// ToTmProtoPublicKey converts our own PubKey to TM's ostprotocrypto.PublicKey. -func ToTmProtoPublicKey(pk cryptotypes.PubKey) (ostprotocrypto.PublicKey, error) { - switch pk := pk.(type) { - case *ed25519.PubKey: - return ostprotocrypto.PublicKey{ - Sum: &ostprotocrypto.PublicKey_Ed25519{ - Ed25519: pk.Key, - }, - }, nil - case *secp256k1.PubKey: - return ostprotocrypto.PublicKey{ - Sum: &ostprotocrypto.PublicKey_Secp256K1{ - Secp256K1: pk.Key, - }, - }, nil - default: - return ostprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Tendermint public key", pk) - } -} - -// FromTmPubKeyInterface converts TM's ostcrypto.PubKey to our own PubKey. -func FromTmPubKeyInterface(tmPk ostcrypto.PubKey) (cryptotypes.PubKey, error) { - tmProtoPk, err := encoding.PubKeyToProto(tmPk) - if err != nil { - return nil, err - } - - return FromTmProtoPublicKey(tmProtoPk) -} - -// ToTmPubKeyInterface converts our own PubKey to TM's ostcrypto.PubKey. -func ToTmPubKeyInterface(pk cryptotypes.PubKey) (ostcrypto.PubKey, error) { - tmProtoPk, err := ToTmProtoPublicKey(pk) - if err != nil { - return nil, err - } - - return encoding.PubKeyFromProto(tmProtoPk) -} diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index 6de5de9b78..b81f40ae64 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -13,7 +13,7 @@ import ( "github.com/99designs/keyring" bip39 "github.com/cosmos/go-bip39" - ostcrypto "github.com/line/ostracon/crypto" + occrypto "github.com/line/ostracon/crypto" "github.com/pkg/errors" "github.com/tendermint/crypto/bcrypt" @@ -710,7 +710,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { continue } - saltBytes := ostcrypto.CRandBytes(16) + saltBytes := occrypto.CRandBytes(16) passwordHash, err := bcrypt.GenerateFromPassword(saltBytes, []byte(pass), 2) if err != nil { fmt.Fprintln(os.Stderr, err) diff --git a/crypto/keys/multisig/multisig.go b/crypto/keys/multisig/multisig.go index b97cae75a6..bc71c205f9 100644 --- a/crypto/keys/multisig/multisig.go +++ b/crypto/keys/multisig/multisig.go @@ -3,7 +3,7 @@ package multisig import ( fmt "fmt" - ostcrypto "github.com/line/ostracon/crypto" + occrypto "github.com/line/ostracon/crypto" "github.com/line/lfb-sdk/codec/types" cryptotypes "github.com/line/lfb-sdk/crypto/types" @@ -32,7 +32,7 @@ func NewLegacyAminoPubKey(k int, pubKeys []cryptotypes.PubKey) *LegacyAminoPubKe // Address implements cryptotypes.PubKey Address method func (m *LegacyAminoPubKey) Address() cryptotypes.Address { - return ostcrypto.AddressHash(m.Bytes()) + return occrypto.AddressHash(m.Bytes()) } // Bytes returns the proto encoded version of the LegacyAminoPubKey diff --git a/crypto/ledger/encode_test.go b/crypto/ledger/encode_test.go index ca6854123a..0e36c34254 100644 --- a/crypto/ledger/encode_test.go +++ b/crypto/ledger/encode_test.go @@ -34,13 +34,17 @@ func ExamplePrintRegisteredTypes() { // | Type | Name | Prefix | Length | Notes | // | ---- | ---- | ------ | ----- | ------ | // | PrivKeyLedgerSecp256k1 | ostracon/PrivKeyLedgerSecp256k1 | 0x10CAB393 | variable | | + // | PubKeyBLS12 | ostracon/PubKeyBLS12 | 0xD68FFBC1 | 0x30 | | // | PubKey | ostracon/PubKeyEd25519 | 0x1624DE64 | variable | | // | PubKey | ostracon/PubKeySr25519 | 0x0DFB1005 | variable | | // | PubKey | ostracon/PubKeySecp256k1 | 0xEB5AE987 | variable | | // | PubKeyMultisigThreshold | ostracon/PubKeyMultisigThreshold | 0x22C1F7E2 | variable | | + // | PubKeyComposite | ostracon/PubKeyComposite | 0x01886E34 | variable | | + // | PrivKeyBLS12 | ostracon/PrivKeyBLS12 | 0xEAECF03F | 0x20 | | // | PrivKey | ostracon/PrivKeyEd25519 | 0xA3288910 | variable | | // | PrivKey | ostracon/PrivKeySr25519 | 0x2F82D78B | variable | | // | PrivKey | ostracon/PrivKeySecp256k1 | 0xE1B0F79B | variable | | + // | PrivKeyComposite | ostracon/PrivKeyComposite | 0x9F3EE8F0 | variable | | } func TestNilEncodings(t *testing.T) { diff --git a/crypto/ledger/ledger_mock.go b/crypto/ledger/ledger_mock.go index 2ee1525323..26145c6084 100644 --- a/crypto/ledger/ledger_mock.go +++ b/crypto/ledger/ledger_mock.go @@ -80,7 +80,7 @@ func (mock LedgerSECP256K1Mock) GetAddressPubKeySECP256K1(derivationPath []uint3 compressedPublicKey := make([]byte, csecp256k1.PubKeySize) copy(compressedPublicKey, cmp.SerializeCompressed()) - // Generate the bech32 addr using existing ostcrypto/etc. + // Generate the bech32 addr using existing occrypto/etc. pub := &csecp256k1.PubKey{Key: compressedPublicKey} addr := sdk.BytesToAccAddress(pub.Address()).String() return pk, addr, err diff --git a/crypto/ledger/ledger_secp256k1.go b/crypto/ledger/ledger_secp256k1.go index f0def9f4fa..1b8c64868a 100644 --- a/crypto/ledger/ledger_secp256k1.go +++ b/crypto/ledger/ledger_secp256k1.go @@ -5,6 +5,7 @@ import ( "os" "github.com/btcsuite/btcd/btcec" + "github.com/line/ostracon/crypto" "github.com/pkg/errors" tmbtcec "github.com/tendermint/btcd/btcec" @@ -90,6 +91,10 @@ func (pkl PrivKeyLedgerSecp256k1) PubKey() types.PubKey { return pkl.CachedPubKey } +func (pkl PrivKeyLedgerSecp256k1) VRFProve(seed []byte) (crypto.Proof, error) { + return nil, nil +} + // Sign returns a secp256k1 signature for the corresponding message func (pkl PrivKeyLedgerSecp256k1) Sign(message []byte) ([]byte, error) { device, err := getDevice() diff --git a/crypto/types/types.go b/crypto/types/types.go index 8ee8d6b0d2..45134fa36a 100644 --- a/crypto/types/types.go +++ b/crypto/types/types.go @@ -2,7 +2,7 @@ package types import ( proto "github.com/gogo/protobuf/proto" - ostcrypto "github.com/line/ostracon/crypto" + occrypto "github.com/line/ostracon/crypto" ) // PubKey defines a public key and extends proto.Message. @@ -39,5 +39,5 @@ type PrivKey interface { } type ( - Address = ostcrypto.Address + Address = occrypto.Address ) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index cfaff20e10..d996338016 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -4,6 +4,92 @@ ## Table of Contents +- [cosmwasm/wasm/v1beta1/types.proto](#cosmwasm/wasm/v1beta1/types.proto) + - [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition) + - [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) + - [AccessTypeParam](#cosmwasm.wasm.v1beta1.AccessTypeParam) + - [CodeInfo](#cosmwasm.wasm.v1beta1.CodeInfo) + - [ContractCodeHistoryEntry](#cosmwasm.wasm.v1beta1.ContractCodeHistoryEntry) + - [ContractInfo](#cosmwasm.wasm.v1beta1.ContractInfo) + - [Model](#cosmwasm.wasm.v1beta1.Model) + - [Params](#cosmwasm.wasm.v1beta1.Params) + + - [AccessType](#cosmwasm.wasm.v1beta1.AccessType) + - [ContractCodeHistoryOperationType](#cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType) + - [ContractStatus](#cosmwasm.wasm.v1beta1.ContractStatus) + +- [lfb/base/v1beta1/coin.proto](#lfb/base/v1beta1/coin.proto) + - [Coin](#lfb.base.v1beta1.Coin) + - [DecCoin](#lfb.base.v1beta1.DecCoin) + - [DecProto](#lfb.base.v1beta1.DecProto) + - [IntProto](#lfb.base.v1beta1.IntProto) + +- [cosmwasm/wasm/v1beta1/tx.proto](#cosmwasm/wasm/v1beta1/tx.proto) + - [MsgClearAdmin](#cosmwasm.wasm.v1beta1.MsgClearAdmin) + - [MsgClearAdminResponse](#cosmwasm.wasm.v1beta1.MsgClearAdminResponse) + - [MsgExecuteContract](#cosmwasm.wasm.v1beta1.MsgExecuteContract) + - [MsgExecuteContractResponse](#cosmwasm.wasm.v1beta1.MsgExecuteContractResponse) + - [MsgInstantiateContract](#cosmwasm.wasm.v1beta1.MsgInstantiateContract) + - [MsgInstantiateContractResponse](#cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse) + - [MsgMigrateContract](#cosmwasm.wasm.v1beta1.MsgMigrateContract) + - [MsgMigrateContractResponse](#cosmwasm.wasm.v1beta1.MsgMigrateContractResponse) + - [MsgStoreCode](#cosmwasm.wasm.v1beta1.MsgStoreCode) + - [MsgStoreCodeAndInstantiateContract](#cosmwasm.wasm.v1beta1.MsgStoreCodeAndInstantiateContract) + - [MsgStoreCodeAndInstantiateContractResponse](#cosmwasm.wasm.v1beta1.MsgStoreCodeAndInstantiateContractResponse) + - [MsgStoreCodeResponse](#cosmwasm.wasm.v1beta1.MsgStoreCodeResponse) + - [MsgUpdateAdmin](#cosmwasm.wasm.v1beta1.MsgUpdateAdmin) + - [MsgUpdateAdminResponse](#cosmwasm.wasm.v1beta1.MsgUpdateAdminResponse) + - [MsgUpdateContractStatus](#cosmwasm.wasm.v1beta1.MsgUpdateContractStatus) + - [MsgUpdateContractStatusResponse](#cosmwasm.wasm.v1beta1.MsgUpdateContractStatusResponse) + + - [Msg](#cosmwasm.wasm.v1beta1.Msg) + +- [cosmwasm/wasm/v1beta1/genesis.proto](#cosmwasm/wasm/v1beta1/genesis.proto) + - [Code](#cosmwasm.wasm.v1beta1.Code) + - [Contract](#cosmwasm.wasm.v1beta1.Contract) + - [GenesisState](#cosmwasm.wasm.v1beta1.GenesisState) + - [GenesisState.GenMsgs](#cosmwasm.wasm.v1beta1.GenesisState.GenMsgs) + - [Sequence](#cosmwasm.wasm.v1beta1.Sequence) + +- [cosmwasm/wasm/v1beta1/ibc.proto](#cosmwasm/wasm/v1beta1/ibc.proto) + - [MsgIBCCloseChannel](#cosmwasm.wasm.v1beta1.MsgIBCCloseChannel) + - [MsgIBCSend](#cosmwasm.wasm.v1beta1.MsgIBCSend) + +- [cosmwasm/wasm/v1beta1/proposal.proto](#cosmwasm/wasm/v1beta1/proposal.proto) + - [ClearAdminProposal](#cosmwasm.wasm.v1beta1.ClearAdminProposal) + - [InstantiateContractProposal](#cosmwasm.wasm.v1beta1.InstantiateContractProposal) + - [MigrateContractProposal](#cosmwasm.wasm.v1beta1.MigrateContractProposal) + - [PinCodesProposal](#cosmwasm.wasm.v1beta1.PinCodesProposal) + - [StoreCodeProposal](#cosmwasm.wasm.v1beta1.StoreCodeProposal) + - [UnpinCodesProposal](#cosmwasm.wasm.v1beta1.UnpinCodesProposal) + - [UpdateAdminProposal](#cosmwasm.wasm.v1beta1.UpdateAdminProposal) + - [UpdateContractStatusProposal](#cosmwasm.wasm.v1beta1.UpdateContractStatusProposal) + +- [lfb/base/query/v1beta1/pagination.proto](#lfb/base/query/v1beta1/pagination.proto) + - [PageRequest](#lfb.base.query.v1beta1.PageRequest) + - [PageResponse](#lfb.base.query.v1beta1.PageResponse) + +- [cosmwasm/wasm/v1beta1/query.proto](#cosmwasm/wasm/v1beta1/query.proto) + - [CodeInfoResponse](#cosmwasm.wasm.v1beta1.CodeInfoResponse) + - [QueryAllContractStateRequest](#cosmwasm.wasm.v1beta1.QueryAllContractStateRequest) + - [QueryAllContractStateResponse](#cosmwasm.wasm.v1beta1.QueryAllContractStateResponse) + - [QueryCodeRequest](#cosmwasm.wasm.v1beta1.QueryCodeRequest) + - [QueryCodeResponse](#cosmwasm.wasm.v1beta1.QueryCodeResponse) + - [QueryCodesRequest](#cosmwasm.wasm.v1beta1.QueryCodesRequest) + - [QueryCodesResponse](#cosmwasm.wasm.v1beta1.QueryCodesResponse) + - [QueryContractHistoryRequest](#cosmwasm.wasm.v1beta1.QueryContractHistoryRequest) + - [QueryContractHistoryResponse](#cosmwasm.wasm.v1beta1.QueryContractHistoryResponse) + - [QueryContractInfoRequest](#cosmwasm.wasm.v1beta1.QueryContractInfoRequest) + - [QueryContractInfoResponse](#cosmwasm.wasm.v1beta1.QueryContractInfoResponse) + - [QueryContractsByCodeRequest](#cosmwasm.wasm.v1beta1.QueryContractsByCodeRequest) + - [QueryContractsByCodeResponse](#cosmwasm.wasm.v1beta1.QueryContractsByCodeResponse) + - [QueryRawContractStateRequest](#cosmwasm.wasm.v1beta1.QueryRawContractStateRequest) + - [QueryRawContractStateResponse](#cosmwasm.wasm.v1beta1.QueryRawContractStateResponse) + - [QuerySmartContractStateRequest](#cosmwasm.wasm.v1beta1.QuerySmartContractStateRequest) + - [QuerySmartContractStateResponse](#cosmwasm.wasm.v1beta1.QuerySmartContractStateResponse) + + - [Query](#cosmwasm.wasm.v1beta1.Query) + - [ibc/applications/transfer/v1/transfer.proto](#ibc/applications/transfer/v1/transfer.proto) - [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) - [FungibleTokenPacketData](#ibc.applications.transfer.v1.FungibleTokenPacketData) @@ -12,10 +98,6 @@ - [ibc/applications/transfer/v1/genesis.proto](#ibc/applications/transfer/v1/genesis.proto) - [GenesisState](#ibc.applications.transfer.v1.GenesisState) -- [lfb/base/query/v1beta1/pagination.proto](#lfb/base/query/v1beta1/pagination.proto) - - [PageRequest](#lfb.base.query.v1beta1.PageRequest) - - [PageResponse](#lfb.base.query.v1beta1.PageResponse) - - [ibc/applications/transfer/v1/query.proto](#ibc/applications/transfer/v1/query.proto) - [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) - [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) @@ -26,12 +108,6 @@ - [Query](#ibc.applications.transfer.v1.Query) -- [lfb/base/v1beta1/coin.proto](#lfb/base/v1beta1/coin.proto) - - [Coin](#lfb.base.v1beta1.Coin) - - [DecCoin](#lfb.base.v1beta1.DecCoin) - - [DecProto](#lfb.base.v1beta1.DecProto) - - [IntProto](#lfb.base.v1beta1.IntProto) - - [ibc/core/client/v1/client.proto](#ibc/core/client/v1/client.proto) - [ClientConsensusStates](#ibc.core.client.v1.ClientConsensusStates) - [ClientUpdateProposal](#ibc.core.client.v1.ClientUpdateProposal) @@ -197,6 +273,13 @@ - [ibc/lightclients/localhost/v1/localhost.proto](#ibc/lightclients/localhost/v1/localhost.proto) - [ClientState](#ibc.lightclients.localhost.v1.ClientState) +- [ibc/lightclients/ostracon/v1/ostracon.proto](#ibc/lightclients/ostracon/v1/ostracon.proto) + - [ClientState](#ibc.lightclients.ostracon.v1.ClientState) + - [ConsensusState](#ibc.lightclients.ostracon.v1.ConsensusState) + - [Fraction](#ibc.lightclients.ostracon.v1.Fraction) + - [Header](#ibc.lightclients.ostracon.v1.Header) + - [Misbehaviour](#ibc.lightclients.ostracon.v1.Misbehaviour) + - [ibc/lightclients/solomachine/v1/solomachine.proto](#ibc/lightclients/solomachine/v1/solomachine.proto) - [ChannelStateData](#ibc.lightclients.solomachine.v1.ChannelStateData) - [ClientState](#ibc.lightclients.solomachine.v1.ClientState) @@ -217,13 +300,6 @@ - [DataType](#ibc.lightclients.solomachine.v1.DataType) -- [ibc/lightclients/tendermint/v1/tendermint.proto](#ibc/lightclients/tendermint/v1/tendermint.proto) - - [ClientState](#ibc.lightclients.tendermint.v1.ClientState) - - [ConsensusState](#ibc.lightclients.tendermint.v1.ConsensusState) - - [Fraction](#ibc.lightclients.tendermint.v1.Fraction) - - [Header](#ibc.lightclients.tendermint.v1.Header) - - [Misbehaviour](#ibc.lightclients.tendermint.v1.Misbehaviour) - - [lfb/auth/v1beta1/auth.proto](#lfb/auth/v1beta1/auth.proto) - [BaseAccount](#lfb.auth.v1beta1.BaseAccount) - [ModuleAccount](#lfb.auth.v1beta1.ModuleAccount) @@ -700,158 +776,151 @@ - +

Top

-## ibc/applications/transfer/v1/transfer.proto +## cosmwasm/wasm/v1beta1/types.proto - + -### DenomTrace -DenomTrace contains the base denomination for ICS20 fungible tokens and the -source tracing information path. +### AbsoluteTxPosition +AbsoluteTxPosition is a unique transaction position that allows for global +ordering of transactions. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `path` | [string](#string) | | path defines the chain of port/channel identifiers used for tracing the source of the fungible token. | -| `base_denom` | [string](#string) | | base denomination of the relayed fungible token. | +| `block_height` | [uint64](#uint64) | | BlockHeight is the block the contract was created at | +| `tx_index` | [uint64](#uint64) | | TxIndex is a monotonic counter within the block (actual transaction index, or gas consumed) | - + -### FungibleTokenPacketData -FungibleTokenPacketData defines a struct for the packet payload -See FungibleTokenPacketData spec: -https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures +### AccessConfig +AccessConfig access control type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | the token denomination to be transferred | -| `amount` | [uint64](#uint64) | | the token amount to be transferred | -| `sender` | [string](#string) | | the sender address | -| `receiver` | [string](#string) | | the recipient address on the destination chain | +| `permission` | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | | +| `address` | [string](#string) | | | - + -### Params -Params defines the set of IBC transfer parameters. -NOTE: To prevent a single token from being transferred, set the -TransfersEnabled parameter to true and then set the bank module's SendEnabled -parameter for the denomination to false. +### AccessTypeParam +AccessTypeParam | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `send_enabled` | [bool](#bool) | | send_enabled enables or disables all cross-chain token transfers from this chain. | -| `receive_enabled` | [bool](#bool) | | receive_enabled enables or disables all cross-chain token transfers to this chain. | +| `value` | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | | - - + - +### CodeInfo +CodeInfo is data for the uploaded contract WASM code - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_hash` | [bytes](#bytes) | | CodeHash is the unique identifier created by wasmvm | +| `creator` | [string](#string) | | Creator address who initially stored the code | +| `source` | [string](#string) | | Source is a valid absolute HTTPS URI to the contract's source code, optional | +| `builder` | [string](#string) | | Builder is a valid docker image name with tag, optional | +| `instantiate_config` | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | InstantiateConfig access control to apply on contract creation, optional | - -

Top

-## ibc/applications/transfer/v1/genesis.proto - + -### GenesisState -GenesisState defines the ibc-transfer genesis state +### ContractCodeHistoryEntry +ContractCodeHistoryEntry metadata to a contract. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `port_id` | [string](#string) | | | -| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | | -| `params` | [Params](#ibc.applications.transfer.v1.Params) | | | +| `operation` | [ContractCodeHistoryOperationType](#cosmwasm.wasm.v1beta1.ContractCodeHistoryOperationType) | | | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code | +| `updated` | [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition) | | Updated Tx position when the operation was executed. | +| `msg` | [bytes](#bytes) | | | - - - - + - +### ContractInfo +ContractInfo stores a WASM contract instance +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored Wasm code | +| `creator` | [string](#string) | | Creator address who initially instantiated the contract | +| `admin` | [string](#string) | | Admin is an optional address that can execute migrations | +| `label` | [string](#string) | | Label is optional metadata to be stored with a contract instance. | +| `created` | [AbsoluteTxPosition](#cosmwasm.wasm.v1beta1.AbsoluteTxPosition) | | Created Tx position when the contract was instantiated. This data should kept internal and not be exposed via query results. Just use for sorting | +| `ibc_port_id` | [string](#string) | | | +| `status` | [ContractStatus](#cosmwasm.wasm.v1beta1.ContractStatus) | | Status is a status of a contract | +| `extension` | [google.protobuf.Any](#google.protobuf.Any) | | Extension is an extension point to store custom metadata within the persistence model. | - -

Top

-## lfb/base/query/v1beta1/pagination.proto - -### PageRequest -PageRequest is to be embedded in gRPC request messages for efficient -pagination. Ex: + - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } +### Model +Model is a struct that holds a KV pair | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `key` | [bytes](#bytes) | | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | -| `offset` | [uint64](#uint64) | | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | -| `limit` | [uint64](#uint64) | | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | -| `count_total` | [bool](#bool) | | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `key` | [bytes](#bytes) | | hex-encode key to read it better (this is often ascii) | +| `value` | [bytes](#bytes) | | base64-encode raw value | - - -### PageResponse -PageResponse is to be embedded in gRPC response messages where the -corresponding request message has used PageRequest. + - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } +### Params +Params defines the set of wasm parameters. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `next_key` | [bytes](#bytes) | | next_key is the key to be passed to PageRequest.key to query the next page most efficiently | -| `total` | [uint64](#uint64) | | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | +| `code_upload_access` | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | | +| `instantiate_default_permission` | [AccessType](#cosmwasm.wasm.v1beta1.AccessType) | | | +| `contract_status_access` | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | | +| `max_wasm_code_size` | [uint64](#uint64) | | | +| `gas_multiplier` | [uint64](#uint64) | | | +| `instance_cost` | [uint64](#uint64) | | | +| `compile_cost` | [uint64](#uint64) | | | @@ -859,6 +928,47 @@ corresponding request message has used PageRequest. + + + +### AccessType +AccessType permission types + +| Name | Number | Description | +| ---- | ------ | ----------- | +| ACCESS_TYPE_UNSPECIFIED | 0 | AccessTypeUnspecified placeholder for empty value | +| ACCESS_TYPE_NOBODY | 1 | AccessTypeNobody forbidden | +| ACCESS_TYPE_ONLY_ADDRESS | 2 | AccessTypeOnlyAddress restricted to an address | +| ACCESS_TYPE_EVERYBODY | 3 | AccessTypeEverybody unrestricted | + + + + + +### ContractCodeHistoryOperationType +ContractCodeHistoryOperationType actions that caused a code change + +| Name | Number | Description | +| ---- | ------ | ----------- | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED | 0 | ContractCodeHistoryOperationTypeUnspecified placeholder for empty value | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT | 1 | ContractCodeHistoryOperationTypeInit on chain contract instantiation | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE | 2 | ContractCodeHistoryOperationTypeMigrate code migration | +| CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS | 3 | ContractCodeHistoryOperationTypeGenesis based on genesis data | + + + + + +### ContractStatus +ContractStatus types + +| Name | Number | Description | +| ---- | ------ | ----------- | +| CONTRACT_STATUS_UNSPECIFIED | 0 | ContractStatus unspecified | +| CONTRACT_STATUS_ACTIVE | 1 | ContractStatus active | +| CONTRACT_STATUS_INACTIVE | 2 | ContractStatus inactive | + + @@ -867,193 +977,1266 @@ corresponding request message has used PageRequest. - +

Top

-## ibc/applications/transfer/v1/query.proto +## lfb/base/v1beta1/coin.proto - + -### QueryDenomTraceRequest -QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -method +### Coin +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method +signatures required by gogoproto. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `hash` | [string](#string) | | hash (in hex format) of the denomination trace information. | +| `denom` | [string](#string) | | | +| `amount` | [string](#string) | | | - + -### QueryDenomTraceResponse -QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -method. +### DecCoin +DecCoin defines a token with a denomination and a decimal amount. + +NOTE: The amount field is an Dec which implements the custom method +signatures required by gogoproto. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom_trace` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | | denom_trace returns the requested denomination trace information. | +| `denom` | [string](#string) | | | +| `amount` | [string](#string) | | | - + -### QueryDenomTracesRequest -QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -method +### DecProto +DecProto defines a Protobuf wrapper around a Dec object. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [lfb.base.query.v1beta1.PageRequest](#lfb.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `dec` | [string](#string) | | | - + -### QueryDenomTracesResponse -QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -method. +### IntProto +IntProto defines a Protobuf wrapper around an Int object. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | denom_traces returns all denominations trace information. | -| `pagination` | [lfb.base.query.v1beta1.PageResponse](#lfb.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | +| `int` | [string](#string) | | | + - + -### QueryParamsRequest -QueryParamsRequest is the request type for the Query/Params RPC method. + + + + +

Top

+## cosmwasm/wasm/v1beta1/tx.proto - -### QueryParamsResponse -QueryParamsResponse is the response type for the Query/Params RPC method. + + +### MsgClearAdmin +MsgClearAdmin removes any admin stored for a smart contract | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#ibc.applications.transfer.v1.Params) | | params defines the parameters of the module. | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `contract` | [string](#string) | | Contract is the address of the smart contract | - - + - +### MsgClearAdminResponse +MsgClearAdminResponse returns empty data - -### Query -Query provides defines the gRPC querier service. -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/applications/transfer/v1beta1/denom_traces/{hash}| -| `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/applications/transfer/v1beta1/denom_traces| -| `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/applications/transfer/v1beta1/params| - + +### MsgExecuteContract +MsgExecuteContract submits the given message data to a smart contract - -

Top

-## lfb/base/v1beta1/coin.proto +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract | +| `funds` | [lfb.base.v1beta1.Coin](#lfb.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on execution | - -### Coin -Coin defines a token with a denomination and an amount. -NOTE: The amount field is an Int which implements the custom method -signatures required by gogoproto. + + + +### MsgExecuteContractResponse +MsgExecuteContractResponse returns execution result data. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `amount` | [string](#string) | | | +| `data` | [bytes](#bytes) | | Data contains base64-encoded bytes to returned from the contract | - + -### DecCoin -DecCoin defines a token with a denomination and a decimal amount. +### MsgInstantiateContract +MsgInstantiateContract create a new smart contract instance for the given +code id. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `admin` | [string](#string) | | Admin is an optional address that can execute migrations | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code | +| `label` | [string](#string) | | Label is optional metadata to be stored with a contract instance. | +| `init_msg` | [bytes](#bytes) | | InitMsg json encoded message to be passed to the contract on instantiation | +| `funds` | [lfb.base.v1beta1.Coin](#lfb.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation | + + + + + + + + +### MsgInstantiateContractResponse +MsgInstantiateContractResponse return instantiation result data + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | Address is the bech32 address of the new contract instance. | +| `data` | [bytes](#bytes) | | Data contains base64-encoded bytes to returned from the contract | + + + + + + + + +### MsgMigrateContract +MsgMigrateContract runs a code upgrade/ downgrade for a smart contract + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `code_id` | [uint64](#uint64) | | CodeID references the new WASM code | +| `migrate_msg` | [bytes](#bytes) | | MigrateMsg json encoded message to be passed to the contract on migration | + + + + + + + + +### MsgMigrateContractResponse +MsgMigrateContractResponse returns contract migration result data. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | Data contains same raw bytes returned as data from the wasm contract. (May be empty) | + + + + + + + + +### MsgStoreCode +MsgStoreCode submit Wasm code to the system + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `wasm_byte_code` | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed | +| `source` | [string](#string) | | Source is a valid absolute HTTPS URI to the contract's source code, optional | +| `builder` | [string](#string) | | Builder is a valid docker image name with tag, optional | +| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | InstantiatePermission access control to apply on contract creation, optional | + + + + + + + + +### MsgStoreCodeAndInstantiateContract +MsgStoreCodeAndInstantiateContract submit Wasm code to the system and instantiate a contract using it. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `wasm_byte_code` | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed | +| `source` | [string](#string) | | Source is a valid absolute HTTPS URI to the contract's source code, optional | +| `builder` | [string](#string) | | Builder is a valid docker image name with tag, optional | +| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | InstantiatePermission access control to apply on contract creation, optional | +| `admin` | [string](#string) | | Admin is an optional address that can execute migrations | +| `label` | [string](#string) | | Label is optional metadata to be stored with a contract instance. | +| `init_msg` | [bytes](#bytes) | | InitMsg json encoded message to be passed to the contract on instantiation | +| `funds` | [lfb.base.v1beta1.Coin](#lfb.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation | + + + + + + + + +### MsgStoreCodeAndInstantiateContractResponse +MsgStoreCodeAndInstantiateContractResponse returns store and instantiate result data. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code | +| `address` | [string](#string) | | Address is the bech32 address of the new contract instance. | +| `data` | [bytes](#bytes) | | Data contains base64-encoded bytes to returned from the contract | + + + + + + + + +### MsgStoreCodeResponse +MsgStoreCodeResponse returns store result data. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code | + + + + + + + + +### MsgUpdateAdmin +MsgUpdateAdmin sets a new admin for a smart contract + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `new_admin` | [string](#string) | | NewAdmin address to be set | +| `contract` | [string](#string) | | Contract is the address of the smart contract | + + + + + + + + +### MsgUpdateAdminResponse +MsgUpdateAdminResponse returns empty data + + + + + + + + +### MsgUpdateContractStatus +MsgUpdateContractStatus sets a new status for a smart contract + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | Sender is the that actor that signed the messages | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `status` | [ContractStatus](#cosmwasm.wasm.v1beta1.ContractStatus) | | Status to be set | + + + + + + + + +### MsgUpdateContractStatusResponse +MsgUpdateContractStatusResponse returns empty data + + + + + + + + + + + + + + +### Msg +Msg defines the wasm Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `StoreCode` | [MsgStoreCode](#cosmwasm.wasm.v1beta1.MsgStoreCode) | [MsgStoreCodeResponse](#cosmwasm.wasm.v1beta1.MsgStoreCodeResponse) | StoreCode to submit Wasm code to the system | | +| `InstantiateContract` | [MsgInstantiateContract](#cosmwasm.wasm.v1beta1.MsgInstantiateContract) | [MsgInstantiateContractResponse](#cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse) | Instantiate creates a new smart contract instance for the given code id. | | +| `StoreCodeAndInstantiateContract` | [MsgStoreCodeAndInstantiateContract](#cosmwasm.wasm.v1beta1.MsgStoreCodeAndInstantiateContract) | [MsgStoreCodeAndInstantiateContractResponse](#cosmwasm.wasm.v1beta1.MsgStoreCodeAndInstantiateContractResponse) | StoreCodeAndInstantiatecontract upload code and instantiate a contract using it. | | +| `ExecuteContract` | [MsgExecuteContract](#cosmwasm.wasm.v1beta1.MsgExecuteContract) | [MsgExecuteContractResponse](#cosmwasm.wasm.v1beta1.MsgExecuteContractResponse) | Execute submits the given message data to a smart contract | | +| `MigrateContract` | [MsgMigrateContract](#cosmwasm.wasm.v1beta1.MsgMigrateContract) | [MsgMigrateContractResponse](#cosmwasm.wasm.v1beta1.MsgMigrateContractResponse) | Migrate runs a code upgrade/ downgrade for a smart contract | | +| `UpdateAdmin` | [MsgUpdateAdmin](#cosmwasm.wasm.v1beta1.MsgUpdateAdmin) | [MsgUpdateAdminResponse](#cosmwasm.wasm.v1beta1.MsgUpdateAdminResponse) | UpdateAdmin sets a new admin for a smart contract | | +| `ClearAdmin` | [MsgClearAdmin](#cosmwasm.wasm.v1beta1.MsgClearAdmin) | [MsgClearAdminResponse](#cosmwasm.wasm.v1beta1.MsgClearAdminResponse) | ClearAdmin removes any admin stored for a smart contract | | +| `UpdateContractStatus` | [MsgUpdateContractStatus](#cosmwasm.wasm.v1beta1.MsgUpdateContractStatus) | [MsgUpdateContractStatusResponse](#cosmwasm.wasm.v1beta1.MsgUpdateContractStatusResponse) | UpdateContractStatus sets a new status for a smart contract | | + + + + + + +

Top

+ +## cosmwasm/wasm/v1beta1/genesis.proto + + + + + +### Code +Code struct encompasses CodeInfo and CodeBytes + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | | +| `code_info` | [CodeInfo](#cosmwasm.wasm.v1beta1.CodeInfo) | | | +| `code_bytes` | [bytes](#bytes) | | | +| `pinned` | [bool](#bool) | | Pinned to wasmvm cache | + + + + + + + + +### Contract +Contract struct encompasses ContractAddress, ContractInfo, and ContractState + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `contract_address` | [string](#string) | | | +| `contract_info` | [ContractInfo](#cosmwasm.wasm.v1beta1.ContractInfo) | | | +| `contract_state` | [Model](#cosmwasm.wasm.v1beta1.Model) | repeated | | + + + + + + + + +### GenesisState +GenesisState - genesis state of x/wasm + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cosmwasm.wasm.v1beta1.Params) | | | +| `codes` | [Code](#cosmwasm.wasm.v1beta1.Code) | repeated | | +| `contracts` | [Contract](#cosmwasm.wasm.v1beta1.Contract) | repeated | | +| `sequences` | [Sequence](#cosmwasm.wasm.v1beta1.Sequence) | repeated | | +| `gen_msgs` | [GenesisState.GenMsgs](#cosmwasm.wasm.v1beta1.GenesisState.GenMsgs) | repeated | | + + + + + + + + +### GenesisState.GenMsgs +GenMsgs define the messages that can be executed during genesis phase in order. +The intention is to have more human readable data that is auditable. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `store_code` | [MsgStoreCode](#cosmwasm.wasm.v1beta1.MsgStoreCode) | | | +| `instantiate_contract` | [MsgInstantiateContract](#cosmwasm.wasm.v1beta1.MsgInstantiateContract) | | | +| `execute_contract` | [MsgExecuteContract](#cosmwasm.wasm.v1beta1.MsgExecuteContract) | | | + + + + + + + + +### Sequence +Sequence key and value of an id generation counter + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id_key` | [bytes](#bytes) | | | +| `value` | [uint64](#uint64) | | | + + + + + + + + + + + + + + + + +

Top

+ +## cosmwasm/wasm/v1beta1/ibc.proto + + + + + +### MsgIBCCloseChannel +MsgIBCCloseChannel port and channel need to be owned by the contract + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `channel` | [string](#string) | | | + + + + + + + + +### MsgIBCSend +MsgIBCSend + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `channel` | [string](#string) | | the channel by which the packet will be sent | +| `timeout_height` | [uint64](#uint64) | | Timeout height relative to the current block height. The timeout is disabled when set to 0. | +| `timeout_timestamp` | [uint64](#uint64) | | Timeout timestamp (in nanoseconds) relative to the current block timestamp. The timeout is disabled when set to 0. | +| `data` | [bytes](#bytes) | | data is the payload to transfer | + + + + + + + + + + + + + + + + +

Top

+ +## cosmwasm/wasm/v1beta1/proposal.proto + + + + + +### ClearAdminProposal +ClearAdminProposal gov proposal content type to clear the admin of a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `contract` | [string](#string) | | Contract is the address of the smart contract | + + + + + + + + +### InstantiateContractProposal +InstantiateContractProposal gov proposal content type to instantiate a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | +| `admin` | [string](#string) | | Admin is an optional address that can execute migrations | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code | +| `label` | [string](#string) | | Label is optional metadata to be stored with a constract instance. | +| `init_msg` | [bytes](#bytes) | | InitMsg json encoded message to be passed to the contract on instantiation | +| `funds` | [lfb.base.v1beta1.Coin](#lfb.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation | + + + + + + + + +### MigrateContractProposal +MigrateContractProposal gov proposal content type to migrate a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `code_id` | [uint64](#uint64) | | CodeID references the new WASM code | +| `migrate_msg` | [bytes](#bytes) | | MigrateMsg json encoded message to be passed to the contract on migration | + + + + + + + + +### PinCodesProposal +PinCodesProposal gov proposal content type to pin a set of code ids in the wasmvm cache. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `code_ids` | [uint64](#uint64) | repeated | CodeIDs references the new WASM codes | + + + + + + + + +### StoreCodeProposal +StoreCodeProposal gov proposal content type to submit WASM code to the system + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | +| `wasm_byte_code` | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed | +| `source` | [string](#string) | | Source is a valid absolute HTTPS URI to the contract's source code, optional | +| `builder` | [string](#string) | | Builder is a valid docker image name with tag, optional | +| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1beta1.AccessConfig) | | InstantiatePermission to apply on contract creation, optional | + + + + + + + + +### UnpinCodesProposal +UnpinCodesProposal gov proposal content type to unpin a set of code ids in the wasmvm cache. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `code_ids` | [uint64](#uint64) | repeated | CodeIDs references the WASM codes | + + + + + + + + +### UpdateAdminProposal +UpdateAdminProposal gov proposal content type to set an admin for a contract. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `new_admin` | [string](#string) | | NewAdmin address to be set | +| `contract` | [string](#string) | | Contract is the address of the smart contract | + + + + + + + + +### UpdateContractStatusProposal +UpdateStatusProposal gov proposal content type to update the contract status. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `status` | [ContractStatus](#cosmwasm.wasm.v1beta1.ContractStatus) | | Status to be set | + + + + + + + + + + + + + + + + +

Top

+ +## lfb/base/query/v1beta1/pagination.proto + + + + + +### PageRequest +PageRequest is to be embedded in gRPC request messages for efficient +pagination. Ex: + + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [bytes](#bytes) | | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | [uint64](#uint64) | | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | [uint64](#uint64) | | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | [bool](#bool) | | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | + + + + + + + + +### PageResponse +PageResponse is to be embedded in gRPC response messages where the +corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `next_key` | [bytes](#bytes) | | next_key is the key to be passed to PageRequest.key to query the next page most efficiently | +| `total` | [uint64](#uint64) | | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + + + + + + + + + + + + + + + +

Top

+ +## cosmwasm/wasm/v1beta1/query.proto + + + + + +### CodeInfoResponse +CodeInfoResponse contains code meta data from CodeInfo + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | id for legacy support | +| `creator` | [string](#string) | | | +| `data_hash` | [bytes](#bytes) | | | +| `source` | [string](#string) | | | +| `builder` | [string](#string) | | | + + + + + + + + +### QueryAllContractStateRequest +QueryAllContractStateRequest is the request type for the Query/AllContractState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the address of the contract | +| `pagination` | [lfb.base.query.v1beta1.PageRequest](#lfb.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryAllContractStateResponse +QueryAllContractStateResponse is the response type for the +Query/AllContractState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `models` | [Model](#cosmwasm.wasm.v1beta1.Model) | repeated | | +| `pagination` | [lfb.base.query.v1beta1.PageResponse](#lfb.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryCodeRequest +QueryCodeRequest is the request type for the Query/Code RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | grpc-gateway_out does not support Go style CodID | + + + + + + + + +### QueryCodeResponse +QueryCodeResponse is the response type for the Query/Code RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_info` | [CodeInfoResponse](#cosmwasm.wasm.v1beta1.CodeInfoResponse) | | | +| `data` | [bytes](#bytes) | | | + + + + + + + + +### QueryCodesRequest +QueryCodesRequest is the request type for the Query/Codes RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [lfb.base.query.v1beta1.PageRequest](#lfb.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryCodesResponse +QueryCodesResponse is the response type for the Query/Codes RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_infos` | [CodeInfoResponse](#cosmwasm.wasm.v1beta1.CodeInfoResponse) | repeated | | +| `pagination` | [lfb.base.query.v1beta1.PageResponse](#lfb.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryContractHistoryRequest +QueryContractHistoryRequest is the request type for the Query/ContractHistory RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the address of the contract to query | +| `pagination` | [lfb.base.query.v1beta1.PageRequest](#lfb.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryContractHistoryResponse +QueryContractHistoryResponse is the response type for the Query/ContractHistory RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `entries` | [ContractCodeHistoryEntry](#cosmwasm.wasm.v1beta1.ContractCodeHistoryEntry) | repeated | | +| `pagination` | [lfb.base.query.v1beta1.PageResponse](#lfb.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryContractInfoRequest +QueryContractInfoRequest is the request type for the Query/ContractInfo RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the address of the contract to query | + + + + + + + + +### QueryContractInfoResponse +QueryContractInfoResponse is the response type for the Query/ContractInfo RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the address of the contract | +| `contract_info` | [ContractInfo](#cosmwasm.wasm.v1beta1.ContractInfo) | | | + + + + + + + + +### QueryContractsByCodeRequest +QueryContractsByCodeRequest is the request type for the Query/ContractsByCode RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | grpc-gateway_out does not support Go style CodID | +| `pagination` | [lfb.base.query.v1beta1.PageRequest](#lfb.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryContractsByCodeResponse +QueryContractsByCodeResponse is the response type for the +Query/ContractsByCode RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `contracts` | [string](#string) | repeated | contracts are a set of contract addresses | +| `pagination` | [lfb.base.query.v1beta1.PageResponse](#lfb.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | + + + + + + + + +### QueryRawContractStateRequest +QueryRawContractStateRequest is the request type for the +Query/RawContractState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the address of the contract | +| `query_data` | [bytes](#bytes) | | | + + + + + + + + +### QueryRawContractStateResponse +QueryRawContractStateResponse is the response type for the +Query/RawContractState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | Data contains the raw store data | + + + + + + + + +### QuerySmartContractStateRequest +QuerySmartContractStateRequest is the request type for the +Query/SmartContractState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `address` | [string](#string) | | address is the address of the contract | +| `query_data` | [bytes](#bytes) | | QueryData contains the query data passed to the contract | + + + + + + + + +### QuerySmartContractStateResponse +QuerySmartContractStateResponse is the response type for the +Query/SmartContractState RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `data` | [bytes](#bytes) | | Data contains the json data returned from the smart contract | + + + + + + + + + + + + + + +### Query +Query provides defines the gRPC querier service + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ContractInfo` | [QueryContractInfoRequest](#cosmwasm.wasm.v1beta1.QueryContractInfoRequest) | [QueryContractInfoResponse](#cosmwasm.wasm.v1beta1.QueryContractInfoResponse) | ContractInfo gets the contract meta data | GET|/wasm/v1beta1/contract/{address}| +| `ContractHistory` | [QueryContractHistoryRequest](#cosmwasm.wasm.v1beta1.QueryContractHistoryRequest) | [QueryContractHistoryResponse](#cosmwasm.wasm.v1beta1.QueryContractHistoryResponse) | ContractHistory gets the contract code history | GET|/wasm/v1beta1/contract/{address}/history| +| `ContractsByCode` | [QueryContractsByCodeRequest](#cosmwasm.wasm.v1beta1.QueryContractsByCodeRequest) | [QueryContractsByCodeResponse](#cosmwasm.wasm.v1beta1.QueryContractsByCodeResponse) | ContractsByCode lists all smart contracts for a code id | GET|/wasm/v1beta1/code/{code_id}/contracts| +| `AllContractState` | [QueryAllContractStateRequest](#cosmwasm.wasm.v1beta1.QueryAllContractStateRequest) | [QueryAllContractStateResponse](#cosmwasm.wasm.v1beta1.QueryAllContractStateResponse) | AllContractState gets all raw store data for a single contract | GET|/wasm/v1beta1/contract/{address}/state| +| `RawContractState` | [QueryRawContractStateRequest](#cosmwasm.wasm.v1beta1.QueryRawContractStateRequest) | [QueryRawContractStateResponse](#cosmwasm.wasm.v1beta1.QueryRawContractStateResponse) | RawContractState gets single key from the raw store data of a contract | GET|/wasm/v1beta1/contract/{address}/raw/{query_data}| +| `SmartContractState` | [QuerySmartContractStateRequest](#cosmwasm.wasm.v1beta1.QuerySmartContractStateRequest) | [QuerySmartContractStateResponse](#cosmwasm.wasm.v1beta1.QuerySmartContractStateResponse) | SmartContractState get smart query result from the contract | GET|/wasm/v1beta1/contract/{address}/smart/{query_data}| +| `Code` | [QueryCodeRequest](#cosmwasm.wasm.v1beta1.QueryCodeRequest) | [QueryCodeResponse](#cosmwasm.wasm.v1beta1.QueryCodeResponse) | Code gets the binary code and metadata for a singe wasm code | GET|/wasm/v1beta1/code/{code_id}| +| `Codes` | [QueryCodesRequest](#cosmwasm.wasm.v1beta1.QueryCodesRequest) | [QueryCodesResponse](#cosmwasm.wasm.v1beta1.QueryCodesResponse) | Codes gets the metadata for all stored wasm codes | GET|/wasm/v1beta1/code| + + + + + + +

Top

+ +## ibc/applications/transfer/v1/transfer.proto + + + + + +### DenomTrace +DenomTrace contains the base denomination for ICS20 fungible tokens and the +source tracing information path. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `path` | [string](#string) | | path defines the chain of port/channel identifiers used for tracing the source of the fungible token. | +| `base_denom` | [string](#string) | | base denomination of the relayed fungible token. | + + + + + + + + +### FungibleTokenPacketData +FungibleTokenPacketData defines a struct for the packet payload +See FungibleTokenPacketData spec: +https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom` | [string](#string) | | the token denomination to be transferred | +| `amount` | [uint64](#uint64) | | the token amount to be transferred | +| `sender` | [string](#string) | | the sender address | +| `receiver` | [string](#string) | | the recipient address on the destination chain | + + + + + + + + +### Params +Params defines the set of IBC transfer parameters. +NOTE: To prevent a single token from being transferred, set the +TransfersEnabled parameter to true and then set the bank module's SendEnabled +parameter for the denomination to false. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `send_enabled` | [bool](#bool) | | send_enabled enables or disables all cross-chain token transfers from this chain. | +| `receive_enabled` | [bool](#bool) | | receive_enabled enables or disables all cross-chain token transfers to this chain. | + + + + + + + + + + + + + + + + +

Top

+ +## ibc/applications/transfer/v1/genesis.proto + + + + + +### GenesisState +GenesisState defines the ibc-transfer genesis state + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `port_id` | [string](#string) | | | +| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | | +| `params` | [Params](#ibc.applications.transfer.v1.Params) | | | + + + + + + + + + + + + + + + + +

Top

+ +## ibc/applications/transfer/v1/query.proto + + + + + +### QueryDenomTraceRequest +QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `hash` | [string](#string) | | hash (in hex format) of the denomination trace information. | + + + + + + + + +### QueryDenomTraceResponse +QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +method. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denom_trace` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | | denom_trace returns the requested denomination trace information. | + + + + + + + + +### QueryDenomTracesRequest +QueryConnectionsRequest is the request type for the Query/DenomTraces RPC +method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [lfb.base.query.v1beta1.PageRequest](#lfb.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + -NOTE: The amount field is an Dec which implements the custom method -signatures required by gogoproto. +### QueryDenomTracesResponse +QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `denom` | [string](#string) | | | -| `amount` | [string](#string) | | | - - +| `denom_traces` | [DenomTrace](#ibc.applications.transfer.v1.DenomTrace) | repeated | denom_traces returns all denominations trace information. | +| `pagination` | [lfb.base.query.v1beta1.PageResponse](#lfb.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - -### DecProto -DecProto defines a Protobuf wrapper around a Dec object. + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `dec` | [string](#string) | | | +### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. - + -### IntProto -IntProto defines a Protobuf wrapper around an Int object. +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `int` | [string](#string) | | | +| `params` | [Params](#ibc.applications.transfer.v1.Params) | | params defines the parameters of the module. | @@ -1065,6 +2248,18 @@ IntProto defines a Protobuf wrapper around an Int object. + + + +### Query +Query provides defines the gRPC querier service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/applications/transfer/v1beta1/denom_traces/{hash}| +| `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/applications/transfer/v1beta1/denom_traces| +| `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/applications/transfer/v1beta1/params| + @@ -3393,6 +4588,130 @@ access to keys outside the client prefix. + + + + + + + + + + + +

Top

+ +## ibc/lightclients/ostracon/v1/ostracon.proto + + + + + +### ClientState +ClientState from Ostracon tracks the current validator set, latest height, +and a possible frozen height. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `chain_id` | [string](#string) | | | +| `trust_level` | [Fraction](#ibc.lightclients.ostracon.v1.Fraction) | | | +| `trusting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the period since the LastestTimestamp during which the submitted headers are valid for upgrade | +| `unbonding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the staking unbonding period | +| `max_clock_drift` | [google.protobuf.Duration](#google.protobuf.Duration) | | defines how much new (untrusted) header's Time can drift into the future. | +| `frozen_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Block height when the client was frozen due to a misbehaviour | +| `latest_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Latest height the client was updated to | +| `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | Proof specifications used in verifying counterparty state | +| `upgrade_path` | [string](#string) | repeated | Path at which next upgraded client will be committed. Each element corresponds to the key for a single CommitmentProof in the chained proof. NOTE: ClientState must stored under `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using the default upgrade module, upgrade_path should be []string{"upgrade", "upgradedIBCState"}` | +| `allow_update_after_expiry` | [bool](#bool) | | This flag, when set to true, will allow governance to recover a client which has expired | +| `allow_update_after_misbehaviour` | [bool](#bool) | | This flag, when set to true, will allow governance to unfreeze a client whose chain has experienced a misbehaviour event | + + + + + + + + +### ConsensusState +ConsensusState defines the consensus state from Ostracon. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp that corresponds to the block height in which the ConsensusState was stored. | +| `root` | [ibc.core.commitment.v1.MerkleRoot](#ibc.core.commitment.v1.MerkleRoot) | | commitment root (i.e app hash) | +| `next_validators_hash` | [bytes](#bytes) | | | + + + + + + + + +### Fraction +Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `numerator` | [uint64](#uint64) | | | +| `denominator` | [uint64](#uint64) | | | + + + + + + + + +### Header +Header defines the Ostracon client consensus Header. +It encapsulates all the information necessary to update from a trusted +Ostracon ConsensusState. The inclusion of TrustedHeight and +TrustedValidators allows this update to process correctly, so long as the +ConsensusState for the TrustedHeight exists, this removes race conditions +among relayers The SignedHeader and ValidatorSet are the new untrusted update +fields for the client. The TrustedHeight is the height of a stored +ConsensusState on the client that will be used to verify the new untrusted +header. The Trusted ConsensusState must be within the unbonding period of +current time in order to correctly verify, and the TrustedValidators must +hash to TrustedConsensusState.NextValidatorsHash since that is the last +trusted validator set at the TrustedHeight. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `signed_header` | [ostracon.types.SignedHeader](#ostracon.types.SignedHeader) | | | +| `validator_set` | [ostracon.types.ValidatorSet](#ostracon.types.ValidatorSet) | | | +| `voter_set` | [ostracon.types.VoterSet](#ostracon.types.VoterSet) | | | +| `trusted_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | +| `trusted_validators` | [ostracon.types.ValidatorSet](#ostracon.types.ValidatorSet) | | | +| `trusted_voters` | [ostracon.types.VoterSet](#ostracon.types.VoterSet) | | | + + + + + + + + +### Misbehaviour +Misbehaviour is a wrapper over two conflicting Headers +that implements Misbehaviour interface expected by ICS-02 + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `client_id` | [string](#string) | | | +| `header_1` | [Header](#ibc.lightclients.ostracon.v1.Header) | | | +| `header_2` | [Header](#ibc.lightclients.ostracon.v1.Header) | | | + + + + + @@ -3720,128 +5039,6 @@ data sign byte encodings. - -

Top

- -## ibc/lightclients/tendermint/v1/tendermint.proto - - - - - -### ClientState -ClientState from Tendermint tracks the current validator set, latest height, -and a possible frozen height. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `chain_id` | [string](#string) | | | -| `trust_level` | [Fraction](#ibc.lightclients.tendermint.v1.Fraction) | | | -| `trusting_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the period since the LastestTimestamp during which the submitted headers are valid for upgrade | -| `unbonding_period` | [google.protobuf.Duration](#google.protobuf.Duration) | | duration of the staking unbonding period | -| `max_clock_drift` | [google.protobuf.Duration](#google.protobuf.Duration) | | defines how much new (untrusted) header's Time can drift into the future. | -| `frozen_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Block height when the client was frozen due to a misbehaviour | -| `latest_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | Latest height the client was updated to | -| `proof_specs` | [ics23.ProofSpec](#ics23.ProofSpec) | repeated | Proof specifications used in verifying counterparty state | -| `upgrade_path` | [string](#string) | repeated | Path at which next upgraded client will be committed. Each element corresponds to the key for a single CommitmentProof in the chained proof. NOTE: ClientState must stored under `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using the default upgrade module, upgrade_path should be []string{"upgrade", "upgradedIBCState"}` | -| `allow_update_after_expiry` | [bool](#bool) | | This flag, when set to true, will allow governance to recover a client which has expired | -| `allow_update_after_misbehaviour` | [bool](#bool) | | This flag, when set to true, will allow governance to unfreeze a client whose chain has experienced a misbehaviour event | - - - - - - - - -### ConsensusState -ConsensusState defines the consensus state from Tendermint. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `timestamp` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | timestamp that corresponds to the block height in which the ConsensusState was stored. | -| `root` | [ibc.core.commitment.v1.MerkleRoot](#ibc.core.commitment.v1.MerkleRoot) | | commitment root (i.e app hash) | -| `next_validators_hash` | [bytes](#bytes) | | | - - - - - - - - -### Fraction -Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `numerator` | [uint64](#uint64) | | | -| `denominator` | [uint64](#uint64) | | | - - - - - - - - -### Header -Header defines the Tendermint client consensus Header. -It encapsulates all the information necessary to update from a trusted -Tendermint ConsensusState. The inclusion of TrustedHeight and -TrustedValidators allows this update to process correctly, so long as the -ConsensusState for the TrustedHeight exists, this removes race conditions -among relayers The SignedHeader and ValidatorSet are the new untrusted update -fields for the client. The TrustedHeight is the height of a stored -ConsensusState on the client that will be used to verify the new untrusted -header. The Trusted ConsensusState must be within the unbonding period of -current time in order to correctly verify, and the TrustedValidators must -hash to TrustedConsensusState.NextValidatorsHash since that is the last -trusted validator set at the TrustedHeight. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `signed_header` | [ostracon.types.SignedHeader](#ostracon.types.SignedHeader) | | | -| `validator_set` | [ostracon.types.ValidatorSet](#ostracon.types.ValidatorSet) | | | -| `trusted_height` | [ibc.core.client.v1.Height](#ibc.core.client.v1.Height) | | | -| `trusted_validators` | [ostracon.types.ValidatorSet](#ostracon.types.ValidatorSet) | | | - - - - - - - - -### Misbehaviour -Misbehaviour is a wrapper over two conflicting Headers -that implements Misbehaviour interface expected by ICS-02 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `client_id` | [string](#string) | | | -| `header_1` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | -| `header_2` | [Header](#ibc.lightclients.tendermint.v1.Header) | | | - - - - - - - - - - - - - - -

Top

@@ -8299,7 +9496,7 @@ Description defines a validator description. ### HistoricalInfo -HistoricalInfo contains header and validator information for a given block. +HistoricalInfo contains header and validator, voter information for a given block. It is stored as part of staking module's state, which persists the `n` most recent HistoricalInfo (`n` is set by the staking module's `historical_entries` parameter). diff --git a/go.mod b/go.mod index d2e3e9ac3b..f5198ab44a 100644 --- a/go.mod +++ b/go.mod @@ -18,29 +18,20 @@ require ( github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 github.com/go-kit/kit v0.11.0 - github.com/go-lintpack/lintpack v0.5.2 // indirect github.com/gogo/gateway v1.1.0 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.4.4 github.com/golang/protobuf v1.5.2 - github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6 // indirect - github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3 // indirect - github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee // indirect - github.com/golangci/golangci-lint v1.41.1 // indirect - github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc // indirect - github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21 // indirect github.com/google/gofuzz v1.2.0 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5 // indirect - github.com/klauspost/cpuid v1.2.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/line/iavl/v2 v2.0.0-init.1.0.20210602045707-fddfe1f85001 - github.com/line/ostracon v0.34.9-0.20210610071151-a52812ac9add - github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524 + github.com/line/ostracon v0.34.9-0.20210906083237-658e85d9b160 + github.com/line/tm-db/v2 v2.0.0-init.1.0.20210824011847-fcfa67dd3c70 github.com/line/wasmvm v0.14.0-0.6.1 github.com/magiconair/properties v1.8.5 github.com/mailru/easyjson v0.7.7 @@ -56,11 +47,9 @@ require ( github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 github.com/rs/zerolog v1.23.0 - github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada // indirect github.com/spf13/afero v1.3.4 // indirect github.com/spf13/cast v1.3.1 github.com/spf13/cobra v1.1.3 - github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.1 github.com/stretchr/testify v1.7.0 @@ -68,15 +57,12 @@ require ( github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 - github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa // indirect - github.com/ugorji/go v1.1.4 // indirect golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c google.golang.org/grpc v1.39.0 google.golang.org/protobuf v1.27.1 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 - sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 // indirect ) replace ( diff --git a/go.sum b/go.sum index bfd5a62550..c7aac39621 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,3 @@ -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a h1:wFEQiK85fRsEVF0CRrPAos5LoAryUsIX1kPW/WrIqFw= -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= -bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -13,7 +10,6 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -29,18 +25,15 @@ cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2k cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= -cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= @@ -49,23 +42,11 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OpenPeeDeeP/depguard v1.0.1 h1:VlW4R6jmBIv3/u1JNlawEvJMM4J+dPORPaZasQee8Us= -github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.8/go.mod h1:SiMZNgwEPJ9qWLshu9tyuE6bKc9ZWYhcNV/L7jurprQ= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= @@ -75,19 +56,15 @@ github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9 github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= -github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -98,15 +75,8 @@ github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4 github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/ashanbrown/forbidigo v1.2.0 h1:RMlEFupPCxQ1IogYOQUnIQwGEUGK8g5vAPMRyJoSxbc= -github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde h1:YOsoVXsZQPA9aOTy1g0lAJv5VzZUvwQuZqug8XPeqfM= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= -github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.7.0/go.mod h1:tb9wi5s61kTDA5qCkcDbt3KRVV74GGslQkl/DRdX/P4= @@ -119,10 +89,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7A= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= -github.com/bombsimon/wsl/v3 v3.3.0 h1:Mka/+kRLoQJq7g2rggtgQsjuI/K5Efd87WX96EWFxjM= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= @@ -149,10 +116,6 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charithe/durationcheck v0.0.8 h1:cnZrThioNW9gSV5JsRIXmkyHUbcDH7Y9hkzFDVc9/j0= -github.com/charithe/durationcheck v0.0.8/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af h1:spmv8nSH9h5oCQf40jt/ufBCt9j0/58u4G+rkeMqXGI= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -165,6 +128,8 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.6 h1:pkOy18YxxJ/r0XFDCnrl4Bjv6h4LkBSpLS6F38mrKL8= github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= +github.com/coniks-sys/coniks-go v0.0.0-20180722014011-11acf4819b71 h1:MFLTqgfJclmtaQ1SRUrWwmDX/1UBok3XWUethkJ2swQ= +github.com/coniks-sys/coniks-go v0.0.0-20180722014011-11acf4819b71/go.mod h1:TrHYHH4Wze7v7Hkwu1MH1W+mCPQKM+gs+PicdEV14o8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -173,7 +138,6 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= @@ -189,18 +153,13 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= -github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= -github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/denis-tingajkin/go-header v0.4.2 h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7qg9dX7pc218= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -223,12 +182,7 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4pn2T/hjXMbvwTr1Cvy5THHrQkbeY9HRk= github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/esimonov/ifshort v1.0.2 h1:K5s1W2fGfkoWXsFlxBNqT6J0ZCncPaKrGM5qe0bni68= -github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= @@ -239,13 +193,10 @@ github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpm github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc= -github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -253,12 +204,11 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= -github.com/fzipp/gocyclo v0.3.1 h1:A9UeX3HJSXTBzvHzhqoYVuE0eAhe+aM8XBCCwsPMZOc= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-critic/go-critic v0.5.6 h1:siUR1+322iVikWXoV75I1YRfNaC/yaLzhdF9Zwd8Tus= -github.com/go-critic/go-critic v0.5.6/go.mod h1:cVjj0DfqewQVIlIAGexPCaGaZDAqGE29PYDDADIVNEo= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -268,52 +218,22 @@ github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgO github.com/go-kit/kit v0.11.0 h1:IGmIEl7aHTYh6E2HlT+ptILBotjo4xl8PMDl852etiI= github.com/go-kit/kit v0.11.0/go.mod h1:73/6Ixaufkvb5Osvkls8C79vuQ49Ba1rUEUYNSf+FUw= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= -github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0 h1:OMgl1b1MEpjFQ1m5ztEO06rz5CUd3oBv9RF7+DyvdG8= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= -github.com/go-toolsmith/astfmt v1.0.0 h1:A0vDDXt+vsvLEdbMFJAUBI/uTbRw1ffOPnxsILnFL6k= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= -github.com/go-toolsmith/astp v1.0.0 h1:alXE75TXgcmupDsMK1fRAy0YUzLzqPVvBKoyWV+KPXg= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= -github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.0 h1:MSdYClljsF3PbENUUEx85nkWfJSGfzYI9yEBZOJz6CY= -github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -327,7 +247,6 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -350,36 +269,9 @@ github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8l github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 h1:23T5iq8rbUYlhpt5DB4XJkc6BU31uODLD1o1gKvZmD0= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZBf8NjltjWihK2QfBBBZuv91cMFfDHw= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= -github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.41.1 h1:KH28pTSqRu6DTXIAANl1sPXNCmqg4VEH21z6G9Wj4SM= -github.com/golangci/golangci-lint v1.41.1/go.mod h1:LPtcY3aAAU8wydHrKpnanx9Og8K/cblZSyGmI5CJZUk= -github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5 h1:c9Mqqrm/Clj5biNaG7rABrmwUq88nHh0uABo2b/WYmc= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -387,7 +279,6 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= @@ -404,23 +295,14 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= -github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254 h1:Nb2aRlC404yz7gQIfRZxX9/MLvQiqXyiBTJtgAy6yrI= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -429,22 +311,8 @@ github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1 h1:/7clKqrVfiVwiBQLM0Uke4KvXnO6JcCTS7HwF2D6wG8= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1 h1:xHopR5L2lRz6OsjH4R2HG5wRhW9ySl3FsHIvi5pcXwc= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5 h1:rx8127mFPqXXsfPSo8BwnIU97MKFZc89WHAHt8PwDVY= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= @@ -454,7 +322,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= @@ -470,7 +337,6 @@ github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+Xbo github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -480,8 +346,6 @@ github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -505,35 +369,23 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/herumi/bls-eth-go-binary v0.0.0-20200923072303-32b29e5d8cbf h1:Lw7EOMVxu3O+7Ro5bqn9M20a7GwuCqZQsmdXNzmcKE4= +github.com/herumi/bls-eth-go-binary v0.0.0-20200923072303-32b29e5d8cbf/go.mod h1:luAnRm3OsMQeokhGzpYmc0ZKwawY7o87PUEP11Z7r7U= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM= -github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= -github.com/jingyugao/rowserrcheck v1.1.0 h1:u6h4eiNuCLqk73Ic5TXQq9yZS+uEXTdusn7c3w1Mr6A= -github.com/jingyugao/rowserrcheck v1.1.0/go.mod h1:TOQpc2SLx6huPfoFGK3UOnEG+u02D3C1GeosjupAKCA= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= -github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -548,27 +400,18 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d h1:XeSMXURZPtUffuWAaq90o6kLgZdgu+QA8wk4MPC8ikI= -github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= -github.com/kisielk/errcheck v1.6.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -578,21 +421,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.4.0 h1:2Nx7XbdbE/BYZeoip2mURKUdtHQRuy6Ug+wR7K9ywNM= -github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.2 h1:/jJRv0TiqPoEy/Y8dQxCFJhD56uS/pnvtatgTZBHokU= -github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/ldez/gomoddirectives v0.2.1 h1:9pAcW9KRZW7HQjFwbozNvFMcNVwdCBufU7os5QUwLIY= -github.com/ldez/gomoddirectives v0.2.1/go.mod h1:sGicqkRgBOg//JfpXwkB9Hj0X5RyJ7mlACM5B9f6Me4= -github.com/ldez/tagliatelle v0.2.0 h1:693V8Bf1NdShJ8eu/s84QySA0J2VWBanVBa2WwXD/Wk= -github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= -github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= @@ -602,28 +430,22 @@ github.com/line/gorocksdb v0.0.0-20210406043732-d4bea34b6d55/go.mod h1:DHRJroSL7 github.com/line/iavl/v2 v2.0.0-init.1.0.20210602045707-fddfe1f85001 h1:c2URk0zxM1vRgaRfIFoWkLzvj17nl/To9Q3NUVwY4+g= github.com/line/iavl/v2 v2.0.0-init.1.0.20210602045707-fddfe1f85001/go.mod h1:0Xz+0i1nlB9lrjUDEwpDRhcmjfEAkOjd20dRb40FBso= github.com/line/ostracon v0.34.9-0.20210429084710-ef4fe0a40c7d/go.mod h1:ttnbq+yQJMQ9a2MT5SEisOoa/+pOgh2KenTiK/rVdiw= -github.com/line/ostracon v0.34.9-0.20210610071151-a52812ac9add h1:WVSJIT1mDMMhBt0D1bBY6H5k25iSg3eUKX5YA8RDJHo= -github.com/line/ostracon v0.34.9-0.20210610071151-a52812ac9add/go.mod h1:ttnbq+yQJMQ9a2MT5SEisOoa/+pOgh2KenTiK/rVdiw= -github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524 h1:eKXXnUm1SblC0AIXAMNDaSyvIbQ50yXqFbh9+Q8Kjvg= +github.com/line/ostracon v0.34.9-0.20210906083237-658e85d9b160 h1:lA/c9x9KpcUrQ9lR7itFe1CO0k544nwdCW5gCaPWWWw= +github.com/line/ostracon v0.34.9-0.20210906083237-658e85d9b160/go.mod h1:elTiUFLvBz6Yaze+ZZLlbUnhqKWLJ7cMy/P9rSabafQ= github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524/go.mod h1:wmkyPabXjtVZ1dvRofmurjaceghywtCSYGqFuFS+TbI= +github.com/line/tm-db/v2 v2.0.0-init.1.0.20210824011847-fcfa67dd3c70 h1:Izv/u19P8salnSZGAgNHFugNlzWLgREiL+AmWK8C/lE= +github.com/line/tm-db/v2 v2.0.0-init.1.0.20210824011847-fcfa67dd3c70/go.mod h1:wmkyPabXjtVZ1dvRofmurjaceghywtCSYGqFuFS+TbI= github.com/line/wasmvm v0.14.0-0.6.1 h1:gqVe1QNpxCLbvUCzkNsO++d/ySD3Wk/i8wUOkPHFt18= github.com/line/wasmvm v0.14.0-0.6.1/go.mod h1:cgsILoCDigfQ2XplFI4rOo2ImOLEZH/OM8sulxGoKUA= -github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/maratori/testpackage v1.0.1 h1:QtJ5ZjqapShm0w5DosRjg0PRlSdAdlx+W6cCKoALdbQ= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 h1:pWxk9e//NbPwfxat7RXkts09K+dEBJWakUWwICVqYbA= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -632,36 +454,19 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 h1:QASJXOGm2RZ5Ardbc86qNFvby9AqkLDibfChMtAg5QM= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.0.7 h1:5kEWTY/W5a0Eiqnkn2BAWsRZpxbs1ft15PsyNC7Rml8= -github.com/mgechev/revive v1.0.7/go.mod h1:vuE5ox/4L/HDd63MCcCk3H6wTLQ6XXezRphJ8cJJOxY= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= @@ -669,25 +474,14 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3 h1:SzB1nHZ2Xi+17FP0zVQBHIZqvwRN9408fJO8h+eeNA8= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/moricho/tparallel v0.2.1 h1:95FytivzT6rYzdJLdtfn6m1bfFJylOJK41+lgv/EHf4= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= -github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= -github.com/mozilla/tls-observatory v0.0.0-20210209181001-cf43108d6880/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= -github.com/nakabonne/nestif v0.3.0 h1:+yOViDGhg8ygGrmII72nV9B/zGxY188TYpfolntsaPw= -github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= @@ -701,15 +495,8 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.1.0 h1:kVlMw8h2LHPMGUVqUj6230oQjjTMFjwcZrnkhXzFfl8= -github.com/nishanths/exhaustive v0.1.0/go.mod h1:S1j9110vxV1ECdCudXRkeMnFQ/DQk9ajLT0Uf2MYZQQ= -github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= -github.com/nishanths/predeclared v0.2.1 h1:1TXtjmy4f3YCFjTxRd8zcFHOmoUir+gp0ESzjFzG2sw= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -717,13 +504,8 @@ github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtb github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.1 h1:foqVmeWDD6yYpK+Yz3fHyNIxFYNxswxqNFjSKe+vI54= @@ -751,14 +533,14 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -767,11 +549,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polyfloyd/go-errorlint v0.0.0-20210510181950-ab96adb96fea h1:Sk6Xawg57ZkjXmFYD1xCHSKN6FtYM+km51MM7Lveyyc= -github.com/polyfloyd/go-errorlint v0.0.0-20210510181950-ab96adb96fea/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -812,18 +591,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.4 h1:F6l5p6+7WBcTKS7foNQ4wqA39zjn2+RbdbyzGxIq1B0= -github.com/quasilyte/go-ruleguard v0.3.4/go.mod h1:57FZgMnoo6jqxkYKmVj5Fc8vOt0rVzoE/UNAmFFIPqA= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.2/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20210203162857-b223e0831f88/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/r2ishiguro/vrf v0.0.0-20180716233122-192de52975eb h1:3kW8n+FfBaUoqlHxCa6e90PXWpGCWWkdyTZ6F7c9m2I= +github.com/r2ishiguro/vrf v0.0.0-20180716233122-192de52975eb/go.mod h1:2NzHJUkr/ERaPNQ2IUuNbB2jMTWYp2DxhcraWbzZj00= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -836,7 +605,6 @@ github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= @@ -844,33 +612,16 @@ github.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g= github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.2 h1:ZJQeYHZ2kaJpojoQBaGqpsn5g7GMcePY36uUGW1umbs= -github.com/ryancurrah/gomodguard v1.2.2/go.mod h1:tpI+C/nzvfUR3bF28b5QHpTn/jM/zlGniI++6ZlIWeE= -github.com/ryanrolds/sqlclosecheck v0.3.0 h1:AZx+Bixh8zdUBxUA1NxbxVAS78vTPq4rCb8OUZI9xFw= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign/v2 v2.0.6 h1:+6/hQIHKNJAUixEj6EmOngGIisyeI+T3335lYTyxRoA= -github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/securego/gosec/v2 v2.8.0 h1:iHg9cVmHWf5n6/ijUJ4F10h5bKlNtvXmcWzRw0lxiKE= -github.com/securego/gosec/v2 v2.8.0/go.mod h1:hJZ6NT5TqoY+jmOsaxAV4cXoEdrMRLVaNPnSpUCvCZs= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= -github.com/shirou/gopsutil/v3 v3.21.5/go.mod h1:ghfMypLDrFSWN2c9cDYFLHyynQ+QUht0cv/18ZqVczw= -github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -878,15 +629,12 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1 h1:VC1Qhl6Oxx9vvWo3UDgrGXYCeKCe3Wbw7qAWL6FrmTY= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/go-diff v0.6.1 h1:hmA1LzxW0n1c3Q4YbrFgg4P99GSnebYa3x8gr0HZqLQ= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.4 h1:8q6vk3hthlpb2SouZcnBVKboxWQWMDNF38bwholZrJc= github.com/spf13/afero v1.3.4/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -908,8 +656,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/ssgreg/nlreturn/v2 v2.1.0 h1:6/s4Rc49L6Uo6RLjhWZGBpWWjfzk2yrf1nIW8m4wgVA= -github.com/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -919,8 +665,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -933,8 +677,6 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca h1:Ld/zXl5t4+D69SiV4JoN7kkfvJdOWlPpfxrzxpLMoUk= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b h1:HxLVTlqcHhFAz3nWUcuvpH7WuOMv8LQoCWmruLfFH2U= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= @@ -945,46 +687,16 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tm-db v0.6.0 h1:Us30k7H1UDcdqoSPhmP8ztAW/SWV6c6OfsfeCiboTC4= github.com/tendermint/tm-db v0.6.0/go.mod h1:xj3AWJ08kBDlCHKijnhJ7mTcDMOikT1r8Poxy2pJn7Q= -github.com/tetafro/godot v1.4.7 h1:zBaoSY4JRVVz33y/qnODsdaKj2yAaMr91HCbqHCifVc= -github.com/tetafro/godot v1.4.7/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 h1:ig99OeTyDwQWhPe2iw9lwfQVF1KB3Q4fpP3X7/2VBG8= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= -github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1gBkr4QyP8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.1.0 h1:LTzwrYlgBUwi9JldazhbJN84fN9nS2UNGrZIo2syqxE= -github.com/tomarrell/wrapcheck/v2 v2.1.0/go.mod h1:crK5eI4RGSUrb9duDTQ5GqcukbKZvi85vX6nbhsBAeI= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa h1:RC4maTWLKKwb7p1cnoygsbKIgNlJqSYBeAFON3Ar8As= -github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= -github.com/tommy-muehle/go-mnd/v2 v2.4.0 h1:1t0f8Uiaq+fqKteUR4N9Umr6E99R+lDnLnq7PwX2PPE= -github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ultraware/funlen v0.0.3 h1:5ylVWm8wsNwH5aWo9438pwvsK0QiqVuUrt9bn7S/iLA= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4 h1:If7Va4cM03mpgrNH9k49/VOicWpGoG70XPBFFODYDsg= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/uudashr/gocognit v1.0.1 h1:MoG2fZ0b/Eo7NXoIwCVFLG5JED3qgQz5/NEE+rOsjPs= -github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= -github.com/valyala/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yeya24/promlinter v0.1.0 h1:goWULN0jH5Yajmu/K+v1xCqIREeB+48OiJ2uu2ssc7U= -github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= +github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673 h1:PSg2cEFd+9Ae/r5x5iO8cJ3VmTbZNQp6X8tHDmVJAbA= +github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673/go.mod h1:Wq2sZrP++Us4tAw1h58MHS8BGIpC4NmKHfvw2QWBe9U= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -994,16 +706,13 @@ github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1018,14 +727,12 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1044,22 +751,33 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b h1:wSOdpTq0/eI46Ez/LkDwIsAKA71YP2SRKBODiRWM0as= golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5 h1:FR+oGxGfbQu1d+jglI3rCkjAjUnhRSZcUxr+DqlDLNo= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -1078,9 +796,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1103,7 +818,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1117,7 +831,6 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1139,7 +852,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1197,7 +909,6 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1208,14 +919,15 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210217105451-b926d437f341/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1232,20 +944,13 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1255,26 +960,21 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1284,57 +984,37 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201011145850-ed2f50202694/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3 h1:DnoIG+QAMaF5NvxnGe/oKsgKcAc6PcUyl8q0VetfQ8s= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1351,13 +1031,10 @@ google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1366,7 +1043,6 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1388,8 +1064,6 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1419,7 +1093,6 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= @@ -1435,7 +1108,6 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -1450,20 +1122,10 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.2.0 h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE= -honnef.co/go/tools v0.2.0/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -mvdan.cc/gofumpt v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA= -mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7 h1:HT3e4Krq+IE44tiN36RvVEb6tvqeIdtsVSsxmNPqlFU= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/ostracon/v1/ostracon.proto similarity index 87% rename from proto/ibc/lightclients/tendermint/v1/tendermint.proto rename to proto/ibc/lightclients/ostracon/v1/ostracon.proto index fe1c2c3dcb..c37b0070c7 100644 --- a/proto/ibc/lightclients/tendermint/v1/tendermint.proto +++ b/proto/ibc/lightclients/ostracon/v1/ostracon.proto @@ -1,9 +1,10 @@ syntax = "proto3"; -package ibc.lightclients.tendermint.v1; +package ibc.lightclients.ostracon.v1; -option go_package = "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types"; +option go_package = "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types"; import "ostracon/types/validator.proto"; +import "ostracon/types/voter.proto"; import "ostracon/types/types.proto"; import "confio/proofs.proto"; import "google/protobuf/duration.proto"; @@ -12,7 +13,7 @@ import "ibc/core/client/v1/client.proto"; import "ibc/core/commitment/v1/commitment.proto"; import "gogoproto/gogo.proto"; -// ClientState from Tendermint tracks the current validator set, latest height, +// ClientState from Ostracon tracks the current validator set, latest height, // and a possible frozen height. message ClientState { option (gogoproto.goproto_getters) = false; @@ -57,7 +58,7 @@ message ClientState { bool allow_update_after_misbehaviour = 11 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; } -// ConsensusState defines the consensus state from Tendermint. +// ConsensusState defines the consensus state from Ostracon. message ConsensusState { option (gogoproto.goproto_getters) = false; @@ -82,9 +83,9 @@ message Misbehaviour { Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; } -// Header defines the Tendermint client consensus Header. +// Header defines the Ostracon client consensus Header. // It encapsulates all the information necessary to update from a trusted -// Tendermint ConsensusState. The inclusion of TrustedHeight and +// Ostracon ConsensusState. The inclusion of TrustedHeight and // TrustedValidators allows this update to process correctly, so long as the // ConsensusState for the TrustedHeight exists, this removes race conditions // among relayers The SignedHeader and ValidatorSet are the new untrusted update @@ -98,10 +99,12 @@ message Header { .ostracon.types.SignedHeader signed_header = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""]; - .ostracon.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; - ibc.core.client.v1.Height trusted_height = 3 + .ostracon.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; + .ostracon.types.VoterSet voter_set = 3 [(gogoproto.moretags) = "yaml:\"voter_set\""]; + ibc.core.client.v1.Height trusted_height = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""]; - .ostracon.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; + .ostracon.types.ValidatorSet trusted_validators = 5 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; + .ostracon.types.VoterSet trusted_voters = 6 [(gogoproto.moretags) = "yaml:\"trusted_voters\""]; } // Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. diff --git a/proto/lfb/staking/v1beta1/staking.proto b/proto/lfb/staking/v1beta1/staking.proto index 1c82f2f73d..b9f98d16b6 100644 --- a/proto/lfb/staking/v1beta1/staking.proto +++ b/proto/lfb/staking/v1beta1/staking.proto @@ -12,7 +12,7 @@ import "ostracon/types/types.proto"; option go_package = "github.com/line/lfb-sdk/x/staking/types"; -// HistoricalInfo contains header and validator information for a given block. +// HistoricalInfo contains header and validator, voter information for a given block. // It is stored as part of staking module's state, which persists the `n` most // recent HistoricalInfo // (`n` is set by the staking module's `historical_entries` parameter). diff --git a/server/export.go b/server/export.go index 96accc118a..194e3efbbf 100644 --- a/server/export.go +++ b/server/export.go @@ -8,8 +8,8 @@ import ( "os" ostjson "github.com/line/ostracon/libs/json" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/spf13/cobra" "github.com/line/lfb-sdk/client/flags" @@ -73,7 +73,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com return fmt.Errorf("error exporting state: %v", err) } - doc, err := osttypes.GenesisDocFromFile(serverCtx.Config.GenesisFile()) + doc, err := octypes.GenesisDocFromFile(serverCtx.Config.GenesisFile()) if err != nil { return err } @@ -81,18 +81,18 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com doc.AppState = exported.AppState doc.Validators = exported.Validators doc.InitialHeight = exported.Height - doc.ConsensusParams = &ostproto.ConsensusParams{ - Block: ostproto.BlockParams{ + doc.ConsensusParams = &ocproto.ConsensusParams{ + Block: ocproto.BlockParams{ MaxBytes: exported.ConsensusParams.Block.MaxBytes, MaxGas: exported.ConsensusParams.Block.MaxGas, TimeIotaMs: doc.ConsensusParams.Block.TimeIotaMs, }, - Evidence: ostproto.EvidenceParams{ + Evidence: ocproto.EvidenceParams{ MaxAgeNumBlocks: exported.ConsensusParams.Evidence.MaxAgeNumBlocks, MaxAgeDuration: exported.ConsensusParams.Evidence.MaxAgeDuration, MaxBytes: exported.ConsensusParams.Evidence.MaxBytes, }, - Validator: ostproto.ValidatorParams{ + Validator: ocproto.ValidatorParams{ PubKeyTypes: exported.ConsensusParams.Validator.PubKeyTypes, }, } diff --git a/server/export_test.go b/server/export_test.go index ae3be6c48b..1b67fcabe4 100644 --- a/server/export_test.go +++ b/server/export_test.go @@ -16,8 +16,8 @@ import ( abci "github.com/line/ostracon/abci/types" ostjson "github.com/line/ostracon/libs/json" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" tmdb "github.com/line/tm-db/v2" "github.com/line/tm-db/v2/memdb" @@ -41,7 +41,7 @@ func TestExportCmd_ConsensusParams(t *testing.T) { cmd.SetArgs([]string{fmt.Sprintf("--%s=%s", flags.FlagHome, tempDir)}) require.NoError(t, cmd.ExecuteContext(ctx)) - var exportedGenDoc osttypes.GenesisDoc + var exportedGenDoc octypes.GenesisDoc err := ostjson.Unmarshal(output.Bytes(), &exportedGenDoc) if err != nil { t.Fatalf("error unmarshaling exported genesis doc: %s", err) @@ -101,7 +101,7 @@ func TestExportCmd_Height(t *testing.T) { // Fast forward to block `tc.fastForward`. for i := int64(2); i <= tc.fastForward; i++ { - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: i}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: i}}) app.Commit() } @@ -111,7 +111,7 @@ func TestExportCmd_Height(t *testing.T) { cmd.SetArgs(args) require.NoError(t, cmd.ExecuteContext(ctx)) - var exportedGenDoc osttypes.GenesisDoc + var exportedGenDoc octypes.GenesisDoc err := ostjson.Unmarshal(output.Bytes(), &exportedGenDoc) if err != nil { t.Fatalf("error unmarshaling exported genesis doc: %s", err) @@ -123,12 +123,12 @@ func TestExportCmd_Height(t *testing.T) { } -func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *osttypes.GenesisDoc, *cobra.Command) { +func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *octypes.GenesisDoc, *cobra.Command) { if err := createConfigFolder(tempDir); err != nil { t.Fatalf("error creating config folder: %s", err) } - logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) + logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)) db := memdb.NewDB() encCfg := simapp.MakeTestEncodingConfig() app := simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, tempDir, 0, encCfg, simapp.EmptyAppOptions{}) @@ -178,7 +178,7 @@ func createConfigFolder(dir string) error { return os.Mkdir(path.Join(dir, "config"), 0700) } -func newDefaultGenesisDoc(cdc codec.Marshaler) *osttypes.GenesisDoc { +func newDefaultGenesisDoc(cdc codec.Marshaler) *octypes.GenesisDoc { genesisState := simapp.NewDefaultGenesisState(cdc) stateBytes, err := json.MarshalIndent(genesisState, "", " ") @@ -186,7 +186,7 @@ func newDefaultGenesisDoc(cdc codec.Marshaler) *osttypes.GenesisDoc { panic(err) } - genDoc := &osttypes.GenesisDoc{} + genDoc := &octypes.GenesisDoc{} genDoc.ChainID = "theChainId" genDoc.Validators = nil genDoc.AppState = stateBytes @@ -194,7 +194,7 @@ func newDefaultGenesisDoc(cdc codec.Marshaler) *osttypes.GenesisDoc { return genDoc } -func saveGenesisFile(genDoc *osttypes.GenesisDoc, dir string) error { +func saveGenesisFile(genDoc *octypes.GenesisDoc, dir string) error { err := genutil.ExportGenesisFile(genDoc, dir) if err != nil { return errors.Wrap(err, "error creating file") diff --git a/server/mock/app_test.go b/server/mock/app_test.go index b5bfcd6ce7..7beee0aef0 100644 --- a/server/mock/app_test.go +++ b/server/mock/app_test.go @@ -4,7 +4,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" "github.com/stretchr/testify/require" ) @@ -56,7 +56,7 @@ func TestDeliverTx(t *testing.T) { tx := NewTx(key, value) txBytes := tx.GetSignBytes() - header := ostproto.Header{ + header := ocproto.Header{ AppHash: []byte("apphash"), Height: 1, } diff --git a/server/mock/helpers.go b/server/mock/helpers.go index 16840531be..9fc634197d 100644 --- a/server/mock/helpers.go +++ b/server/mock/helpers.go @@ -12,7 +12,7 @@ import ( // SetupApp returns an application as well as a clean-up function // to be used to quickly setup a test case with an app func SetupApp() (abci.Application, func(), error) { - logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)). + logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)). With("module", "mock") rootDir, err := ioutil.TempDir("", "mock-sdk") if err != nil { diff --git a/server/tm_cmds.go b/server/oc_cmds.go similarity index 91% rename from server/tm_cmds.go rename to server/oc_cmds.go index 3871e8d091..cdd16e133c 100644 --- a/server/tm_cmds.go +++ b/server/oc_cmds.go @@ -19,7 +19,7 @@ import ( sdk "github.com/line/lfb-sdk/types" ) -// ShowNodeIDCmd - ported from Tendermint, dump node ID to stdout +// ShowNodeIDCmd - ported from Ostracon, dump node ID to stdout func ShowNodeIDCmd() *cobra.Command { return &cobra.Command{ Use: "show-node-id", @@ -39,7 +39,7 @@ func ShowNodeIDCmd() *cobra.Command { } } -// ShowValidatorCmd - ported from Tendermint, show this node's validator info +// ShowValidatorCmd - ported from Ostracon, show this node's validator info func ShowValidatorCmd() *cobra.Command { cmd := cobra.Command{ Use: "show-validator", @@ -59,7 +59,7 @@ func ShowValidatorCmd() *cobra.Command { return printlnJSON(valPubKey) } - pubkey, err := cryptocodec.FromTmPubKeyInterface(valPubKey) + pubkey, err := cryptocodec.FromOcPubKeyInterface(valPubKey) if err != nil { return err } @@ -113,12 +113,12 @@ against which this app has been compiled. `, RunE: func(cmd *cobra.Command, args []string) error { bs, err := yaml.Marshal(&struct { - Tendermint string + Ostracon string ABCI string BlockProtocol uint64 P2PProtocol uint64 }{ - Tendermint: ostversion.TMCoreSemVer, + Ostracon: ostversion.OCCoreSemVer, ABCI: ostversion.ABCIVersion, BlockProtocol: ostversion.BlockProtocol, P2PProtocol: ostversion.P2PProtocol, @@ -155,7 +155,8 @@ func UnsafeResetAllCmd() *cobra.Command { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config - ostcmd.ResetAll(cfg.DBDir(), cfg.P2P.AddrBookFile(), cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile(), serverCtx.Logger) + ostcmd.ResetAll(cfg.DBDir(), cfg.P2P.AddrBookFile(), cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile(), + cfg.PrivKeyType, serverCtx.Logger) return nil }, } diff --git a/server/start.go b/server/start.go index 35d393c199..c38bda5bd9 100644 --- a/server/start.go +++ b/server/start.go @@ -251,9 +251,13 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App } genDocProvider := node.DefaultGenesisDocProviderFunc(cfg) - tmNode, err := node.NewNode( + pv, err2 := pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile(), cfg.PrivKeyType) + if err2 != nil { + return err2 + } + ocNode, err := node.NewNode( cfg, - pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()), + pv, nodeKey, proxy.NewLocalClientCreator(app), genDocProvider, @@ -265,11 +269,11 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App return err } - ctx.Logger.Debug("initialization: tmNode created") - if err := tmNode.Start(); err != nil { + ctx.Logger.Debug("initialization: ocNode created") + if err := ocNode.Start(); err != nil { return err } - ctx.Logger.Debug("initialization: tmNode started") + ctx.Logger.Debug("initialization: ocNode started") config := config.GetConfig(ctx.Viper) @@ -277,7 +281,7 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App // service if API or gRPC is enabled, and avoid doing so in the general // case, because it spawns a new local ostracon RPC client. if config.API.Enable || config.GRPC.Enable { - clientCtx = clientCtx.WithClient(local.New(tmNode)) + clientCtx = clientCtx.WithClient(local.New(ocNode)) app.RegisterTxService(clientCtx) app.RegisterTendermintService(clientCtx) @@ -321,8 +325,8 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App } defer func() { - if tmNode.IsRunning() { - _ = tmNode.Stop() + if ocNode.IsRunning() { + _ = ocNode.Stop() } if cpuProfileCleanup != nil { diff --git a/server/types/app.go b/server/types/app.go index cda88b81fd..07ce93525d 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -7,7 +7,7 @@ import ( "github.com/gogo/protobuf/grpc" abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" tmdb "github.com/line/tm-db/v2" "github.com/spf13/cobra" @@ -61,7 +61,7 @@ type ( // AppState is the application state as JSON. AppState json.RawMessage // Validators is the exported validator set. - Validators []osttypes.GenesisValidator + Validators []octypes.GenesisValidator // Height is the app's latest block height. Height int64 // ConsensusParams are the exported consensus params for ABCI. diff --git a/simapp/app.go b/simapp/app.go index 037d62dd99..8b80410a78 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -11,7 +11,7 @@ import ( ostjson "github.com/line/ostracon/libs/json" "github.com/line/ostracon/libs/log" ostos "github.com/line/ostracon/libs/os" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" tmdb "github.com/line/tm-db/v2" "github.com/rakyll/statik/fs" "github.com/spf13/cast" @@ -418,7 +418,7 @@ func NewSimApp( // that in-memory capabilities get regenerated on app restart. // Note that since this reads from the store, we can only perform it when // `loadLatest` is set to true. - ctx := app.BaseApp.NewUncachedContext(true, ostproto.Header{}) + ctx := app.BaseApp.NewUncachedContext(true, ocproto.Header{}) app.CapabilityKeeper.InitializeAndSeal(ctx) } diff --git a/simapp/app_test.go b/simapp/app_test.go index fcf7ec15b5..bc8b4e471e 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -15,7 +15,7 @@ import ( func TestSimAppExportAndBlockedAddrs(t *testing.T) { encCfg := MakeTestEncodingConfig() db := memdb.NewDB() - app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) + app := NewSimApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) for acc := range maccPerms { require.True( @@ -39,7 +39,7 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) { app.Commit() // Making a new app object with the db, so that initchain hasn't been called - app2 := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) + app2 := NewSimApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) _, err = app2.ExportAppStateAndValidators(false, []string{}) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } diff --git a/simapp/export.go b/simapp/export.go index e8462b9400..e3be58234f 100644 --- a/simapp/export.go +++ b/simapp/export.go @@ -4,7 +4,7 @@ import ( "encoding/json" "log" - osttypes "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/proto/ostracon/types" servertypes "github.com/line/lfb-sdk/server/types" sdk "github.com/line/lfb-sdk/types" @@ -19,7 +19,7 @@ func (app *SimApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error) { // as if they could withdraw from the start of the next block - ctx := app.NewContext(true, osttypes.Header{Height: app.LastBlockHeight()}) + ctx := app.NewContext(true, octypes.Header{Height: app.LastBlockHeight()}) // We export at last height + 1, because that's the height at which // Tendermint will start InitChain. diff --git a/simapp/sim_bench_test.go b/simapp/sim_bench_test.go index 20b6e863a1..70228e3752 100644 --- a/simapp/sim_bench_test.go +++ b/simapp/sim_bench_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" simtypes "github.com/line/lfb-sdk/types/simulation" "github.com/line/lfb-sdk/x/simulation" @@ -100,7 +100,7 @@ func BenchmarkInvariants(b *testing.B) { PrintStats(db) } - ctx := app.NewContext(true, ostproto.Header{Height: app.LastBlockHeight() + 1}) + ctx := app.NewContext(true, ocproto.Header{Height: app.LastBlockHeight() + 1}) // 3. Benchmark each invariant separately // diff --git a/simapp/sim_test.go b/simapp/sim_test.go index f1a2b1f685..14b91018c6 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -10,7 +10,7 @@ import ( "github.com/line/lfb-sdk/store/cache" abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -155,8 +155,8 @@ func TestAppImportExport(t *testing.T) { err = json.Unmarshal(exported.AppState, &genesisState) require.NoError(t, err) - ctxA := app.NewContext(true, ostproto.Header{Height: app.LastBlockHeight()}) - ctxB := newApp.NewContext(true, ostproto.Header{Height: app.LastBlockHeight()}) + ctxA := app.NewContext(true, ocproto.Header{Height: app.LastBlockHeight()}) + ctxB := newApp.NewContext(true, ocproto.Header{Height: app.LastBlockHeight()}) newApp.mm.InitGenesis(ctxB, app.AppCodec(), genesisState) newApp.StoreConsensusParams(ctxB, exported.ConsensusParams) diff --git a/simapp/simd/cmd/root_test.go b/simapp/simd/cmd/root_test.go index d14f19e9d9..a34c0e7bd5 100644 --- a/simapp/simd/cmd/root_test.go +++ b/simapp/simd/cmd/root_test.go @@ -21,6 +21,6 @@ func TestNewApp(t *testing.T) { ctx := server.NewDefaultContext() ctx.Viper.Set(flags.FlagHome, tempDir) ctx.Viper.Set(server.FlagPruning, types.PruningOptionNothing) - app := a.newApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, ctx.Viper) + app := a.newApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, ctx.Viper) require.NotNil(t, app) } diff --git a/simapp/state.go b/simapp/state.go index b025a500e7..d986e89a9a 100644 --- a/simapp/state.go +++ b/simapp/state.go @@ -9,7 +9,7 @@ import ( "time" ostjson "github.com/line/ostracon/libs/json" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/codec" "github.com/line/lfb-sdk/crypto/keys/secp256k1" @@ -129,13 +129,13 @@ func AppStateRandomizedFn( // AppStateFromGenesisFileFn util function to generate the genesis AppState // from a genesis.json file. -func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONMarshaler, genesisFile string) (osttypes.GenesisDoc, []simtypes.Account) { +func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONMarshaler, genesisFile string) (octypes.GenesisDoc, []simtypes.Account) { bytes, err := ioutil.ReadFile(genesisFile) if err != nil { panic(err) } - var genesis osttypes.GenesisDoc + var genesis octypes.GenesisDoc // NOTE: Tendermint uses a custom JSON decoder for GenesisDoc err = ostjson.Unmarshal(bytes, &genesis) if err != nil { diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index cd85e9aa06..152aafb8f6 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -12,8 +12,8 @@ import ( abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -38,14 +38,14 @@ var DefaultConsensusParams = &abci.ConsensusParams{ MaxBytes: 200000, MaxGas: 2000000, }, - Evidence: &ostproto.EvidenceParams{ + Evidence: &ocproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, // 3 weeks is the max duration MaxBytes: 10000, }, - Validator: &ostproto.ValidatorParams{ + Validator: &ocproto.ValidatorParams{ PubKeyTypes: []string{ - osttypes.ABCIPubKeyTypeEd25519, + octypes.ABCIPubKeyTypeEd25519, }, }, } @@ -87,7 +87,7 @@ func Setup(isCheckTx bool) *SimApp { // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit (10^6) in the default token of the simapp from first genesis // account. A Nop logger is set in SimApp. -func SetupWithGenesisValSet(t *testing.T, valSet *osttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { +func SetupWithGenesisValSet(t *testing.T, valSet *octypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { app, genesisState := setup(true, 5) // set genesis accounts authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) @@ -99,7 +99,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *osttypes.ValidatorSet, genAccs bondAmt := sdk.NewInt(1000000) for _, val := range valSet.Validators { - pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey) + pk, err := cryptocodec.FromOcPubKeyInterface(val.PubKey) require.NoError(t, err) pkAny, err := codectypes.NewAnyWithValue(pk) require.NoError(t, err) @@ -150,7 +150,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *osttypes.ValidatorSet, genAccs // commit genesis changes app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{ + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{ Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, ValidatorsHash: valSet.Hash(), @@ -189,7 +189,7 @@ func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...ba ) app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1}}) return app } @@ -364,7 +364,7 @@ func TestAddr(addr string, bech string) (sdk.AccAddress, error) { // CheckBalance checks the balance of an account. func CheckBalance(t *testing.T, app *SimApp, addr sdk.AccAddress, balances sdk.Coins) { - ctxCheck := app.BaseApp.NewContext(true, ostproto.Header{}) + ctxCheck := app.BaseApp.NewContext(true, ocproto.Header{}) require.True(t, balances.IsEqual(app.BankKeeper.GetAllBalances(ctxCheck, addr))) } @@ -373,7 +373,7 @@ func CheckBalance(t *testing.T, app *SimApp, addr sdk.AccAddress, balances sdk.C // the parameter 'expPass' against the result. A corresponding result is // returned. func SignCheckDeliver( - t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header ostproto.Header, msgs []sdk.Msg, + t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header ocproto.Header, msgs []sdk.Msg, chainID string, sbh, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { diff --git a/store/iavl/store.go b/store/iavl/store.go index 8c2ceaf2cb..65d5d100ad 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -11,7 +11,7 @@ import ( ics23 "github.com/confio/ics23/go" "github.com/line/iavl/v2" abci "github.com/line/ostracon/abci/types" - ostcrypto "github.com/line/ostracon/proto/ostracon/crypto" + occrypto "github.com/line/ostracon/proto/ostracon/crypto" tmdb "github.com/line/tm-db/v2" "github.com/line/lfb-sdk/store/cachekv" @@ -405,7 +405,7 @@ func (st *Store) Query(req abci.RequestQuery) (res abci.ResponseQuery) { // Takes a MutableTree, a key, and a flag for creating existence or absence proof and returns the // appropriate merkle.Proof. Since this must be called after querying for the value, this function should never error // Thus, it will panic on error rather than returning it -func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *ostcrypto.ProofOps { +func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *occrypto.ProofOps { var ( commitmentProof *ics23.CommitmentProof err error @@ -428,7 +428,7 @@ func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *ostcrypt } op := types.NewIavlCommitmentOp(key, commitmentProof) - return &ostcrypto.ProofOps{Ops: []ostcrypto.ProofOp{op.ProofOp()}} + return &occrypto.ProofOps{Ops: []occrypto.ProofOp{op.ProofOp()}} } //---------------------------------------- diff --git a/store/internal/maps/maps.go b/store/internal/maps/maps.go index 948df8455e..f0828d4538 100644 --- a/store/internal/maps/maps.go +++ b/store/internal/maps/maps.go @@ -5,7 +5,7 @@ import ( "github.com/line/ostracon/crypto/merkle" "github.com/line/ostracon/crypto/tmhash" - ostcrypto "github.com/line/ostracon/proto/ostracon/crypto" + occrypto "github.com/line/ostracon/proto/ostracon/crypto" "github.com/line/lfb-sdk/types/kv" ) @@ -183,7 +183,7 @@ func HashFromMap(m map[string][]byte) []byte { // ProofsFromMap generates proofs from a map. The keys/values of the map will be used as the keys/values // in the underlying key-value pairs. // The keys are sorted before the proofs are computed. -func ProofsFromMap(m map[string][]byte) ([]byte, map[string]*ostcrypto.Proof, []string) { +func ProofsFromMap(m map[string][]byte) ([]byte, map[string]*occrypto.Proof, []string) { sm := newSimpleMap() for k, v := range m { sm.Set(k, v) @@ -197,7 +197,7 @@ func ProofsFromMap(m map[string][]byte) ([]byte, map[string]*ostcrypto.Proof, [] } rootHash, proofList := merkle.ProofsFromByteSlices(kvsBytes) - proofs := make(map[string]*ostcrypto.Proof) + proofs := make(map[string]*occrypto.Proof) keys := make([]string, len(proofList)) for i, kvp := range kvs.Pairs { diff --git a/store/internal/proofs/helpers.go b/store/internal/proofs/helpers.go index 1f0334c52b..46042bbe42 100644 --- a/store/internal/proofs/helpers.go +++ b/store/internal/proofs/helpers.go @@ -4,7 +4,7 @@ import ( "sort" "github.com/line/ostracon/libs/rand" - ostcrypto "github.com/line/ostracon/proto/ostracon/crypto" + occrypto "github.com/line/ostracon/proto/ostracon/crypto" sdkmaps "github.com/line/lfb-sdk/store/internal/maps" ) @@ -13,7 +13,7 @@ import ( type SimpleResult struct { Key []byte Value []byte - Proof *ostcrypto.Proof + Proof *occrypto.Proof RootHash []byte } diff --git a/store/types/commit_info.go b/store/types/commit_info.go index 512b3008f2..536f712afc 100644 --- a/store/types/commit_info.go +++ b/store/types/commit_info.go @@ -4,7 +4,7 @@ import ( fmt "fmt" ics23 "github.com/confio/ics23/go" - ostcrypto "github.com/line/ostracon/proto/ostracon/crypto" + occrypto "github.com/line/ostracon/proto/ostracon/crypto" sdkmaps "github.com/line/lfb-sdk/store/internal/maps" sdkproofs "github.com/line/lfb-sdk/store/internal/proofs" @@ -41,7 +41,7 @@ func (ci CommitInfo) Hash() []byte { return rootHash } -func (ci CommitInfo) ProofOp(storeName string) ostcrypto.ProofOp { +func (ci CommitInfo) ProofOp(storeName string) occrypto.ProofOp { cmap := ci.toMap() _, proofs, _ := sdkmaps.ProofsFromMap(cmap) diff --git a/testutil/network/network.go b/testutil/network/network.go index 5a95e740f8..b0527eb562 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -234,7 +234,7 @@ func New(t *testing.T, cfg Config) *Network { logger := log.NewNopLogger() if cfg.EnableLogging { - logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)) + logger = log.NewOCLogger(log.NewSyncWriter(os.Stdout)) logger, _ = ostflags.ParseLogLevel("info", logger, ostcfg.DefaultLogLevel) } diff --git a/testutil/network/util.go b/testutil/network/util.go index 554ca5a1fb..89b4fe0d27 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -35,9 +35,13 @@ func startInProcess(cfg Config, val *Validator) error { app := cfg.AppConstructor(*val) genDocProvider := node.DefaultGenesisDocProviderFunc(tmCfg) + pv, err := pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile(), tmCfg.PrivKeyType) + if err != nil { + return err + } tmNode, err := node.NewNode( tmCfg, - pvm.LoadOrGenFilePV(tmCfg.PrivValidatorKeyFile(), tmCfg.PrivValidatorStateFile()), + pv, nodeKey, proxy.NewLocalClientCreator(app), genDocProvider, diff --git a/third_party/proto/ostracon/types/voter.proto b/third_party/proto/ostracon/types/voter.proto new file mode 100644 index 0000000000..606b3e270a --- /dev/null +++ b/third_party/proto/ostracon/types/voter.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +package ostracon.types; + +option go_package = "github.com/line/ostracon/proto/ostracon/types"; + +import "ostracon/types/validator.proto"; + +message VoterSet { + repeated ostracon.types.Validator voters = 1; + int64 total_voting_power = 2; +} diff --git a/types/context.go b/types/context.go index 600ba59b62..8e183621b3 100644 --- a/types/context.go +++ b/types/context.go @@ -7,7 +7,7 @@ import ( "github.com/gogo/protobuf/proto" abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/store/gaskv" stypes "github.com/line/lfb-sdk/store/types" @@ -24,7 +24,7 @@ and standard additions here would be better just to add to the Context struct type Context struct { ctx context.Context ms MultiStore - header ostproto.Header + header ocproto.Header chainID string txBytes []byte logger log.Logger @@ -58,8 +58,8 @@ func (c Context) MinGasPrices() DecCoins { return c.minGasPrice } func (c Context) EventManager() *EventManager { return c.eventManager } // clone the header before returning -func (c Context) BlockHeader() ostproto.Header { - var msg = proto.Clone(&c.header).(*ostproto.Header) +func (c Context) BlockHeader() ocproto.Header { + var msg = proto.Clone(&c.header).(*ocproto.Header) return *msg } @@ -68,7 +68,7 @@ func (c Context) ConsensusParams() *abci.ConsensusParams { } // create a new context -func NewContext(ms MultiStore, header ostproto.Header, isCheckTx bool, logger log.Logger) Context { +func NewContext(ms MultiStore, header ocproto.Header, isCheckTx bool, logger log.Logger) Context { // https://github.com/gogo/protobuf/issues/519 header.Time = header.Time.UTC() return Context{ @@ -97,7 +97,7 @@ func (c Context) WithMultiStore(ms MultiStore) Context { } // WithBlockHeader returns a Context with an updated tendermint block header in UTC time. -func (c Context) WithBlockHeader(header ostproto.Header) Context { +func (c Context) WithBlockHeader(header ocproto.Header) Context { // https://github.com/gogo/protobuf/issues/519 header.Time = header.Time.UTC() c.header = header diff --git a/types/context_test.go b/types/context_test.go index a4ec576bc0..931470642c 100644 --- a/types/context_test.go +++ b/types/context_test.go @@ -8,7 +8,7 @@ import ( "github.com/golang/mock/gomock" abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/suite" @@ -31,7 +31,7 @@ func (s *contextTestSuite) defaultContext(key types.StoreKey) types.Context { cms := store.NewCommitMultiStore(db) cms.MountStoreWithDB(key, types.StoreTypeIAVL, db) s.Require().NoError(cms.LoadLatestVersion()) - ctx := types.NewContext(cms, ostproto.Header{}, false, log.NewNopLogger()) + ctx := types.NewContext(cms, ocproto.Header{}, false, log.NewNopLogger()) return ctx } @@ -93,7 +93,7 @@ func (s *contextTestSuite) TestContextWithCustom() { ctrl := gomock.NewController(s.T()) s.T().Cleanup(ctrl.Finish) - header := ostproto.Header{} + header := ocproto.Header{} height := int64(1) chainid := "chainid" ischeck := true @@ -152,7 +152,7 @@ func (s *contextTestSuite) TestContextHeader() { addr := secp256k1.GenPrivKey().PubKey().Address() proposer := types.ConsAddress(addr) - ctx = types.NewContext(nil, ostproto.Header{}, false, nil) + ctx = types.NewContext(nil, ocproto.Header{}, false, nil) ctx = ctx. WithBlockHeight(height). @@ -166,35 +166,35 @@ func (s *contextTestSuite) TestContextHeader() { func (s *contextTestSuite) TestContextHeaderClone() { cases := map[string]struct { - h ostproto.Header + h ocproto.Header }{ "empty": { - h: ostproto.Header{}, + h: ocproto.Header{}, }, "height": { - h: ostproto.Header{ + h: ocproto.Header{ Height: 77, }, }, "time": { - h: ostproto.Header{ + h: ocproto.Header{ Time: time.Unix(12345677, 12345), }, }, "zero time": { - h: ostproto.Header{ + h: ocproto.Header{ Time: time.Unix(0, 0), }, }, "many items": { - h: ostproto.Header{ + h: ocproto.Header{ Height: 823, Time: time.Unix(9999999999, 0), ChainID: "silly-demo", }, }, "many items with hash": { - h: ostproto.Header{ + h: ocproto.Header{ Height: 823, Time: time.Unix(9999999999, 0), ChainID: "silly-demo", @@ -221,7 +221,7 @@ func (s *contextTestSuite) TestContextHeaderClone() { } func (s *contextTestSuite) TestUnwrapSDKContext() { - sdkCtx := types.NewContext(nil, ostproto.Header{}, false, nil) + sdkCtx := types.NewContext(nil, ocproto.Header{}, false, nil) ctx := types.WrapSDKContext(sdkCtx) sdkCtx2 := types.UnwrapSDKContext(ctx) s.Require().Equal(sdkCtx, sdkCtx2) diff --git a/types/query/pagination_test.go b/types/query/pagination_test.go index 20b62d5159..85b986cdb3 100644 --- a/types/query/pagination_test.go +++ b/types/query/pagination_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/suite" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/line/lfb-sdk/baseapp" @@ -213,7 +213,7 @@ func ExamplePaginate() { func setupTest() (*simapp.SimApp, sdk.Context, codec.Marshaler) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{Height: 1}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{Height: 1}) appCodec := app.AppCodec() db := memdb.NewDB() diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index 4f260e3189..e428c52201 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/client" @@ -41,7 +41,7 @@ type AnteTestSuite struct { // returns context and app with params set on account keeper func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) return app, ctx diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 8644690815..b565c66bc5 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/spf13/cobra" "github.com/line/lfb-sdk/client" @@ -144,7 +144,7 @@ $ %s query txs --%s 'message.sender=cosmos1...&message.action=withdraw_delegator } tokens := strings.Split(event, "=") - if tokens[0] == osttypes.TxHeightKey { + if tokens[0] == octypes.TxHeightKey { event = fmt.Sprintf("%s=%s", tokens[0], tokens[1]) } else { event = fmt.Sprintf("%s='%s'", tokens[0], tokens[1]) diff --git a/x/auth/keeper/integration_test.go b/x/auth/keeper/integration_test.go index ac20283a3a..bf19cdd345 100644 --- a/x/auth/keeper/integration_test.go +++ b/x/auth/keeper/integration_test.go @@ -1,7 +1,7 @@ package keeper_test import ( - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/simapp" sdk "github.com/line/lfb-sdk/types" @@ -11,7 +11,7 @@ import ( // returns context and app with params set on account keeper func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) return app, ctx diff --git a/x/auth/legacy/legacytx/stdtx_test.go b/x/auth/legacy/legacytx/stdtx_test.go index 9c802c3cdf..b8ab523c61 100644 --- a/x/auth/legacy/legacytx/stdtx_test.go +++ b/x/auth/legacy/legacytx/stdtx_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" yaml "gopkg.in/yaml.v2" @@ -103,7 +103,7 @@ func TestStdSignBytes(t *testing.T) { } func TestTxValidateBasic(t *testing.T) { - ctx := sdk.NewContext(nil, ostproto.Header{ChainID: "mychainid"}, false, log.NewNopLogger()) + ctx := sdk.NewContext(nil, ocproto.Header{ChainID: "mychainid"}, false, log.NewNopLogger()) // keys and addresses priv1, _, addr1 := testdata.KeyTestPubAddr() diff --git a/x/auth/module_test.go b/x/auth/module_test.go index 0a7d026da1..1338c1843b 100644 --- a/x/auth/module_test.go +++ b/x/auth/module_test.go @@ -4,7 +4,7 @@ import ( "testing" abcitypes "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -13,7 +13,7 @@ import ( func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.InitChain( abcitypes.RequestInitChain{ diff --git a/x/auth/signing/verify_test.go b/x/auth/signing/verify_test.go index 8606bcbfc2..7c86b3a470 100644 --- a/x/auth/signing/verify_test.go +++ b/x/auth/signing/verify_test.go @@ -3,7 +3,7 @@ package signing_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/codec" @@ -98,7 +98,7 @@ func TestVerifySignature(t *testing.T) { // returns context and app with params set on account keeper func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) app.AccountKeeper.SetParams(ctx, types.DefaultParams()) return app, ctx diff --git a/x/auth/vesting/handler_test.go b/x/auth/vesting/handler_test.go index 40567f127e..b0e2b1e0ef 100644 --- a/x/auth/vesting/handler_test.go +++ b/x/auth/vesting/handler_test.go @@ -3,7 +3,7 @@ package vesting_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/simapp" @@ -28,7 +28,7 @@ func (suite *HandlerTestSuite) SetupTest() { } func (suite *HandlerTestSuite) TestMsgCreateVestingAccount() { - ctx := suite.app.BaseApp.NewContext(false, ostproto.Header{Height: suite.app.LastBlockHeight() + 1}) + ctx := suite.app.BaseApp.NewContext(false, ocproto.Header{Height: suite.app.LastBlockHeight() + 1}) balances := sdk.NewCoins(sdk.NewInt64Coin("test", 1000)) addr1 := sdk.BytesToAccAddress([]byte("addr1_______________")) diff --git a/x/bank/app_test.go b/x/bank/app_test.go index 7e275ecb4b..d34802a246 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -3,7 +3,7 @@ package bank_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/crypto/keys/secp256k1" @@ -92,7 +92,7 @@ func TestSendNotEnoughBalance(t *testing.T) { genAccs := []authtypes.GenesisAccount{acc} app := simapp.SetupWithGenesisAccounts(genAccs) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) err := app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 67))) require.NoError(t, err) @@ -106,14 +106,14 @@ func TestSendNotEnoughBalance(t *testing.T) { origSeq := res1.GetSequence() sendMsg := types.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin("foocoin", 100)}) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{sendMsg}, "", []uint64{0}, []uint64{origSeq}, false, false, priv1) require.Error(t, err) simapp.CheckBalance(t, app, addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 67)}) - res2 := app.AccountKeeper.GetAccount(app.NewContext(true, ostproto.Header{}), addr1) + res2 := app.AccountKeeper.GetAccount(app.NewContext(true, ocproto.Header{}), addr1) require.NotNil(t, res2) require.Equal(t, res2.GetSequence(), origSeq+1) @@ -126,7 +126,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { genAccs := []authtypes.GenesisAccount{acc} app := simapp.SetupWithGenesisAccounts(genAccs) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) err := app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 67))) require.NoError(t, err) @@ -172,7 +172,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { } for _, tc := range testCases { - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) if tc.expPass { @@ -197,7 +197,7 @@ func TestMsgMultiSendMultipleOut(t *testing.T) { genAccs := []authtypes.GenesisAccount{acc1, acc2} app := simapp.SetupWithGenesisAccounts(genAccs) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) err := app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 42))) require.NoError(t, err) @@ -224,7 +224,7 @@ func TestMsgMultiSendMultipleOut(t *testing.T) { } for _, tc := range testCases { - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) require.NoError(t, err) @@ -248,7 +248,7 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) { genAccs := []authtypes.GenesisAccount{acc1, acc2, acc4} app := simapp.SetupWithGenesisAccounts(genAccs) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) err := app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 42))) require.NoError(t, err) @@ -279,7 +279,7 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) { } for _, tc := range testCases { - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) require.NoError(t, err) @@ -296,7 +296,7 @@ func TestMsgMultiSendDependent(t *testing.T) { genAccs := []authtypes.GenesisAccount{acc1, acc2} app := simapp.SetupWithGenesisAccounts(genAccs) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) err := app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 42))) require.NoError(t, err) @@ -330,7 +330,7 @@ func TestMsgMultiSendDependent(t *testing.T) { } for _, tc := range testCases { - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) require.NoError(t, err) diff --git a/x/bank/bench_test.go b/x/bank/bench_test.go index fb7b9f1c55..3834caceb4 100644 --- a/x/bank/bench_test.go +++ b/x/bank/bench_test.go @@ -4,7 +4,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -26,7 +26,7 @@ func BenchmarkOneBankSendTxPerBlock(b *testing.B) { // construct genesis state genAccs := []types.GenesisAccount{&acc} benchmarkApp := simapp.SetupWithGenesisAccounts(genAccs) - ctx := benchmarkApp.BaseApp.NewContext(false, ostproto.Header{}) + ctx := benchmarkApp.BaseApp.NewContext(false, ocproto.Header{}) // some value conceivably higher than the benchmarks would ever go err := benchmarkApp.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 100000000000))) @@ -45,7 +45,7 @@ func BenchmarkOneBankSendTxPerBlock(b *testing.B) { // Run this with a profiler, so its easy to distinguish what time comes from // Committing, and what time comes from Check/Deliver Tx. for i := 0; i < b.N; i++ { - benchmarkApp.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: height}}) + benchmarkApp.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: height}}) _, err := benchmarkApp.Check(txGen.TxEncoder(), txs[i]) if err != nil { panic("something is broken in checking transaction") @@ -68,7 +68,7 @@ func BenchmarkOneBankMultiSendTxPerBlock(b *testing.B) { // Construct genesis state genAccs := []authtypes.GenesisAccount{&acc} benchmarkApp := simapp.SetupWithGenesisAccounts(genAccs) - ctx := benchmarkApp.BaseApp.NewContext(false, ostproto.Header{}) + ctx := benchmarkApp.BaseApp.NewContext(false, ocproto.Header{}) // some value conceivably higher than the benchmarks would ever go err := benchmarkApp.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 100000000000))) @@ -87,7 +87,7 @@ func BenchmarkOneBankMultiSendTxPerBlock(b *testing.B) { // Run this with a profiler, so its easy to distinguish what time comes from // Committing, and what time comes from Check/Deliver Tx. for i := 0; i < b.N; i++ { - benchmarkApp.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: height}}) + benchmarkApp.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: height}}) _, err := benchmarkApp.Check(txGen.TxEncoder(), txs[i]) if err != nil { panic("something is broken in checking transaction") diff --git a/x/bank/handler_test.go b/x/bank/handler_test.go index 19d58d7e32..0c4bd18243 100644 --- a/x/bank/handler_test.go +++ b/x/bank/handler_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/crypto/keys/secp256k1" @@ -22,7 +22,7 @@ import ( func TestInvalidMsg(t *testing.T) { h := bank.NewHandler(nil) - res, err := h(sdk.NewContext(nil, ostproto.Header{}, false, nil), testdata.NewTestMsg()) + res, err := h(sdk.NewContext(nil, ocproto.Header{}, false, nil), testdata.NewTestMsg()) require.Error(t, err) require.Nil(t, res) @@ -66,7 +66,7 @@ func TestSendToModuleAccount(t *testing.T) { } app := simapp.SetupWithGenesisAccounts(accs, balances...) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.BankKeeper = bankkeeper.NewBaseKeeper( app.AppCodec(), app.GetKey(types.StoreKey), app.AccountKeeper, app.GetSubspace(types.ModuleName), map[string]bool{ diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index f8061f04be..db1077fd91 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -5,7 +5,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" osttime "github.com/line/ostracon/types/time" "github.com/stretchr/testify/suite" @@ -68,7 +68,7 @@ type IntegrationTestSuite struct { func (suite *IntegrationTestSuite) SetupTest() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) app.BankKeeper.SetParams(ctx, types.DefaultParams()) @@ -97,7 +97,7 @@ func (suite *IntegrationTestSuite) TestSupply() { func (suite *IntegrationTestSuite) TestSupply_SendCoins() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{Height: 1}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{Height: 1}) appCodec := app.AppCodec() // add module accounts to supply keeper @@ -160,7 +160,7 @@ func (suite *IntegrationTestSuite) TestSupply_SendCoins() { func (suite *IntegrationTestSuite) TestSupply_MintCoins() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{Height: 1}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{Height: 1}) appCodec := app.AppCodec() // add module accounts to supply keeper @@ -214,7 +214,7 @@ func (suite *IntegrationTestSuite) TestSupply_MintCoins() { func (suite *IntegrationTestSuite) TestSupply_BurnCoins() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{Height: 1}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{Height: 1}) appCodec, _ := simapp.MakeCodecs() // add module accounts to supply keeper @@ -408,7 +408,7 @@ func (suite *IntegrationTestSuite) TestSendCoins() { func (suite *IntegrationTestSuite) TestValidateBalance() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) addr1 := sdk.AccAddress([]byte("addr1_______________")) @@ -673,7 +673,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { func (suite *IntegrationTestSuite) TestSpendableCoins() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) @@ -704,7 +704,7 @@ func (suite *IntegrationTestSuite) TestSpendableCoins() { func (suite *IntegrationTestSuite) TestVestingAccountSend() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) @@ -734,7 +734,7 @@ func (suite *IntegrationTestSuite) TestVestingAccountSend() { func (suite *IntegrationTestSuite) TestPeriodicVestingAccountSend() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) @@ -767,7 +767,7 @@ func (suite *IntegrationTestSuite) TestPeriodicVestingAccountSend() { func (suite *IntegrationTestSuite) TestVestingAccountReceive() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) @@ -801,7 +801,7 @@ func (suite *IntegrationTestSuite) TestVestingAccountReceive() { func (suite *IntegrationTestSuite) TestPeriodicVestingAccountReceive() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) @@ -840,7 +840,7 @@ func (suite *IntegrationTestSuite) TestPeriodicVestingAccountReceive() { func (suite *IntegrationTestSuite) TestDelegateCoins() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) @@ -900,7 +900,7 @@ func (suite *IntegrationTestSuite) TestDelegateCoins_Invalid() { func (suite *IntegrationTestSuite) TestUndelegateCoins() { app, ctx := suite.app, suite.ctx now := osttime.Now() - ctx = ctx.WithBlockHeader(ostproto.Header{Time: now}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index f4f51f9b06..e084b8d11f 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -5,7 +5,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/simapp" @@ -27,7 +27,7 @@ func (suite *SimTestSuite) SetupTest() { checkTx := false app := simapp.Setup(checkTx) suite.app = app - suite.ctx = app.BaseApp.NewContext(checkTx, ostproto.Header{}) + suite.ctx = app.BaseApp.NewContext(checkTx, ocproto.Header{}) } // TestWeightedOperations tests the weights of the operations. @@ -71,7 +71,7 @@ func (suite *SimTestSuite) TestSimulateMsgSend() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgSend(suite.app.AccountKeeper, suite.app.BankKeeper) @@ -99,7 +99,7 @@ func (suite *SimTestSuite) TestSimulateMsgMultiSend() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgMultiSend(suite.app.AccountKeeper, suite.app.BankKeeper) diff --git a/x/bank/simulation/params.go b/x/bank/simulation/params.go index 3221a43f4b..494552cc5a 100644 --- a/x/bank/simulation/params.go +++ b/x/bank/simulation/params.go @@ -23,7 +23,7 @@ func ParamChanges(r *rand.Rand) []simtypes.ParamChange { if err != nil { panic(err) } - return fmt.Sprintf("%s", paramsBytes) + return string(paramsBytes) }, ), simulation.NewSimParamChange(types.ModuleName, string(types.KeyDefaultSendEnabled), diff --git a/x/bank/types/balance.go b/x/bank/types/balance.go index bc54ead227..54986bb8ff 100644 --- a/x/bank/types/balance.go +++ b/x/bank/types/balance.go @@ -50,7 +50,7 @@ func (b Balance) Validate() error { } // sort the coins post validation - b.Coins = b.Coins.Sort() + b.Coins.Sort() return nil } diff --git a/x/capability/keeper/keeper_test.go b/x/capability/keeper/keeper_test.go index bd38accfdb..bc1fc91cde 100644 --- a/x/capability/keeper/keeper_test.go +++ b/x/capability/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/simapp" @@ -32,7 +32,7 @@ func (suite *KeeperTestSuite) SetupTest() { keeper := keeper.NewKeeper(cdc, app.GetKey(types.StoreKey), app.GetMemKey(types.MemStoreKey)) suite.app = app - suite.ctx = app.BaseApp.NewContext(checkTx, ostproto.Header{Height: 1}) + suite.ctx = app.BaseApp.NewContext(checkTx, ocproto.Header{Height: 1}) suite.keeper = keeper } diff --git a/x/capability/spec/README.md b/x/capability/spec/README.md index 5ff5df7232..3416b393cb 100644 --- a/x/capability/spec/README.md +++ b/x/capability/spec/README.md @@ -63,7 +63,7 @@ func NewApp(...) *App { // Initialize and seal the capability keeper so all persistent capabilities // are loaded in-memory and prevent any further modules from creating scoped // sub-keepers. - ctx := app.BaseApp.NewContext(true, ostproto.Header{}) + ctx := app.BaseApp.NewContext(true, ocproto.Header{}) app.capabilityKeeper.InitializeAndSeal(ctx) return app diff --git a/x/crisis/handler_test.go b/x/crisis/handler_test.go index aff7ea5eb1..abea26c338 100644 --- a/x/crisis/handler_test.go +++ b/x/crisis/handler_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -28,7 +28,7 @@ var ( func createTestApp() (*simapp.SimApp, sdk.Context, []sdk.AccAddress) { db := memdb.NewDB() app := simapp.NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, simapp.DefaultNodeHome, 1, simapp.MakeTestEncodingConfig(), simapp.EmptyAppOptions{}) - ctx := app.NewContext(true, ostproto.Header{}) + ctx := app.NewContext(true, ocproto.Header{}) constantFee := sdk.NewInt64Coin(sdk.DefaultBondDenom, 10) app.CrisisKeeper.SetConstantFee(ctx, constantFee) diff --git a/x/crisis/keeper/keeper_test.go b/x/crisis/keeper/keeper_test.go index e0b50d88de..7722ee01a5 100644 --- a/x/crisis/keeper/keeper_test.go +++ b/x/crisis/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -14,14 +14,14 @@ import ( func TestLogger(t *testing.T) { app := simapp.Setup(false) - ctx := app.NewContext(true, ostproto.Header{}) + ctx := app.NewContext(true, ocproto.Header{}) require.Equal(t, ctx.Logger(), app.CrisisKeeper.Logger(ctx)) } func TestInvariants(t *testing.T) { app := simapp.Setup(false) app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1}}) require.Equal(t, app.CrisisKeeper.InvCheckPeriod(), uint(5)) @@ -34,9 +34,9 @@ func TestInvariants(t *testing.T) { func TestAssertInvariants(t *testing.T) { app := simapp.Setup(false) app.Commit() - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1}}) - ctx := app.NewContext(true, ostproto.Header{}) + ctx := app.NewContext(true, ocproto.Header{}) app.CrisisKeeper.RegisterRoute("testModule", "testRoute1", func(sdk.Context) (string, bool) { return "", false }) require.NotPanics(t, func() { app.CrisisKeeper.AssertInvariants(ctx) }) diff --git a/x/distribution/abci.go b/x/distribution/abci.go index 34698cc90a..6c8821783d 100644 --- a/x/distribution/abci.go +++ b/x/distribution/abci.go @@ -19,9 +19,9 @@ func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) // determine the total power signing the block var previousTotalPower, sumPreviousPrecommitPower int64 for _, voteInfo := range req.LastCommitInfo.GetVotes() { - previousTotalPower += voteInfo.Validator.Power + previousTotalPower += voteInfo.Validator.VotingPower if voteInfo.SignedLastBlock { - sumPreviousPrecommitPower += voteInfo.Validator.Power + sumPreviousPrecommitPower += voteInfo.Validator.VotingPower } } diff --git a/x/distribution/keeper/allocation.go b/x/distribution/keeper/allocation.go index 57bf16557e..599fa53c83 100644 --- a/x/distribution/keeper/allocation.go +++ b/x/distribution/keeper/allocation.go @@ -88,7 +88,7 @@ func (k Keeper) AllocateTokens( // TODO consider microslashing for missing votes. // ref https://github.com/cosmos/cosmos-sdk/issues/2525#issuecomment-430838701 - powerFraction := sdk.NewDec(vote.Validator.Power).QuoTruncate(sdk.NewDec(totalPreviousPower)) + powerFraction := sdk.NewDec(vote.Validator.VotingPower).QuoTruncate(sdk.NewDec(totalPreviousPower)) reward := feesCollected.MulDecTruncate(voteMultiplier).MulDecTruncate(powerFraction) k.AllocateTokensToValidator(ctx, validator, reward) remaining = remaining.Sub(reward) diff --git a/x/distribution/keeper/allocation_test.go b/x/distribution/keeper/allocation_test.go index 229f448602..fa6215b9f8 100644 --- a/x/distribution/keeper/allocation_test.go +++ b/x/distribution/keeper/allocation_test.go @@ -4,7 +4,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -16,7 +16,7 @@ import ( func TestAllocateTokensToValidatorWithCommission(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 3, sdk.NewInt(1234)) valAddrs := simapp.ConvertAddrsToValAddrs(addrs) @@ -45,7 +45,7 @@ func TestAllocateTokensToValidatorWithCommission(t *testing.T) { func TestAllocateTokensToManyValidators(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1234)) valAddrs := simapp.ConvertAddrsToValAddrs(addrs) @@ -60,12 +60,14 @@ func TestAllocateTokensToManyValidators(t *testing.T) { tstaking.CreateValidator(valAddrs[1], valConsPk2, sdk.NewInt(100), true) abciValA := abci.Validator{ - Address: valConsPk1.Address(), - Power: 100, + Address: valConsPk1.Address(), + Power: 100, + VotingPower: 100, } abciValB := abci.Validator{ - Address: valConsPk2.Address(), - Power: 100, + Address: valConsPk2.Address(), + Power: 100, + VotingPower: 100, } // assert initial state: zero outstanding rewards, zero community pool, zero commission, zero current rewards @@ -115,7 +117,7 @@ func TestAllocateTokensToManyValidators(t *testing.T) { func TestAllocateTokensTruncation(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 3, sdk.NewInt(1234)) valAddrs := simapp.ConvertAddrsToValAddrs(addrs) @@ -134,16 +136,19 @@ func TestAllocateTokensTruncation(t *testing.T) { tstaking.CreateValidator(valAddrs[2], valConsPk3, sdk.NewInt(100), true) abciValA := abci.Validator{ - Address: valConsPk1.Address(), - Power: 11, + Address: valConsPk1.Address(), + Power: 11, + VotingPower: 11, } abciValB := abci.Validator{ - Address: valConsPk2.Address(), - Power: 10, + Address: valConsPk2.Address(), + Power: 10, + VotingPower: 10, } abciValС := abci.Validator{ - Address: valConsPk3.Address(), - Power: 10, + Address: valConsPk3.Address(), + Power: 10, + VotingPower: 10, } // assert initial state: zero outstanding rewards, zero community pool, zero commission, zero current rewards diff --git a/x/distribution/keeper/delegation_test.go b/x/distribution/keeper/delegation_test.go index 3a8947750d..86b55a89b1 100644 --- a/x/distribution/keeper/delegation_test.go +++ b/x/distribution/keeper/delegation_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -15,7 +15,7 @@ import ( func TestCalculateRewardsBasic(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1000)) @@ -69,7 +69,7 @@ func TestCalculateRewardsBasic(t *testing.T) { func TestCalculateRewardsAfterSlash(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(100000000)) valAddrs := simapp.ConvertAddrsToValAddrs(addr) @@ -132,7 +132,7 @@ func TestCalculateRewardsAfterSlash(t *testing.T) { func TestCalculateRewardsAfterManySlashes(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(100000000)) @@ -207,7 +207,7 @@ func TestCalculateRewardsAfterManySlashes(t *testing.T) { func TestCalculateRewardsMultiDelegator(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(100000000)) @@ -272,7 +272,7 @@ func TestWithdrawDelegationRewardsBasic(t *testing.T) { balancePower := int64(1000) balanceTokens := sdk.TokensFromConsensusPower(balancePower) app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addr := simapp.AddTestAddrs(app, ctx, 1, sdk.NewInt(1000000000)) valAddrs := simapp.ConvertAddrsToValAddrs(addr) @@ -341,7 +341,7 @@ func TestWithdrawDelegationRewardsBasic(t *testing.T) { func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addr := simapp.AddTestAddrs(app, ctx, 1, sdk.NewInt(1000000000)) valAddrs := simapp.ConvertAddrsToValAddrs(addr) @@ -409,7 +409,7 @@ func TestCalculateRewardsAfterManySlashesInSameBlock(t *testing.T) { func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1000000000)) @@ -483,7 +483,7 @@ func TestCalculateRewardsMultiDelegatorMultiSlash(t *testing.T) { func TestCalculateRewardsMultiDelegatorMultWithdraw(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1000000000)) diff --git a/x/distribution/keeper/grpc_query_test.go b/x/distribution/keeper/grpc_query_test.go index 304a2670bb..0934779247 100644 --- a/x/distribution/keeper/grpc_query_test.go +++ b/x/distribution/keeper/grpc_query_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/baseapp" @@ -30,7 +30,7 @@ type KeeperTestSuite struct { func (suite *KeeperTestSuite) SetupTest() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, app.DistrKeeper) diff --git a/x/distribution/keeper/keeper_test.go b/x/distribution/keeper/keeper_test.go index 0f5e6943cd..d5e21764d0 100644 --- a/x/distribution/keeper/keeper_test.go +++ b/x/distribution/keeper/keeper_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -14,7 +14,7 @@ import ( func TestSetWithdrawAddr(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1000000000)) @@ -36,7 +36,7 @@ func TestSetWithdrawAddr(t *testing.T) { func TestWithdrawValidatorCommission(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valCommission := sdk.DecCoins{ sdk.NewDecCoinFromDec("mytoken", sdk.NewDec(5).Quo(sdk.NewDec(4))), @@ -90,7 +90,7 @@ func TestWithdrawValidatorCommission(t *testing.T) { func TestGetTotalRewards(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valCommission := sdk.DecCoins{ sdk.NewDecCoinFromDec("mytoken", sdk.NewDec(5).Quo(sdk.NewDec(4))), @@ -111,7 +111,7 @@ func TestGetTotalRewards(t *testing.T) { func TestFundCommunityPool(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addr := simapp.AddTestAddrs(app, ctx, 2, sdk.NewInt(1000000000)) diff --git a/x/distribution/keeper/querier_test.go b/x/distribution/keeper/querier_test.go index 92bbb3403b..0572f871be 100644 --- a/x/distribution/keeper/querier_test.go +++ b/x/distribution/keeper/querier_test.go @@ -5,7 +5,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/codec" @@ -117,7 +117,7 @@ func TestQueries(t *testing.T) { banktypes.RegisterLegacyAminoCodec(cdc) app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addr := simapp.AddTestAddrs(app, ctx, 1, sdk.NewInt(1000000000)) valAddrs := simapp.ConvertAddrsToValAddrs(addr) diff --git a/x/distribution/module_test.go b/x/distribution/module_test.go index 561034c129..daf5f0ef46 100644 --- a/x/distribution/module_test.go +++ b/x/distribution/module_test.go @@ -4,7 +4,7 @@ import ( "testing" abcitypes "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -14,7 +14,7 @@ import ( func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.InitChain( abcitypes.RequestInitChain{ diff --git a/x/distribution/proposal_handler_test.go b/x/distribution/proposal_handler_test.go index 826550e910..e1201a3daa 100644 --- a/x/distribution/proposal_handler_test.go +++ b/x/distribution/proposal_handler_test.go @@ -3,7 +3,7 @@ package distribution_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/crypto/keys/ed25519" @@ -26,7 +26,7 @@ func testProposal(recipient sdk.AccAddress, amount sdk.Coins) *types.CommunityPo func TestProposalHandlerPassed(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) recipient := delAddr1 @@ -56,7 +56,7 @@ func TestProposalHandlerPassed(t *testing.T) { func TestProposalHandlerFailed(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) recipient := delAddr1 diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index bf2401c0bf..9531c4fcd3 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -5,7 +5,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/simapp" @@ -64,7 +64,7 @@ func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgSetWithdrawAddress(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper) @@ -105,7 +105,7 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { suite.setupValidatorRewards(validator0.GetOperator()) // begin a new block - suite.app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgWithdrawDelegatorReward(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper, suite.app.StakingKeeper) @@ -162,7 +162,7 @@ func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName suite.app.DistrKeeper.SetValidatorAccumulatedCommission(suite.ctx, validator0.GetOperator(), types.ValidatorAccumulatedCommission{Commission: valCommission}) // begin a new block - suite.app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgWithdrawValidatorCommission(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper, suite.app.StakingKeeper) @@ -188,7 +188,7 @@ func (suite *SimTestSuite) TestSimulateMsgFundCommunityPool() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgFundCommunityPool(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper, suite.app.StakingKeeper) @@ -217,7 +217,7 @@ func (suite *SimTestSuite) SetupTest() { checkTx := false app := simapp.Setup(checkTx) suite.app = app - suite.ctx = app.BaseApp.NewContext(checkTx, ostproto.Header{}) + suite.ctx = app.BaseApp.NewContext(checkTx, ocproto.Header{}) } func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Account { diff --git a/x/distribution/simulation/proposals_test.go b/x/distribution/simulation/proposals_test.go index 87d122b01a..9314682790 100644 --- a/x/distribution/simulation/proposals_test.go +++ b/x/distribution/simulation/proposals_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -16,7 +16,7 @@ import ( func TestProposalContents(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) // initialize parameters s := rand.NewSource(1) diff --git a/x/evidence/genesis_test.go b/x/evidence/genesis_test.go index a9df4882b4..b850a28267 100644 --- a/x/evidence/genesis_test.go +++ b/x/evidence/genesis_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types/time" "github.com/stretchr/testify/suite" @@ -28,7 +28,7 @@ func (suite *GenesisTestSuite) SetupTest() { checkTx := false app := simapp.Setup(checkTx) - suite.ctx = app.BaseApp.NewContext(checkTx, ostproto.Header{Height: 1}) + suite.ctx = app.BaseApp.NewContext(checkTx, ocproto.Header{Height: 1}) suite.keeper = app.EvidenceKeeper } diff --git a/x/evidence/handler_test.go b/x/evidence/handler_test.go index 084b2d992d..73e973682e 100644 --- a/x/evidence/handler_test.go +++ b/x/evidence/handler_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -104,7 +104,7 @@ func (suite *HandlerTestSuite) TestMsgSubmitEvidence() { } for i, tc := range testCases { - ctx := suite.app.BaseApp.NewContext(false, ostproto.Header{Height: suite.app.LastBlockHeight() + 1}) + ctx := suite.app.BaseApp.NewContext(false, ocproto.Header{Height: suite.app.LastBlockHeight() + 1}) res, err := suite.handler(ctx, tc.msg) if tc.expectErr { diff --git a/x/evidence/keeper/keeper_test.go b/x/evidence/keeper/keeper_test.go index 36d6c86f49..db05322e77 100644 --- a/x/evidence/keeper/keeper_test.go +++ b/x/evidence/keeper/keeper_test.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/baseapp" @@ -92,7 +92,7 @@ func (suite *KeeperTestSuite) SetupTest() { app.EvidenceKeeper = *evidenceKeeper - suite.ctx = app.BaseApp.NewContext(checkTx, ostproto.Header{Height: 1}) + suite.ctx = app.BaseApp.NewContext(checkTx, ocproto.Header{Height: 1}) suite.querier = keeper.NewQuerier(*evidenceKeeper, app.LegacyAmino()) suite.app = app diff --git a/x/evidence/types/evidence.go b/x/evidence/types/evidence.go index f08601d9dd..9bb58bfa97 100644 --- a/x/evidence/types/evidence.go +++ b/x/evidence/types/evidence.go @@ -84,7 +84,7 @@ func (e Equivocation) GetValidatorPower() int64 { // GetTotalPower is a no-op for the Equivocation type. func (e Equivocation) GetTotalPower() int64 { return 0 } -// FromABCIEvidence converts a Tendermint concrete Evidence type to +// FromABCIEvidence converts a Ostracon concrete Evidence type to // SDK Evidence using Equivocation as the concrete type. func FromABCIEvidence(e abci.Evidence) exported.Evidence { bech32PrefixConsAddr := sdk.GetConfig().GetBech32ConsensusAddrPrefix() diff --git a/x/genutil/client/cli/collect.go b/x/genutil/client/cli/collect.go index f2808584f5..0c51dd53d7 100644 --- a/x/genutil/client/cli/collect.go +++ b/x/genutil/client/cli/collect.go @@ -4,7 +4,7 @@ import ( "encoding/json" "path/filepath" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -36,7 +36,7 @@ func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, defaultNodeH return errors.Wrap(err, "failed to initialize node validator files") } - genDoc, err := osttypes.GenesisDocFromFile(config.GenesisFile()) + genDoc, err := octypes.GenesisDocFromFile(config.GenesisFile()) if err != nil { return errors.Wrap(err, "failed to read genesis doc from file") } @@ -65,6 +65,8 @@ func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, defaultNodeH cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") cmd.Flags().String(flagGenTxDir, "", "override default \"gentx\" directory from which collect and execute genesis transactions; default [--home]/config/gentx/") + cmd.Flags().String(flags.FlagPrivKeyType, flags.DefaultPrivKeyType, "specify validator's private key type (ed25519|composite). \n"+ + "set this to priv_key.type in priv_validator_key.json; default `ed25519`") return cmd } diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index 49448afae4..a24d1ecf84 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -11,7 +11,7 @@ import ( "path/filepath" ostos "github.com/line/ostracon/libs/os" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -84,7 +84,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o } } - genDoc, err := osttypes.GenesisDocFromFile(config.GenesisFile()) + genDoc, err := octypes.GenesisDocFromFile(config.GenesisFile()) if err != nil { return errors.Wrapf(err, "failed to read genesis doc file %s", config.GenesisFile()) } diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go index e6aa85e9dc..486e37e200 100644 --- a/x/genutil/client/cli/init.go +++ b/x/genutil/client/cli/init.go @@ -147,6 +147,8 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { cmd.Flags().BoolP(FlagOverwrite, "o", false, "overwrite the genesis.json file") cmd.Flags().Bool(FlagRecover, false, "provide seed phrase to recover existing key instead of creating") cmd.Flags().String(flags.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created") + cmd.Flags().String(flags.FlagPrivKeyType, flags.DefaultPrivKeyType, "specify validator's private key type (ed25519|composite). \n"+ + "set this to priv_key.type in priv_validator_key.json; default `ed25519`") return cmd } diff --git a/x/genutil/client/cli/init_test.go b/x/genutil/client/cli/init_test.go index 9a75f1717e..22d25b9ef0 100644 --- a/x/genutil/client/cli/init_test.go +++ b/x/genutil/client/cli/init_test.go @@ -6,9 +6,11 @@ import ( "fmt" "io" "os" + "reflect" "testing" "time" + ed255192 "github.com/line/lfb-sdk/crypto/keys/ed25519" abci_server "github.com/line/ostracon/abci/server" "github.com/line/ostracon/libs/cli" "github.com/line/ostracon/libs/log" @@ -203,7 +205,8 @@ func TestInitNodeValidatorFiles(t *testing.T) { require.Nil(t, err) require.NotEqual(t, "", nodeID) - require.NotEqual(t, 0, len(valPubKey.Bytes())) + require.Equal(t, 32, len(valPubKey.Bytes())) + require.EqualValues(t, reflect.TypeOf(&ed255192.PubKey{}), reflect.TypeOf(valPubKey)) } // custom tx codec diff --git a/x/genutil/client/cli/validate_genesis.go b/x/genutil/client/cli/validate_genesis.go index 43adf4873d..72496a7cda 100644 --- a/x/genutil/client/cli/validate_genesis.go +++ b/x/genutil/client/cli/validate_genesis.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/spf13/cobra" "github.com/line/lfb-sdk/client" @@ -57,8 +57,8 @@ func ValidateGenesisCmd(mbm module.BasicManager) *cobra.Command { // validateGenDoc reads a genesis file and validates that it is a correct // Tendermint GenesisDoc. This function does not do any cosmos-related // validation. -func validateGenDoc(importGenesisFile string) (*osttypes.GenesisDoc, error) { - genDoc, err := osttypes.GenesisDocFromFile(importGenesisFile) +func validateGenDoc(importGenesisFile string) (*octypes.GenesisDoc, error) { + genDoc, err := octypes.GenesisDocFromFile(importGenesisFile) if err != nil { return nil, fmt.Errorf("%s. Make sure that"+ " you have correctly migrated all Tendermint consensus params, please see the"+ diff --git a/x/genutil/collect.go b/x/genutil/collect.go index 4a4f62c832..a2bc2a5bea 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -14,7 +14,7 @@ import ( "strings" cfg "github.com/line/ostracon/config" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/client" "github.com/line/lfb-sdk/codec" @@ -26,7 +26,7 @@ import ( // GenAppStateFromConfig gets the genesis app state from the config func GenAppStateFromConfig(cdc codec.JSONMarshaler, txEncodingConfig client.TxEncodingConfig, - config *cfg.Config, initCfg types.InitConfig, genDoc osttypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, + config *cfg.Config, initCfg types.InitConfig, genDoc octypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, ) (appState json.RawMessage, err error) { // process genesis transactions, else create default genesis.json @@ -70,7 +70,7 @@ func GenAppStateFromConfig(cdc codec.JSONMarshaler, txEncodingConfig client.TxEn // CollectTxs processes and validates application's genesis Txs and returns // the list of appGenTxs, and persistent peers required to generate genesis.json. func CollectTxs(cdc codec.JSONMarshaler, txJSONDecoder sdk.TxDecoder, moniker, genTxsDir string, - genDoc osttypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, + genDoc octypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, ) (appGenTxs []sdk.Tx, persistentPeers string, err error) { // prepare a map of all balances in genesis state to then validate // against the validators addresses diff --git a/x/genutil/collect_test.go b/x/genutil/collect_test.go index 07beda064b..27c817f7f9 100644 --- a/x/genutil/collect_test.go +++ b/x/genutil/collect_test.go @@ -9,7 +9,7 @@ import ( "github.com/gogo/protobuf/proto" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/codec" cdctypes "github.com/line/lfb-sdk/codec/types" @@ -58,7 +58,7 @@ func TestCollectTxsHandlesDirectories(t *testing.T) { srvCtx := server.NewDefaultContext() _ = srvCtx cdc := codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) - gdoc := osttypes.GenesisDoc{AppState: []byte("{}")} + gdoc := octypes.GenesisDoc{AppState: []byte("{}")} balItr := new(doNothingIterator) dnc := &doNothingUnmarshalJSON{cdc} diff --git a/x/genutil/gentx_test.go b/x/genutil/gentx_test.go index 8b63e75f50..b0eac6dcd9 100644 --- a/x/genutil/gentx_test.go +++ b/x/genutil/gentx_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - osttypes "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/crypto/keys/secp256k1" @@ -45,7 +45,7 @@ type GenTxTestSuite struct { func (suite *GenTxTestSuite) SetupTest() { checkTx := false app := simapp.Setup(checkTx) - suite.ctx = app.BaseApp.NewContext(checkTx, osttypes.Header{}) + suite.ctx = app.BaseApp.NewContext(checkTx, octypes.Header{}) suite.app = app suite.encodingConfig = simapp.MakeTestEncodingConfig() diff --git a/x/genutil/types/genesis_state.go b/x/genutil/types/genesis_state.go index 55b0545532..d5274302c2 100644 --- a/x/genutil/types/genesis_state.go +++ b/x/genutil/types/genesis_state.go @@ -6,7 +6,7 @@ import ( "fmt" ostos "github.com/line/ostracon/libs/os" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/codec" sdk "github.com/line/lfb-sdk/types" @@ -68,7 +68,7 @@ func SetGenesisStateInAppState( // for the application. // // NOTE: The pubkey input is this machines pubkey. -func GenesisStateFromGenDoc(genDoc osttypes.GenesisDoc) (genesisState map[string]json.RawMessage, err error) { +func GenesisStateFromGenDoc(genDoc octypes.GenesisDoc) (genesisState map[string]json.RawMessage, err error) { if err = json.Unmarshal(genDoc.AppState, &genesisState); err != nil { return genesisState, err @@ -80,13 +80,13 @@ func GenesisStateFromGenDoc(genDoc osttypes.GenesisDoc) (genesisState map[string // for the application. // // NOTE: The pubkey input is this machines pubkey. -func GenesisStateFromGenFile(genFile string) (genesisState map[string]json.RawMessage, genDoc *osttypes.GenesisDoc, err error) { +func GenesisStateFromGenFile(genFile string) (genesisState map[string]json.RawMessage, genDoc *octypes.GenesisDoc, err error) { if !ostos.FileExists(genFile) { return genesisState, genDoc, fmt.Errorf("%s does not exist, run `init` first", genFile) } - genDoc, err = osttypes.GenesisDocFromFile(genFile) + genDoc, err = octypes.GenesisDocFromFile(genFile) if err != nil { return genesisState, genDoc, err } diff --git a/x/genutil/utils.go b/x/genutil/utils.go index e983de180d..31874a7cba 100644 --- a/x/genutil/utils.go +++ b/x/genutil/utils.go @@ -12,7 +12,7 @@ import ( ostos "github.com/line/ostracon/libs/os" "github.com/line/ostracon/p2p" "github.com/line/ostracon/privval" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" cryptocodec "github.com/line/lfb-sdk/crypto/codec" cryptotypes "github.com/line/lfb-sdk/crypto/types" @@ -20,7 +20,7 @@ import ( // ExportGenesisFile creates and writes the genesis configuration to disk. An // error is returned if building or writing the configuration to file fails. -func ExportGenesisFile(genDoc *osttypes.GenesisDoc, genFile string) error { +func ExportGenesisFile(genDoc *octypes.GenesisDoc, genFile string) error { if err := genDoc.ValidateAndComplete(); err != nil { return err } @@ -31,11 +31,11 @@ func ExportGenesisFile(genDoc *osttypes.GenesisDoc, genFile string) error { // ExportGenesisFileWithTime creates and writes the genesis configuration to disk. // An error is returned if building or writing the configuration to file fails. func ExportGenesisFileWithTime( - genFile, chainID string, validators []osttypes.GenesisValidator, + genFile, chainID string, validators []octypes.GenesisValidator, appState json.RawMessage, genTime time.Time, ) error { - genDoc := osttypes.GenesisDoc{ + genDoc := octypes.GenesisDoc{ GenesisTime: genTime, ChainID: chainID, Validators: validators, @@ -80,7 +80,10 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin var filePV *privval.FilePV if len(mnemonic) == 0 { - filePV = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile) + filePV, err = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile, config.PrivKeyType) + if err != nil { + return "", nil, err + } } else { privKey := osted25519.GenPrivKeyFromSecret([]byte(mnemonic)) filePV = privval.NewFilePV(privKey, pvKeyFile, pvStateFile) @@ -91,7 +94,7 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin return "", nil, err } - valPubKey, err = cryptocodec.FromTmPubKeyInterface(tmValPubKey) + valPubKey, err = cryptocodec.FromOcPubKeyInterface(tmValPubKey) if err != nil { return "", nil, err } diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index f866b0f1a7..3b83056678 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -6,7 +6,7 @@ import ( "github.com/golang/protobuf/proto" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -18,10 +18,10 @@ import ( func TestTickExpiredDepositPeriod(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -70,10 +70,10 @@ func TestTickExpiredDepositPeriod(t *testing.T) { func TestTickMultipleExpiredDepositPeriod(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -147,10 +147,10 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { func TestTickPassedDepositPeriod(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -204,12 +204,12 @@ func TestTickPassedDepositPeriod(t *testing.T) { func TestTickPassedVotingPeriod(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) SortAddresses(addrs) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -272,7 +272,7 @@ func TestTickPassedVotingPeriod(t *testing.T) { func TestProposalPassedEndblocker(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) SortAddresses(addrs) @@ -280,7 +280,7 @@ func TestProposalPassedEndblocker(t *testing.T) { handler := gov.NewHandler(app.GovKeeper) stakingHandler := staking.NewHandler(app.StakingKeeper) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) valAddr := addrs[0].ToValAddress() @@ -323,13 +323,13 @@ func TestProposalPassedEndblocker(t *testing.T) { func TestEndBlockerProposalHandlerFailed(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 1, valTokens) SortAddresses(addrs) stakingHandler := staking.NewHandler(app.StakingKeeper) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) valAddr := addrs[0].ToValAddress() diff --git a/x/gov/client/utils/query_test.go b/x/gov/client/utils/query_test.go index e586c7ad83..bec9cc4ac3 100644 --- a/x/gov/client/utils/query_test.go +++ b/x/gov/client/utils/query_test.go @@ -6,7 +6,7 @@ import ( "github.com/line/ostracon/rpc/client/mock" ctypes "github.com/line/ostracon/rpc/core/types" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/client" @@ -20,7 +20,7 @@ import ( type TxSearchMock struct { mock.Client - txs []osttypes.Tx + txs []octypes.Tx } func (mock TxSearchMock) TxSearch(ctx context.Context, query string, prove bool, page, perPage *int, orderBy string) (*ctypes.ResultTxSearch, error) { @@ -47,7 +47,7 @@ func (mock TxSearchMock) TxSearch(ctx context.Context, query string, prove bool, func (mock TxSearchMock) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error) { // any non nil Block needs to be returned. used to get time value - return &ctypes.ResultBlock{Block: &osttypes.Block{}}, nil + return &ctypes.ResultBlock{Block: &octypes.Block{}}, nil } func newTestCodec() *codec.LegacyAmino { @@ -145,7 +145,7 @@ func TestGetPaginatedVotes(t *testing.T) { t.Run(tc.description, func(t *testing.T) { var ( - marshalled = make([]osttypes.Tx, len(tc.msgs)) + marshalled = make([]octypes.Tx, len(tc.msgs)) cdc = newTestCodec() ) diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index 86a226f8cb..f92b43464c 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -6,7 +6,7 @@ import ( abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -20,15 +20,15 @@ import ( func TestImportExportQueues(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 2, valTokens) SortAddresses(addrs) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) - ctx = app.BaseApp.NewContext(false, ostproto.Header{}) + ctx = app.BaseApp.NewContext(false, ocproto.Header{}) // Create two proposals, put the second into the voting period proposal := TestProposal @@ -79,12 +79,12 @@ func TestImportExportQueues(t *testing.T) { ) app2.Commit() - app2.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app2.LastBlockHeight() + 1}}) + app2.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app2.LastBlockHeight() + 1}}) - header = ostproto.Header{Height: app2.LastBlockHeight() + 1} + header = ocproto.Header{Height: app2.LastBlockHeight() + 1} app2.BeginBlock(abci.RequestBeginBlock{Header: header}) - ctx2 := app2.BaseApp.NewContext(false, ostproto.Header{}) + ctx2 := app2.BaseApp.NewContext(false, ocproto.Header{}) // Jump the time forward past the DepositPeriod and VotingPeriod ctx2 = ctx2.WithBlockTime(ctx2.BlockHeader().Time.Add(app2.GovKeeper.GetDepositParams(ctx2).MaxDepositPeriod).Add(app2.GovKeeper.GetVotingParams(ctx2).VotingPeriod)) @@ -113,12 +113,12 @@ func TestImportExportQueues(t *testing.T) { func TestEqualProposals(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrs(app, ctx, 2, valTokens) SortAddresses(addrs) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) // Submit two proposals diff --git a/x/gov/handler_test.go b/x/gov/handler_test.go index 980ee8aab5..c5081c0934 100644 --- a/x/gov/handler_test.go +++ b/x/gov/handler_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/testutil/testdata" @@ -19,7 +19,7 @@ func TestInvalidMsg(t *testing.T) { k := keeper.Keeper{} h := gov.NewHandler(k) - res, err := h(sdk.NewContext(nil, ostproto.Header{}, false, nil), testdata.NewTestMsg()) + res, err := h(sdk.NewContext(nil, ocproto.Header{}, false, nil), testdata.NewTestMsg()) require.Error(t, err) require.Nil(t, res) require.True(t, strings.Contains(err.Error(), "unrecognized gov message type")) diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index 6a1d68ca42..4212ff2327 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -13,7 +13,7 @@ import ( func TestDeposits(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) TestAddrs := simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(10000000)) diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index ba99227834..f5c7c71978 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -24,7 +24,7 @@ type KeeperTestSuite struct { func (suite *KeeperTestSuite) SetupTest() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, app.GovKeeper) @@ -38,7 +38,7 @@ func (suite *KeeperTestSuite) SetupTest() { func TestIncrementProposalNumber(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tp := TestProposal _, err := app.GovKeeper.SubmitProposal(ctx, tp) @@ -59,7 +59,7 @@ func TestIncrementProposalNumber(t *testing.T) { func TestProposalQueues(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) // create test proposals tp := TestProposal diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index 15642309cd..bd0213b4f0 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -17,7 +17,7 @@ import ( func TestGetSetProposal(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tp := TestProposal proposal, err := app.GovKeeper.SubmitProposal(ctx, tp) @@ -32,7 +32,7 @@ func TestGetSetProposal(t *testing.T) { func TestActivateVotingPeriod(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) tp := TestProposal proposal, err := app.GovKeeper.SubmitProposal(ctx, tp) @@ -61,7 +61,7 @@ func (invalidProposalRoute) ProposalRoute() string { return "nonexistingroute" } func TestSubmitProposal(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) testCases := []struct { content types.Content @@ -86,7 +86,7 @@ func TestSubmitProposal(t *testing.T) { func TestGetProposalsFiltered(t *testing.T) { proposalID := uint64(1) app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) status := []types.ProposalStatus{types.StatusDepositPeriod, types.StatusVotingPeriod} diff --git a/x/gov/keeper/querier_test.go b/x/gov/keeper/querier_test.go index 297eb58b81..51d2b05861 100644 --- a/x/gov/keeper/querier_test.go +++ b/x/gov/keeper/querier_test.go @@ -7,7 +7,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/codec" @@ -146,7 +146,7 @@ func getQueriedVotes(t *testing.T, ctx sdk.Context, cdc *codec.LegacyAmino, quer func TestQueries(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) legacyQuerierCdc := app.LegacyAmino() querier := keeper.NewQuerier(app.GovKeeper, legacyQuerierCdc) @@ -306,7 +306,7 @@ func TestQueries(t *testing.T) { func TestPaginatedVotesQuery(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) legacyQuerierCdc := app.LegacyAmino() proposal := types.Proposal{ diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 5622733c28..b3f4ed7391 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -15,7 +15,7 @@ import ( func TestTallyNoOneVotes(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) createValidators(t, ctx, app, []int64{5, 5, 5}) @@ -37,7 +37,7 @@ func TestTallyNoOneVotes(t *testing.T) { func TestTallyNoQuorum(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) createValidators(t, ctx, app, []int64{5, 2, 0}) // validators order was changed since using address string @@ -62,7 +62,7 @@ func TestTallyNoQuorum(t *testing.T) { func TestTallyOnlyValidatorsAllYes(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs, _ := createValidators(t, ctx, app, []int64{5, 5, 5}) tp := TestProposal @@ -88,7 +88,7 @@ func TestTallyOnlyValidatorsAllYes(t *testing.T) { func TestTallyOnlyValidators51No(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 5, 0}) @@ -112,7 +112,7 @@ func TestTallyOnlyValidators51No(t *testing.T) { func TestTallyOnlyValidators51Yes(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 5, 0}) @@ -137,7 +137,7 @@ func TestTallyOnlyValidators51Yes(t *testing.T) { func TestTallyOnlyValidatorsVetoed(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7}) @@ -163,7 +163,7 @@ func TestTallyOnlyValidatorsVetoed(t *testing.T) { func TestTallyOnlyValidatorsAbstainPasses(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7}) @@ -189,7 +189,7 @@ func TestTallyOnlyValidatorsAbstainPasses(t *testing.T) { func TestTallyOnlyValidatorsAbstainFails(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7}) @@ -215,7 +215,7 @@ func TestTallyOnlyValidatorsAbstainFails(t *testing.T) { func TestTallyOnlyValidatorsNonVoter(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) valAccAddrs, _ := createValidators(t, ctx, app, []int64{5, 6, 7}) valAccAddr1, valAccAddr2 := valAccAddrs[0], valAccAddrs[1] @@ -241,7 +241,7 @@ func TestTallyOnlyValidatorsNonVoter(t *testing.T) { func TestTallyDelgatorOverride(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs, valAddrs := createValidators(t, ctx, app, []int64{5, 6, 7}) @@ -277,7 +277,7 @@ func TestTallyDelgatorOverride(t *testing.T) { func TestTallyDelgatorInherit(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) @@ -312,7 +312,7 @@ func TestTallyDelgatorInherit(t *testing.T) { func TestTallyDelgatorMultipleOverride(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs, vals := createValidators(t, ctx, app, []int64{5, 6, 7}) @@ -352,7 +352,7 @@ func TestTallyDelgatorMultipleOverride(t *testing.T) { func TestTallyDelgatorMultipleInherit(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) createValidators(t, ctx, app, []int64{25, 6, 7}) @@ -393,7 +393,7 @@ func TestTallyDelgatorMultipleInherit(t *testing.T) { func TestTallyJailedValidator(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs, valAddrs := createValidators(t, ctx, app, []int64{25, 6, 7}) @@ -436,7 +436,7 @@ func TestTallyJailedValidator(t *testing.T) { func TestTallyValidatorMultipleDelegations(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs, valAddrs := createValidators(t, ctx, app, []int64{10, 10, 10}) diff --git a/x/gov/keeper/vote_test.go b/x/gov/keeper/vote_test.go index b0d8e7b026..5010803a30 100644 --- a/x/gov/keeper/vote_test.go +++ b/x/gov/keeper/vote_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -13,7 +13,7 @@ import ( func TestVotes(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrs := simapp.AddTestAddrsIncremental(app, ctx, 5, sdk.NewInt(30000000)) diff --git a/x/gov/module_test.go b/x/gov/module_test.go index fdb82e9fe3..041ac6efe2 100644 --- a/x/gov/module_test.go +++ b/x/gov/module_test.go @@ -4,7 +4,7 @@ import ( "testing" abcitypes "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -14,7 +14,7 @@ import ( func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.InitChain( abcitypes.RequestInitChain{ diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index e83ccecd0a..beee69f978 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -7,7 +7,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -104,7 +104,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { accounts := getTestingAccounts(t, r, app, ctx, 3) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgSubmitProposal(app.AccountKeeper, app.BankKeeper, app.GovKeeper, MockWeightedProposalContent{3}.ContentSimulatorFn()) @@ -147,7 +147,7 @@ func TestSimulateMsgDeposit(t *testing.T) { app.GovKeeper.SetProposal(ctx, proposal) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgDeposit(app.AccountKeeper, app.BankKeeper, app.GovKeeper) @@ -189,7 +189,7 @@ func TestSimulateMsgVote(t *testing.T) { app.GovKeeper.ActivateVotingPeriod(ctx, proposal) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgVote(app.AccountKeeper, app.BankKeeper, app.GovKeeper) @@ -212,7 +212,7 @@ func TestSimulateMsgVote(t *testing.T) { func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) app.MintKeeper.SetParams(ctx, minttypes.DefaultParams()) app.MintKeeper.SetMinter(ctx, minttypes.DefaultInitialMinter()) diff --git a/x/gov/simulation/proposals_test.go b/x/gov/simulation/proposals_test.go index 279cd27838..a2eddaf680 100644 --- a/x/gov/simulation/proposals_test.go +++ b/x/gov/simulation/proposals_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" simappparams "github.com/line/lfb-sdk/simapp/params" @@ -18,7 +18,7 @@ func TestProposalContents(t *testing.T) { s := rand.NewSource(1) r := rand.New(s) - ctx := sdk.NewContext(nil, ostproto.Header{}, true, nil) + ctx := sdk.NewContext(nil, ocproto.Header{}, true, nil) accounts := simtypes.RandomAccounts(r, 3) // execute ProposalContents function diff --git a/x/gov/types/msgs.go b/x/gov/types/msgs.go index ec3fe232fb..f25ee41a7d 100644 --- a/x/gov/types/msgs.go +++ b/x/gov/types/msgs.go @@ -198,9 +198,6 @@ func (msg MsgVote) ValidateBasic() error { if err := sdk.ValidateAccAddress(msg.Voter); err != nil { return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid voter address (%s)", err) } - if err := sdk.ValidateAccAddress(msg.Voter); err != nil { - return sdkerrors.Wrap(err, msg.Voter) - } if !ValidVoteOption(msg.Option) { return sdkerrors.Wrap(ErrInvalidVote, msg.Option.String()) } diff --git a/x/ibc/applications/transfer/handler_test.go b/x/ibc/applications/transfer/handler_test.go index d701ab9068..954b58c582 100644 --- a/x/ibc/applications/transfer/handler_test.go +++ b/x/ibc/applications/transfer/handler_test.go @@ -35,7 +35,7 @@ func (suite *TransferTestSuite) SetupTest() { // and sends the same coin back from chainB to chainA. func (suite *TransferTestSuite) TestHandleMsgTransfer() { // setup between chainA and chainB - clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB := suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) // originalBalance := suite.chainA.App.BankKeeper.GetBalance(suite.chainA.GetContext(), suite.chainA.SenderAccount.GetAddress(), sdk.DefaultBondDenom) timeoutHeight := clienttypes.NewHeight(0, 110) @@ -63,7 +63,7 @@ func (suite *TransferTestSuite) TestHandleMsgTransfer() { suite.Require().Equal(coinSentFromAToB, balance) // setup between chainB to chainC - clientOnBForC, clientOnCForB, connOnBForC, connOnCForB := suite.coordinator.SetupClientConnections(suite.chainB, suite.chainC, exported.Tendermint) + clientOnBForC, clientOnCForB, connOnBForC, connOnCForB := suite.coordinator.SetupClientConnections(suite.chainB, suite.chainC, exported.Ostracon) channelOnBForC, channelOnCForB := suite.coordinator.CreateTransferChannels(suite.chainB, suite.chainC, connOnBForC, connOnCForB, channeltypes.UNORDERED) // send from chainB to chainC diff --git a/x/ibc/applications/transfer/keeper/mbt_relay_test.go b/x/ibc/applications/transfer/keeper/mbt_relay_test.go index 0aa6cc15cb..f189f653f8 100644 --- a/x/ibc/applications/transfer/keeper/mbt_relay_test.go +++ b/x/ibc/applications/transfer/keeper/mbt_relay_test.go @@ -312,8 +312,8 @@ func (suite *KeeperTestSuite) TestModelBasedRelay() { } suite.SetupTest() - _, _, connAB, connBA := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) - _, _, connBC, connCB := suite.coordinator.SetupClientConnections(suite.chainB, suite.chainC, exported.Tendermint) + _, _, connAB, connBA := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) + _, _, connBC, connCB := suite.coordinator.SetupClientConnections(suite.chainB, suite.chainC, exported.Ostracon) suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connAB, connBA, channeltypes.UNORDERED) suite.coordinator.CreateTransferChannels(suite.chainB, suite.chainC, connBC, connCB, channeltypes.UNORDERED) diff --git a/x/ibc/applications/transfer/keeper/relay_test.go b/x/ibc/applications/transfer/keeper/relay_test.go index 0d907ed8b3..6488460d25 100644 --- a/x/ibc/applications/transfer/keeper/relay_test.go +++ b/x/ibc/applications/transfer/keeper/relay_test.go @@ -29,28 +29,28 @@ func (suite *KeeperTestSuite) TestSendTransfer() { }{ {"successful transfer from source chain", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) }, true, true}, {"successful transfer with coin from counterparty chain", func() { // send coin from chainA back to chainB - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = types.GetTransferCoin(channelA.PortID, channelA.ID, sdk.DefaultBondDenom, 100) }, false, true}, {"source channel not found", func() { // channel references wrong ID - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) channelA.ID = ibctesting.InvalidID amount = sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100)) }, true, false}, {"next seq send not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort) channelB = suite.chainB.NextTestChannel(connB, ibctesting.TransferPort) // manually create channel so next seq send is never set @@ -67,20 +67,20 @@ func (suite *KeeperTestSuite) TestSendTransfer() { // - source chain {"send coin failed", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = sdk.NewCoin("randomdenom", sdk.NewInt(100)) }, true, false}, // - receiving chain {"send from module account failed", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = types.GetTransferCoin(channelA.PortID, channelA.ID, " randomdenom", 100) }, false, false}, {"channel capability not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) cap := suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) @@ -178,7 +178,7 @@ func (suite *KeeperTestSuite) TestOnRecvPacket() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset - clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) receiver = suite.chainB.SenderAccount.GetAddress().String() // must be explicitly changed in malleate @@ -366,7 +366,7 @@ func (suite *KeeperTestSuite) TestOnTimeoutPacket() { suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { suite.SetupTest() // reset - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB = suite.coordinator.CreateTransferChannels(suite.chainA, suite.chainB, connA, connB, channeltypes.UNORDERED) amount = sdk.NewInt(100) // must be explicitly changed sender = suite.chainA.SenderAccount.GetAddress().String() diff --git a/x/ibc/applications/transfer/module_test.go b/x/ibc/applications/transfer/module_test.go index 7cfc7532bb..22da2d9800 100644 --- a/x/ibc/applications/transfer/module_test.go +++ b/x/ibc/applications/transfer/module_test.go @@ -62,7 +62,7 @@ func (suite *TransferTestSuite) TestOnChanOpenInit() { suite.Run(tc.name, func() { suite.SetupTest() // reset - _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) testChannel = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort) counterparty := channeltypes.NewCounterparty(testChannel.PortID, testChannel.ID) channel = &channeltypes.Channel{ @@ -155,7 +155,7 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() { suite.Run(tc.name, func() { suite.SetupTest() // reset - _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) testChannel = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort) counterparty := channeltypes.NewCounterparty(testChannel.PortID, testChannel.ID) channel = &channeltypes.Channel{ @@ -221,7 +221,7 @@ func (suite *TransferTestSuite) TestOnChanOpenAck() { suite.Run(tc.name, func() { suite.SetupTest() // reset - _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) testChannel = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort) counterpartyVersion = types.Version diff --git a/x/ibc/applications/transfer/simulation/params.go b/x/ibc/applications/transfer/simulation/params.go index 511eba0f4a..e06fe0f6f1 100644 --- a/x/ibc/applications/transfer/simulation/params.go +++ b/x/ibc/applications/transfer/simulation/params.go @@ -1,7 +1,6 @@ package simulation import ( - "fmt" "math/rand" gogotypes "github.com/gogo/protobuf/types" @@ -19,13 +18,13 @@ func ParamChanges(r *rand.Rand) []simtypes.ParamChange { simulation.NewSimParamChange(types.ModuleName, string(types.KeySendEnabled), func(r *rand.Rand) string { sendEnabled := RadomEnabled(r) - return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled})) + return string(types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: sendEnabled})) }, ), simulation.NewSimParamChange(types.ModuleName, string(types.KeyReceiveEnabled), func(r *rand.Rand) string { receiveEnabled := RadomEnabled(r) - return fmt.Sprintf("%s", types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) + return string(types.ModuleCdc.MustMarshalJSON(&gogotypes.BoolValue{Value: receiveEnabled})) }, ), } diff --git a/x/ibc/applications/transfer/types/trace.go b/x/ibc/applications/transfer/types/trace.go index ddafe2714e..e200ae0543 100644 --- a/x/ibc/applications/transfer/types/trace.go +++ b/x/ibc/applications/transfer/types/trace.go @@ -8,7 +8,7 @@ import ( "strings" ostbytes "github.com/line/ostracon/libs/bytes" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" sdk "github.com/line/lfb-sdk/types" sdkerrors "github.com/line/lfb-sdk/types/errors" @@ -195,7 +195,7 @@ func ParseHexHash(hexHash string) (ostbytes.HexBytes, error) { return nil, err } - if err := osttypes.ValidateHash(hash); err != nil { + if err := octypes.ValidateHash(hash); err != nil { return nil, err } diff --git a/x/ibc/core/02-client/abci_test.go b/x/ibc/core/02-client/abci_test.go index 8623c33a8e..c1b7e500b2 100644 --- a/x/ibc/core/02-client/abci_test.go +++ b/x/ibc/core/02-client/abci_test.go @@ -8,7 +8,7 @@ import ( client "github.com/line/lfb-sdk/x/ibc/core/02-client" "github.com/line/lfb-sdk/x/ibc/core/02-client/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - localhosttypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + localhoctypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -29,7 +29,7 @@ func (suite *ClientTestSuite) SetupTest() { // set localhost client revision := types.ParseChainID(suite.chainA.GetContext().ChainID()) - localHostClient := localhosttypes.NewClientState( + localHostClient := localhoctypes.NewClientState( suite.chainA.GetContext().ChainID(), types.NewHeight(revision, uint64(suite.chainA.GetContext().BlockHeight())), ) suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), exported.Localhost, localHostClient) diff --git a/x/ibc/core/02-client/client/cli/query.go b/x/ibc/core/02-client/client/cli/query.go index 9221c18197..b06c3590fe 100644 --- a/x/ibc/core/02-client/client/cli/query.go +++ b/x/ibc/core/02-client/client/cli/query.go @@ -193,7 +193,7 @@ func GetCmdQueryHeader() *cobra.Command { if err != nil { return err } - header, height, err := utils.QueryTendermintHeader(clientCtx) + header, height, err := utils.QueryOstraconHeader(clientCtx) if err != nil { return err } diff --git a/x/ibc/core/02-client/client/utils/utils.go b/x/ibc/core/02-client/client/utils/utils.go index fc6e6241c4..fc6830d8c7 100644 --- a/x/ibc/core/02-client/client/utils/utils.go +++ b/x/ibc/core/02-client/client/utils/utils.go @@ -3,7 +3,7 @@ package utils import ( "context" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/client" @@ -14,7 +14,7 @@ import ( host "github.com/line/lfb-sdk/x/ibc/core/24-host" ibcclient "github.com/line/lfb-sdk/x/ibc/core/client" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) // QueryClientState returns a client state. If prove is true, it performs an ABCI store query @@ -118,9 +118,9 @@ func QueryConsensusStateABCI( return types.NewQueryConsensusStateResponse(anyConsensusState, proofBz, proofHeight), nil } -// QueryTendermintHeader takes a client context and returns the appropriate -// tendermint header -func QueryTendermintHeader(clientCtx client.Context) (ibctmtypes.Header, int64, error) { +// QueryOstraconHeader takes a client context and returns the appropriate +// ostracon header +func QueryOstraconHeader(clientCtx client.Context) (ibctmtypes.Header, int64, error) { node, err := clientCtx.GetNode() if err != nil { return ibctmtypes.Header{}, 0, err @@ -146,8 +146,20 @@ func QueryTendermintHeader(clientCtx client.Context) (ibctmtypes.Header, int64, return ibctmtypes.Header{}, 0, err } + page = 0 + count = 10_000 + voters, err := node.Voters(context.Background(), &height, &page, &count) + if err != nil { + return ibctmtypes.Header{}, 0, err + } + protoCommit := commit.SignedHeader.ToProto() - protoValset, err := osttypes.NewValidatorSet(validators.Validators).ToProto() + protoValset, err := octypes.NewValidatorSet(validators.Validators).ToProto() + if err != nil { + return ibctmtypes.Header{}, 0, err + } + + protoVoterSet, err := octypes.WrapValidatorsToVoterSet(voters.Voters).ToProto() if err != nil { return ibctmtypes.Header{}, 0, err } @@ -155,6 +167,7 @@ func QueryTendermintHeader(clientCtx client.Context) (ibctmtypes.Header, int64, header := ibctmtypes.Header{ SignedHeader: protoCommit, ValidatorSet: protoValset, + VoterSet: protoVoterSet, } return header, height, nil @@ -192,7 +205,7 @@ func QueryNodeConsensusState(clientCtx client.Context) (*ibctmtypes.ConsensusSta state := &ibctmtypes.ConsensusState{ Timestamp: commit.Time, Root: commitmenttypes.NewMerkleRoot(commit.AppHash), - NextValidatorsHash: osttypes.NewValidatorSet(nextVals.Validators).Hash(), + NextValidatorsHash: octypes.NewValidatorSet(nextVals.Validators).Hash(), } return state, height, nil diff --git a/x/ibc/core/02-client/keeper/client.go b/x/ibc/core/02-client/keeper/client.go index b7e83ea58a..94a3f960e9 100644 --- a/x/ibc/core/02-client/keeper/client.go +++ b/x/ibc/core/02-client/keeper/client.go @@ -31,7 +31,7 @@ func (k Keeper) CreateClient( k.Logger(ctx).Info("client created at height", "client-id", clientID, "height", clientState.GetLatestHeight().String()) // verifies initial consensus state against client state and initializes client store with any client-specific metadata - // e.g. set ProcessedTime in Tendermint clients + // e.g. set ProcessedTime in Ostracon clients if err := clientState.Initialize(ctx, k.cdc, k.ClientStore(ctx, clientID), consensusState); err != nil { return "", err } diff --git a/x/ibc/core/02-client/keeper/client_test.go b/x/ibc/core/02-client/keeper/client_test.go index a05b8b3d70..6fb6a5d48d 100644 --- a/x/ibc/core/02-client/keeper/client_test.go +++ b/x/ibc/core/02-client/keeper/client_test.go @@ -5,14 +5,14 @@ import ( "fmt" "time" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/x/ibc/core/02-client/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" - localhosttypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" + localhoctypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibctestingmock "github.com/line/lfb-sdk/x/ibc/testing/mock" upgradetypes "github.com/line/lfb-sdk/x/upgrade/types" @@ -25,7 +25,7 @@ func (suite *KeeperTestSuite) TestCreateClient() { expPass bool }{ {"success", ibctmtypes.NewClientState(testChainID, ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, testClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), true}, - {"client type not supported", localhosttypes.NewClientState(testChainID, clienttypes.NewHeight(0, 1)), false}, + {"client type not supported", localhoctypes.NewClientState(testChainID, clienttypes.NewHeight(0, 1)), false}, } for i, tc := range cases { @@ -44,18 +44,22 @@ func (suite *KeeperTestSuite) TestCreateClient() { func (suite *KeeperTestSuite) TestUpdateClientTendermint() { // Must create header creation functions since suite.header gets recreated on each test case createFutureUpdateFn := func(s *KeeperTestSuite) *ibctmtypes.Header { + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) + heightPlus3 := clienttypes.NewHeight(suite.header.GetHeight().GetRevisionNumber(), suite.header.GetHeight().GetRevisionHeight()+3) height := suite.header.GetHeight().(clienttypes.Height) - return suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus3.RevisionHeight), height, suite.header.Header.Time.Add(time.Hour), - suite.valSet, suite.valSet, []osttypes.PrivValidator{suite.privVal}) + return suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus3.RevisionHeight), height, suite.header.Header.Time.Add(time.Hour), + suite.valSet, suite.valSet, voterSet, voterSet, []octypes.PrivValidator{suite.privVal}) } createPastUpdateFn := func(s *KeeperTestSuite) *ibctmtypes.Header { + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) + heightMinus2 := clienttypes.NewHeight(suite.header.GetHeight().GetRevisionNumber(), suite.header.GetHeight().GetRevisionHeight()-2) heightMinus4 := clienttypes.NewHeight(suite.header.GetHeight().GetRevisionNumber(), suite.header.GetHeight().GetRevisionHeight()-4) - return suite.chainA.CreateTMClientHeader(testChainID, int64(heightMinus2.RevisionHeight), heightMinus4, suite.header.Header.Time, - suite.valSet, suite.valSet, []osttypes.PrivValidator{suite.privVal}) + return suite.chainA.CreateOCClientHeader(testChainID, int64(heightMinus2.RevisionHeight), heightMinus4, suite.header.Header.Time, + suite.valSet, suite.valSet, voterSet, voterSet, []octypes.PrivValidator{suite.privVal}) } var ( updateHeader *ibctmtypes.Header @@ -213,7 +217,7 @@ func (suite *KeeperTestSuite) TestUpdateClientTendermint() { func (suite *KeeperTestSuite) TestUpdateClientLocalhost() { revision := types.ParseChainID(suite.chainA.ChainID) - var localhostClient exported.ClientState = localhosttypes.NewClientState(suite.chainA.ChainID, types.NewHeight(revision, uint64(suite.chainA.GetContext().BlockHeight()))) + var localhostClient exported.ClientState = localhoctypes.NewClientState(suite.chainA.ChainID, types.NewHeight(revision, uint64(suite.chainA.GetContext().BlockHeight()))) ctx := suite.chainA.GetContext().WithBlockHeight(suite.chainA.GetContext().BlockHeight() + 1) err := suite.chainA.App.IBCKeeper.ClientKeeper.UpdateClient(ctx, exported.Localhost, nil) @@ -257,7 +261,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -287,7 +291,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -319,7 +323,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -356,7 +360,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { upgradedClient = ibctmtypes.NewClientState("wrongchainID", ibctmtypes.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -371,7 +375,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { for _, tc := range testCases { tc := tc - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) tc.setup() @@ -398,23 +402,26 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { altPrivVal := ibctestingmock.NewPV() altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) - altVal := osttypes.NewValidator(altPubKey, 4) + altVal := ibctesting.NewTestValidator(altPubKey, 4) // Set valSet here with suite.valSet so it doesn't get reset on each testcase valSet := suite.valSet valsHash := valSet.Hash() // Create bothValSet with both suite validator and altVal - bothValSet := osttypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) + bothValSet := octypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) bothValsHash := bothValSet.Hash() // Create alternative validator set with only altVal - altValSet := osttypes.NewValidatorSet([]*osttypes.Validator{altVal}) + altValSet := octypes.NewValidatorSet([]*octypes.Validator{altVal}) + + bothVoterSet := octypes.WrapValidatorsToVoterSet(bothValSet.Validators) + voterSet := octypes.WrapValidatorsToVoterSet(valSet.Validators) // Create signer array and ensure it is in same order as bothValSet _, suiteVal := suite.valSet.GetByIndex(0) bothSigners := ibctesting.CreateSortedSignerArray(altPrivVal, suite.privVal, altVal, suiteVal) - altSigners := []osttypes.PrivValidator{altPrivVal} + altSigners := []octypes.PrivValidator{altPrivVal} // Create valid Misbehaviour by making a duplicate header that signs over different block time altTime := suite.ctx.BlockTime().Add(time.Minute) @@ -431,8 +438,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { { "trusting period misbehavior should pass", &ibctmtypes.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: clientID, }, func() error { @@ -447,8 +454,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { { "misbehavior at later height should pass", &ibctmtypes.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, altTime, bothValSet, valSet, bothVoterSet, voterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothVoterSet, voterSet, bothSigners), ClientId: clientID, }, func() error { @@ -473,8 +480,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { { "misbehavior at later height with different trusted heights should pass", &ibctmtypes.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, altTime, bothValSet, valSet, bothVoterSet, voterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: clientID, }, func() error { @@ -499,8 +506,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { { "trusted ConsensusState1 not found", &ibctmtypes.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), heightPlus3, altTime, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), heightPlus3, altTime, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, valSet, bothVoterSet, voterSet, bothSigners), ClientId: clientID, }, func() error { @@ -515,8 +522,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { { "trusted ConsensusState2 not found", &ibctmtypes.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, altTime, bothValSet, valSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(heightPlus5.RevisionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), testClientHeight, altTime, bothValSet, valSet, bothVoterSet, voterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(testChainID, int64(heightPlus5.RevisionHeight), heightPlus3, suite.ctx.BlockTime(), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: clientID, }, func() error { @@ -537,8 +544,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { { "client already frozen at earlier height", &ibctmtypes.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: clientID, }, func() error { @@ -556,8 +563,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { { "misbehaviour check failed", &ibctmtypes.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), altValSet, bothValSet, altSigners), + Header1: suite.chainA.CreateOCClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, altTime, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeight, suite.ctx.BlockTime(), altValSet, bothValSet, octypes.WrapValidatorsToVoterSet(altValSet.Validators), bothVoterSet, altSigners), ClientId: clientID, }, func() error { @@ -604,8 +611,8 @@ func (suite *KeeperTestSuite) TestCheckMisbehaviourAndUpdateState() { } func (suite *KeeperTestSuite) TestUpdateClientEventEmission() { - clientID, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) - header, err := suite.chainA.ConstructUpdateTMClientHeader(suite.chainB, clientID) + clientID, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) + header, err := suite.chainA.ConstructUpdateOCClientHeader(suite.chainB, clientID) suite.Require().NoError(err) msg, err := clienttypes.NewMsgUpdateClient( diff --git a/x/ibc/core/02-client/keeper/grpc_query_test.go b/x/ibc/core/02-client/keeper/grpc_query_test.go index 40f8405a57..4f62809bc5 100644 --- a/x/ibc/core/02-client/keeper/grpc_query_test.go +++ b/x/ibc/core/02-client/keeper/grpc_query_test.go @@ -11,7 +11,7 @@ import ( "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -114,8 +114,8 @@ func (suite *KeeperTestSuite) TestQueryClientStates() { { "success", func() { - clientA1, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) - clientA2, _ := suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) + clientA1, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) + clientA2, _ := suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Ostracon) clientStateA1 := suite.chainA.GetClientState(clientA1) clientStateA2 := suite.chainA.GetClientState(clientA2) diff --git a/x/ibc/core/02-client/keeper/keeper.go b/x/ibc/core/02-client/keeper/keeper.go index 09b03007b5..8602ace6f2 100644 --- a/x/ibc/core/02-client/keeper/keeper.go +++ b/x/ibc/core/02-client/keeper/keeper.go @@ -16,7 +16,7 @@ import ( commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" paramtypes "github.com/line/lfb-sdk/x/params/types" upgradetypes "github.com/line/lfb-sdk/x/upgrade/types" ) @@ -268,7 +268,7 @@ func (k Keeper) GetSelfConsensusState(ctx sdk.Context, height exported.Height) ( func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error { tmClient, ok := clientState.(*ibctmtypes.ClientState) if !ok { - return sdkerrors.Wrapf(types.ErrInvalidClient, "client must be a Tendermint client, expected: %T, got: %T", + return sdkerrors.Wrapf(types.ErrInvalidClient, "client must be a Ostracon client, expected: %T, got: %T", &ibctmtypes.ClientState{}, tmClient) } @@ -301,7 +301,7 @@ func (k Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientS expectedProofSpecs, tmClient.ProofSpecs) } - if err := light.ValidateTrustLevel(tmClient.TrustLevel.ToTendermint()); err != nil { + if err := light.ValidateTrustLevel(tmClient.TrustLevel.ToOstracon()); err != nil { return sdkerrors.Wrapf(types.ErrInvalidClient, "trust-level invalid: %v", err) } diff --git a/x/ibc/core/02-client/keeper/keeper_test.go b/x/ibc/core/02-client/keeper/keeper_test.go index c1a507160d..36c079d2ba 100644 --- a/x/ibc/core/02-client/keeper/keeper_test.go +++ b/x/ibc/core/02-client/keeper/keeper_test.go @@ -6,8 +6,8 @@ import ( "time" ostbytes "github.com/line/ostracon/libs/bytes" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/baseapp" @@ -19,8 +19,8 @@ import ( "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" - localhosttypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" + localhoctypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibctestingmock "github.com/line/lfb-sdk/x/ibc/testing/mock" stakingtypes "github.com/line/lfb-sdk/x/staking/types" @@ -60,9 +60,9 @@ type KeeperTestSuite struct { keeper *keeper.Keeper consensusState *ibctmtypes.ConsensusState header *ibctmtypes.Header - valSet *osttypes.ValidatorSet + valSet *octypes.ValidatorSet valSetHash ostbytes.HexBytes - privVal osttypes.PrivValidator + privVal octypes.PrivValidator now time.Time past time.Time @@ -82,7 +82,7 @@ func (suite *KeeperTestSuite) SetupTest() { app := simapp.Setup(isCheckTx) suite.cdc = app.AppCodec() - suite.ctx = app.BaseApp.NewContext(isCheckTx, ostproto.Header{Height: height, ChainID: testClientID, Time: now2}) + suite.ctx = app.BaseApp.NewContext(isCheckTx, ocproto.Header{Height: height, ChainID: testClientID, Time: now2}) suite.keeper = &app.IBCKeeper.ClientKeeper suite.privVal = ibctestingmock.NewPV() @@ -91,10 +91,11 @@ func (suite *KeeperTestSuite) SetupTest() { testClientHeightMinus1 := types.NewHeight(0, height-1) - validator := osttypes.NewValidator(pubKey, 1) - suite.valSet = osttypes.NewValidatorSet([]*osttypes.Validator{validator}) + validator := ibctesting.NewTestValidator(pubKey, 1) + suite.valSet = octypes.NewValidatorSet([]*octypes.Validator{validator}) suite.valSetHash = suite.valSet.Hash() - suite.header = suite.chainA.CreateTMClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeightMinus1, now2, suite.valSet, suite.valSet, []osttypes.PrivValidator{suite.privVal}) + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) + suite.header = suite.chainA.CreateOCClientHeader(testChainID, int64(testClientHeight.RevisionHeight), testClientHeightMinus1, now2, suite.valSet, suite.valSet, voterSet, voterSet, []octypes.PrivValidator{suite.privVal}) suite.consensusState = ibctmtypes.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot([]byte("hash")), suite.valSetHash) var validators stakingtypes.Validators @@ -102,7 +103,7 @@ func (suite *KeeperTestSuite) SetupTest() { privVal := ibctestingmock.NewPV() tmPk, err := privVal.GetPubKey() suite.Require().NoError(err) - pk, err := cryptocodec.FromTmPubKeyInterface(tmPk) + pk, err := cryptocodec.FromOcPubKeyInterface(tmPk) suite.Require().NoError(err) val, err := stakingtypes.NewValidator(sdk.BytesToValAddress(pk.Address()), pk, stakingtypes.Description{}) suite.Require().NoError(err) @@ -117,7 +118,7 @@ func (suite *KeeperTestSuite) SetupTest() { // add localhost client revision := types.ParseChainID(suite.chainA.ChainID) - localHostClient := localhosttypes.NewClientState( + localHostClient := localhoctypes.NewClientState( suite.chainA.ChainID, types.NewHeight(revision, uint64(suite.chainA.GetContext().BlockHeight())), ) suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), exported.Localhost, localHostClient) @@ -171,7 +172,7 @@ func (suite *KeeperTestSuite) TestValidateSelfClient() { }, { "invalid client type", - localhosttypes.NewClientState(suite.chainA.ChainID, testClientHeight), + localhoctypes.NewClientState(suite.chainA.ChainID, testClientHeight), false, }, { @@ -279,7 +280,7 @@ func (suite KeeperTestSuite) TestGetAllGenesisMetadata() { genClients := []types.IdentifiedClientState{ types.NewIdentifiedClientState("clientA", &ibctmtypes.ClientState{}), types.NewIdentifiedClientState("clientB", &ibctmtypes.ClientState{}), - types.NewIdentifiedClientState("clientC", &ibctmtypes.ClientState{}), types.NewIdentifiedClientState("clientD", &localhosttypes.ClientState{}), + types.NewIdentifiedClientState("clientC", &ibctmtypes.ClientState{}), types.NewIdentifiedClientState("clientD", &localhoctypes.ClientState{}), } suite.chainA.App.IBCKeeper.ClientKeeper.SetAllClientMetadata(suite.chainA.GetContext(), expectedGenMetadata) @@ -325,9 +326,9 @@ func (suite KeeperTestSuite) TestConsensusStateHelpers() { nextState := ibctmtypes.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot([]byte("next")), suite.valSetHash) testClientHeightPlus5 := types.NewHeight(0, height+5) - - header := suite.chainA.CreateTMClientHeader(testClientID, int64(testClientHeightPlus5.RevisionHeight), testClientHeight, suite.header.Header.Time.Add(time.Minute), - suite.valSet, suite.valSet, []osttypes.PrivValidator{suite.privVal}) + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) + header := suite.chainA.CreateOCClientHeader(testClientID, int64(testClientHeightPlus5.RevisionHeight), testClientHeight, suite.header.Header.Time.Add(time.Minute), + suite.valSet, suite.valSet, voterSet, voterSet, []octypes.PrivValidator{suite.privVal}) // mock update functionality clientState.LatestHeight = header.GetHeight().(types.Height) @@ -342,7 +343,7 @@ func (suite KeeperTestSuite) TestConsensusStateHelpers() { // 2 clients in total are created on chainA. The first client is updated so it contains an initial consensus state // and a consensus state at the update height. func (suite KeeperTestSuite) TestGetAllConsensusStates() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA) expConsensusHeight0 := clientState.GetLatestHeight() @@ -350,7 +351,7 @@ func (suite KeeperTestSuite) TestGetAllConsensusStates() { suite.Require().True(ok) // update client to create a second consensus state - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) clientState = suite.chainA.GetClientState(clientA) @@ -365,7 +366,7 @@ func (suite KeeperTestSuite) TestGetAllConsensusStates() { } // create second client on chainA - clientA2, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA2, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState = suite.chainA.GetClientState(clientA2) expConsensusHeight2 := clientState.GetLatestHeight() diff --git a/x/ibc/core/02-client/keeper/proposal_test.go b/x/ibc/core/02-client/keeper/proposal_test.go index cbaa1a3f52..8af2e0b531 100644 --- a/x/ibc/core/02-client/keeper/proposal_test.go +++ b/x/ibc/core/02-client/keeper/proposal_test.go @@ -4,7 +4,7 @@ import ( "github.com/line/lfb-sdk/x/ibc/core/02-client/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -21,7 +21,7 @@ func (suite *KeeperTestSuite) TestClientUpdateProposal() { }{ { "valid update client proposal", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA) tmClientState, ok := clientState.(*ibctmtypes.ClientState) @@ -31,7 +31,7 @@ func (suite *KeeperTestSuite) TestClientUpdateProposal() { suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientA, tmClientState) // use next header for chainB to update the client on chainA - header, err := suite.chainA.ConstructUpdateTMClientHeader(suite.chainB, clientA) + header, err := suite.chainA.ConstructUpdateOCClientHeader(suite.chainB, clientA) suite.Require().NoError(err) content, err = clienttypes.NewClientUpdateProposal(ibctesting.Title, ibctesting.Description, clientA, header) @@ -58,14 +58,14 @@ func (suite *KeeperTestSuite) TestClientUpdateProposal() { }, { "cannot unpack header, header is nil", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) content = &clienttypes.ClientUpdateProposal{ibctesting.Title, ibctesting.Description, clientA, nil} }, false, }, { "update fails", func() { header := &ibctmtypes.Header{} - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) content, err = clienttypes.NewClientUpdateProposal(ibctesting.Title, ibctesting.Description, clientA, header) suite.Require().NoError(err) }, false, diff --git a/x/ibc/core/02-client/proposal_handler_test.go b/x/ibc/core/02-client/proposal_handler_test.go index 65ed3c33a5..3b7ec8c489 100644 --- a/x/ibc/core/02-client/proposal_handler_test.go +++ b/x/ibc/core/02-client/proposal_handler_test.go @@ -7,7 +7,7 @@ import ( client "github.com/line/lfb-sdk/x/ibc/core/02-client" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -24,7 +24,7 @@ func (suite *ClientTestSuite) TestNewClientUpdateProposalHandler() { }{ { "valid update client proposal", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA) tmClientState, ok := clientState.(*ibctmtypes.ClientState) @@ -34,7 +34,7 @@ func (suite *ClientTestSuite) TestNewClientUpdateProposalHandler() { suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientA, tmClientState) // use next header for chainB to update the client on chainA - header, err := suite.chainA.ConstructUpdateTMClientHeader(suite.chainB, clientA) + header, err := suite.chainA.ConstructUpdateOCClientHeader(suite.chainB, clientA) suite.Require().NoError(err) content, err = clienttypes.NewClientUpdateProposal(ibctesting.Title, ibctesting.Description, clientA, header) diff --git a/x/ibc/core/02-client/simulation/decoder_test.go b/x/ibc/core/02-client/simulation/decoder_test.go index 4fc59fc69e..fc85d12522 100644 --- a/x/ibc/core/02-client/simulation/decoder_test.go +++ b/x/ibc/core/02-client/simulation/decoder_test.go @@ -12,7 +12,7 @@ import ( "github.com/line/lfb-sdk/x/ibc/core/02-client/simulation" "github.com/line/lfb-sdk/x/ibc/core/02-client/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) func TestDecodeStore(t *testing.T) { diff --git a/x/ibc/core/02-client/types/client_test.go b/x/ibc/core/02-client/types/client_test.go index 49b9fc47d3..cdd5f3e2bf 100644 --- a/x/ibc/core/02-client/types/client_test.go +++ b/x/ibc/core/02-client/types/client_test.go @@ -27,7 +27,7 @@ func (suite *TypesTestSuite) TestMarshalConsensusStateWithHeight() { }, { "tendermint client", func() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA) consensusState, ok := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(ok) diff --git a/x/ibc/core/02-client/types/codec_test.go b/x/ibc/core/02-client/types/codec_test.go index cf3fb3289a..1edd50d78d 100644 --- a/x/ibc/core/02-client/types/codec_test.go +++ b/x/ibc/core/02-client/types/codec_test.go @@ -5,8 +5,8 @@ import ( "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" - localhosttypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" + localhoctypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -35,7 +35,7 @@ func (suite *TypesTestSuite) TestPackClientState() { }, { "localhost client", - localhosttypes.NewClientState(chainID, clientHeight), + localhoctypes.NewClientState(chainID, clientHeight), true, }, { diff --git a/x/ibc/core/02-client/types/encoding_test.go b/x/ibc/core/02-client/types/encoding_test.go index c12e006269..e08c016ee8 100644 --- a/x/ibc/core/02-client/types/encoding_test.go +++ b/x/ibc/core/02-client/types/encoding_test.go @@ -2,7 +2,7 @@ package types_test import ( "github.com/line/lfb-sdk/x/ibc/core/02-client/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) func (suite *TypesTestSuite) TestMarshalHeader() { diff --git a/x/ibc/core/02-client/types/genesis_test.go b/x/ibc/core/02-client/types/genesis_test.go index 08018cf442..04971369c1 100644 --- a/x/ibc/core/02-client/types/genesis_test.go +++ b/x/ibc/core/02-client/types/genesis_test.go @@ -3,23 +3,23 @@ package types_test import ( "time" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" client "github.com/line/lfb-sdk/x/ibc/core/02-client" "github.com/line/lfb-sdk/x/ibc/core/02-client/types" channeltypes "github.com/line/lfb-sdk/x/ibc/core/04-channel/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" - localhosttypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" + localhoctypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibctestingmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) const ( chainID = "chainID" - tmClientID0 = "07-tendermint-0" - tmClientID1 = "07-tendermint-1" + tmClientID0 = "99-ostracon-0" + tmClientID1 = "99-ostracon-1" invalidClientID = "myclient-0" clientID = tmClientID0 @@ -31,7 +31,7 @@ var clientHeight = types.NewHeight(0, 10) func (suite *TypesTestSuite) TestMarshalGenesisState() { cdc := suite.chainA.App.AppCodec() clientA, _, _, _, _, _ := suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.ORDERED) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) genesis := client.ExportGenesis(suite.chainA.GetContext(), suite.chainA.App.IBCKeeper.ClientKeeper) @@ -51,11 +51,11 @@ func (suite *TypesTestSuite) TestValidateGenesis() { now := time.Now().UTC() - val := osttypes.NewValidator(pubKey, 10) - valSet := osttypes.NewValidatorSet([]*osttypes.Validator{val}) - + val := ibctesting.NewTestValidator(pubKey, 10) + valSet := octypes.NewValidatorSet([]*octypes.Validator{val}) + voterSet := octypes.WrapValidatorsToVoterSet(valSet.Validators) heightMinus1 := types.NewHeight(0, height-1) - header := suite.chainA.CreateTMClientHeader(chainID, int64(clientHeight.RevisionHeight), heightMinus1, now, valSet, valSet, []osttypes.PrivValidator{privVal}) + header := suite.chainA.CreateOCClientHeader(chainID, int64(clientHeight.RevisionHeight), heightMinus1, now, valSet, valSet, voterSet, voterSet, []octypes.PrivValidator{privVal}) testCases := []struct { name string @@ -75,7 +75,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost+"-1", localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost+"-1", localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -100,7 +100,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - types.NewParams(exported.Tendermint, exported.Localhost), + types.NewParams(exported.Ostracon, exported.Localhost), false, 2, ), @@ -114,7 +114,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { invalidClientID, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -131,7 +131,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint), + types.NewParams(exported.Ostracon), false, 0, ), @@ -144,11 +144,11 @@ func (suite *TypesTestSuite) TestValidateGenesis() { types.NewIdentifiedClientState( tmClientID0, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), - types.NewIdentifiedClientState(exported.Localhost, localhosttypes.NewClientState("chaindID", types.ZeroHeight())), + types.NewIdentifiedClientState(exported.Localhost, localhoctypes.NewClientState("chaindID", types.ZeroHeight())), }, nil, nil, - types.NewParams(exported.Tendermint), + types.NewParams(exported.Ostracon), false, 0, ), @@ -162,7 +162,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chaindID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -179,7 +179,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint), + types.NewParams(exported.Ostracon), false, 0, ), @@ -193,7 +193,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chaindID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -210,7 +210,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint), + types.NewParams(exported.Ostracon), false, 0, ), @@ -224,7 +224,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chaindID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -241,7 +241,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint), + types.NewParams(exported.Ostracon), false, 0, ), @@ -255,7 +255,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -286,7 +286,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { clientID, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -311,7 +311,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - types.NewParams(exported.Tendermint, exported.Localhost), + types.NewParams(exported.Ostracon, exported.Localhost), false, 0, ), @@ -347,7 +347,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { }, ), }, - types.NewParams(exported.Tendermint), + types.NewParams(exported.Ostracon), false, 0, ), @@ -360,7 +360,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -391,7 +391,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -422,7 +422,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID1, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost+"-0", localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost+"-0", localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -439,7 +439,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint), + types.NewParams(exported.Ostracon), true, 2, ), @@ -453,7 +453,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { tmClientID0, ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost+"-1", localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost+"-1", localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -470,7 +470,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint, exported.Localhost), + types.NewParams(exported.Ostracon, exported.Localhost), false, 0, ), @@ -484,7 +484,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { "my-client", ibctmtypes.NewClientState(chainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), types.NewIdentifiedClientState( - exported.Localhost+"-1", localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost+"-1", localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -501,7 +501,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint, exported.Localhost), + types.NewParams(exported.Ostracon, exported.Localhost), false, 5, ), @@ -512,7 +512,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { genState: types.NewGenesisState( []types.IdentifiedClientState{ types.NewIdentifiedClientState( - exported.Localhost+"-1", localhosttypes.NewClientState("chainID", clientHeight), + exported.Localhost+"-1", localhoctypes.NewClientState("chainID", clientHeight), ), }, []types.ClientConsensusStates{ @@ -529,7 +529,7 @@ func (suite *TypesTestSuite) TestValidateGenesis() { ), }, nil, - types.NewParams(exported.Tendermint, exported.Localhost), + types.NewParams(exported.Ostracon, exported.Localhost), false, 5, ), diff --git a/x/ibc/core/02-client/types/msgs_test.go b/x/ibc/core/02-client/types/msgs_test.go index a983aba405..ceb4b8dd97 100644 --- a/x/ibc/core/02-client/types/msgs_test.go +++ b/x/ibc/core/02-client/types/msgs_test.go @@ -11,7 +11,7 @@ import ( commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" solomachinetypes "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -56,7 +56,7 @@ func (suite *TypesTestSuite) TestMarshalMsgCreateClient() { { "tendermint client", func() { tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) + msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, }, @@ -101,7 +101,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { "valid - tendermint client", func() { tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) + msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, true, @@ -109,7 +109,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { { "invalid tendermint client", func() { - msg, err = types.NewMsgCreateClient(&ibctmtypes.ClientState{}, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) + msg, err = types.NewMsgCreateClient(&ibctmtypes.ClientState{}, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, false, @@ -125,7 +125,7 @@ func (suite *TypesTestSuite) TestMsgCreateClient_ValidateBasic() { "failed to unpack consensus state", func() { tendermintClient := ibctmtypes.NewClientState(suite.chainA.ChainID, ibctesting.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false) - msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentTMClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) + msg, err = types.NewMsgCreateClient(tendermintClient, suite.chainA.CurrentOCClientHeader().ConsensusState(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) msg.ConsensusState = nil }, @@ -209,7 +209,7 @@ func (suite *TypesTestSuite) TestMarshalMsgUpdateClient() { }, { "tendermint client", func() { - msg, err = types.NewMsgUpdateClient("tendermint", suite.chainA.CurrentTMClientHeader(), suite.chainA.SenderAccount.GetAddress()) + msg, err = types.NewMsgUpdateClient("tendermint", suite.chainA.CurrentOCClientHeader(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, @@ -261,7 +261,7 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { { "valid - tendermint header", func() { - msg, err = types.NewMsgUpdateClient("tendermint", suite.chainA.CurrentTMClientHeader(), suite.chainA.SenderAccount.GetAddress()) + msg, err = types.NewMsgUpdateClient("tendermint", suite.chainA.CurrentOCClientHeader(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, true, @@ -308,7 +308,7 @@ func (suite *TypesTestSuite) TestMsgUpdateClient_ValidateBasic() { { "unsupported - localhost", func() { - msg, err = types.NewMsgUpdateClient(exported.Localhost, suite.chainA.CurrentTMClientHeader(), suite.chainA.SenderAccount.GetAddress()) + msg, err = types.NewMsgUpdateClient(exported.Localhost, suite.chainA.CurrentOCClientHeader(), suite.chainA.SenderAccount.GetAddress()) suite.Require().NoError(err) }, false, @@ -490,8 +490,8 @@ func (suite *TypesTestSuite) TestMarshalMsgSubmitMisbehaviour() { "tendermint client", func() { height := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)) heightMinus1 := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)-1) - header1 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - header2 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) + header1 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Voters, suite.chainA.Voters, suite.chainA.Signers) + header2 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Voters, suite.chainA.Voters, suite.chainA.Signers) misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", header1, header2) msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress()) @@ -548,8 +548,8 @@ func (suite *TypesTestSuite) TestMsgSubmitMisbehaviour_ValidateBasic() { func() { height := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)) heightMinus1 := types.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height)-1) - header1 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) - header2 := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) + header1 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Voters, suite.chainA.Voters, suite.chainA.Signers) + header2 := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, int64(height.RevisionHeight), heightMinus1, suite.chainA.CurrentHeader.Time.Add(time.Minute), suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Voters, suite.chainA.Voters, suite.chainA.Signers) misbehaviour := ibctmtypes.NewMisbehaviour("tendermint", header1, header2) msg, err = types.NewMsgSubmitMisbehaviour("tendermint", misbehaviour, suite.chainA.SenderAccount.GetAddress()) diff --git a/x/ibc/core/02-client/types/params.go b/x/ibc/core/02-client/types/params.go index 6876de0c69..fa2e7d91c9 100644 --- a/x/ibc/core/02-client/types/params.go +++ b/x/ibc/core/02-client/types/params.go @@ -9,8 +9,8 @@ import ( ) var ( - // DefaultAllowedClients are "06-solomachine" and "07-tendermint" - DefaultAllowedClients = []string{exported.Solomachine, exported.Tendermint} + // DefaultAllowedClients are "06-solomachine" and "99-ostracon" + DefaultAllowedClients = []string{exported.Solomachine, exported.Ostracon} // KeyAllowedClients is store's key for AllowedClients Params KeyAllowedClients = []byte("AllowedClients") diff --git a/x/ibc/core/02-client/types/params_test.go b/x/ibc/core/02-client/types/params_test.go index 26f9685b0d..2095f8459a 100644 --- a/x/ibc/core/02-client/types/params_test.go +++ b/x/ibc/core/02-client/types/params_test.go @@ -15,7 +15,7 @@ func TestValidateParams(t *testing.T) { expPass bool }{ {"default params", DefaultParams(), true}, - {"custom params", NewParams(exported.Tendermint), true}, + {"custom params", NewParams(exported.Ostracon), true}, {"blank client", NewParams(" "), false}, } diff --git a/x/ibc/core/02-client/types/proposal_test.go b/x/ibc/core/02-client/types/proposal_test.go index 176c05886c..211c1a19a9 100644 --- a/x/ibc/core/02-client/types/proposal_test.go +++ b/x/ibc/core/02-client/types/proposal_test.go @@ -5,7 +5,7 @@ import ( codectypes "github.com/line/lfb-sdk/codec/types" govtypes "github.com/line/lfb-sdk/x/gov/types" "github.com/line/lfb-sdk/x/ibc/core/02-client/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -81,7 +81,7 @@ func (suite *TypesTestSuite) TestMarshalClientUpdateProposalProposal() { suite.Require().NoError(err) // create proposal - header := suite.chainA.CurrentTMClientHeader() + header := suite.chainA.CurrentOCClientHeader() proposal, err := types.NewClientUpdateProposal("update IBC client", "description", "client-id", header) suite.Require().NoError(err) diff --git a/x/ibc/core/03-connection/keeper/grpc_query_test.go b/x/ibc/core/03-connection/keeper/grpc_query_test.go index 1198d67921..cf1e52234e 100644 --- a/x/ibc/core/03-connection/keeper/grpc_query_test.go +++ b/x/ibc/core/03-connection/keeper/grpc_query_test.go @@ -47,7 +47,7 @@ func (suite *KeeperTestSuite) TestQueryConnection() { { "success", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA := suite.chainA.GetFirstTestConnection(clientA, clientB) connB := suite.chainB.GetFirstTestConnection(clientB, clientA) @@ -111,8 +111,8 @@ func (suite *KeeperTestSuite) TestQueryConnections() { { "success", func() { - clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) - clientA1, clientB1, connA1, connB1 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) + clientA1, clientB1, connA1, connB1 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) connA2, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -197,7 +197,7 @@ func (suite *KeeperTestSuite) TestQueryClientConnections() { { "success", func() { - clientA, clientB, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) connA1, _ := suite.coordinator.CreateConnection(suite.chainA, suite.chainB, clientA, clientB) expPaths = []string{connA0.ID, connA1.ID} suite.chainA.App.IBCKeeper.ConnectionKeeper.SetClientConnectionPaths(suite.chainA.GetContext(), clientA, expPaths) @@ -282,7 +282,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionClientState() { { "success", func() { - clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) expClientState := suite.chainA.GetClientState(clientA) expIdentifiedClientState = clienttypes.NewIdentifiedClientState(clientA, expClientState) @@ -375,7 +375,7 @@ func (suite *KeeperTestSuite) TestQueryConnectionConsensusState() { { "success", func() { - clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA) expConsensusState, _ = suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) diff --git a/x/ibc/core/03-connection/keeper/handshake_test.go b/x/ibc/core/03-connection/keeper/handshake_test.go index 17d22f2122..f90419681b 100644 --- a/x/ibc/core/03-connection/keeper/handshake_test.go +++ b/x/ibc/core/03-connection/keeper/handshake_test.go @@ -7,7 +7,7 @@ import ( "github.com/line/lfb-sdk/x/ibc/core/03-connection/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) // TestConnOpenInit - chainA initializes (INIT state) a connection with @@ -27,27 +27,27 @@ func (suite *KeeperTestSuite) TestConnOpenInit() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) }, true}, {"success with empty counterparty identifier", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) emptyConnBID = true }, true}, {"success with non empty version", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) version = types.ExportedVersionsToProto(types.GetCompatibleVersions())[0] }, true}, {"success with non zero delayPeriod", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) delayPeriod = uint64(time.Hour.Nanoseconds()) }, true}, {"invalid version", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) version = &types.Version{} }, false}, {"couldn't add connection to client", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // set clientA to invalid client identifier clientA = "clientidentifier" }, false}, @@ -100,7 +100,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -108,7 +108,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { counterpartyClient = suite.chainA.GetClientState(clientA) }, true}, {"success with crossing hellos", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, connB, err := suite.coordinator.ConnOpenInitOnBothChains(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -118,7 +118,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { previousConnectionID = connB.ID }, true}, {"success with delay period", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -131,13 +131,13 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { // commit in order for proof to return correct value suite.coordinator.CommitBlock(suite.chainA) - suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Ostracon) // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) }, true}, {"invalid counterparty client", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -152,7 +152,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.chainA.App.IBCKeeper.ClientKeeper.SetClientState(suite.chainA.GetContext(), clientA, tmClient) }, false}, {"consensus height >= latest height", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -162,7 +162,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { consensusHeight = clienttypes.GetSelfHeight(suite.chainB.GetContext()) }, false}, {"self consensus state not found", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -172,7 +172,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { consensusHeight = clienttypes.NewHeight(0, 1) }, false}, {"counterparty versions is empty", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -182,7 +182,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { versions = nil }, false}, {"counterparty versions don't have a match", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -193,14 +193,14 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { versions = []exported.Version{version} }, false}, {"connection state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // chainA connection not created // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) }, false}, {"client state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -213,7 +213,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { tmClient.LatestHeight = tmClient.LatestHeight.Increment().(clienttypes.Height) }, false}, {"consensus state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // retrieve client state of chainA to pass as counterpartyClient counterpartyClient = suite.chainA.GetClientState(clientA) @@ -232,7 +232,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.Require().NoError(err) }, false}, {"invalid previous connection is in TRYOPEN", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // open init chainA connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -242,7 +242,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { err = suite.coordinator.ConnOpenTry(suite.chainB, suite.chainA, connB, connA) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Ostracon) suite.Require().NoError(err) // retrieve client state of chainA to pass as counterpartyClient @@ -251,7 +251,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { previousConnectionID = connB.ID }, false}, {"invalid previous connection has invalid versions", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // open init chainA connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -270,7 +270,7 @@ func (suite *KeeperTestSuite) TestConnOpenTry() { suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Ostracon) suite.Require().NoError(err) // retrieve client state of chainA to pass as counterpartyClient @@ -342,7 +342,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -354,7 +354,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, true}, {"success from tryopen", func() { // chainA is in TRYOPEN, chainB is in TRYOPEN - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connB, connA, err := suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) suite.Require().NoError(err) @@ -367,15 +367,15 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { connection.Counterparty.ConnectionId = connA.ID suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) // update clientB so state change is committed - suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Ostracon) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) }, true}, {"invalid counterparty client", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -393,7 +393,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) }, false}, {"consensus height >= latest height", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -407,13 +407,13 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection not found", func() { // connections are never created - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) }, false}, {"invalid counterparty connection ID", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -431,15 +431,15 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.chainA.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainA.GetContext(), connA.ID, connection) - err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) - err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Ostracon) suite.Require().NoError(err) }, false}, {"connection state is not INIT", func() { // connection state is already OPEN on chainA - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -454,7 +454,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection is in INIT but the proposed version is invalid", func() { // chainA is in INIT, chainB is in TRYOPEN - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -468,7 +468,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection is in TRYOPEN but the set version in the connection is invalid", func() { // chainA is in TRYOPEN, chainB is in TRYOPEN - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connB, connA, err := suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) suite.Require().NoError(err) @@ -481,8 +481,8 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.chainB.App.IBCKeeper.ConnectionKeeper.SetConnection(suite.chainB.GetContext(), connB.ID, connection) // update clientB so state change is committed - suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Tendermint) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainB, suite.chainA, clientB, exported.Ostracon) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) // retrieve client state of chainB to pass as counterpartyClient counterpartyClient = suite.chainB.GetClientState(clientB) @@ -490,7 +490,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = types.NewVersion("2.0", nil) }, false}, {"incompatible IBC versions", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -504,7 +504,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = types.NewVersion("2.0", nil) }, false}, {"empty version", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -517,7 +517,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = &types.Version{} }, false}, {"feature set verification failed - unsupported feature", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -530,7 +530,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { version = types.NewVersion(types.DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED", "ORDER_UNORDERED", "ORDER_DAG"}) }, false}, {"self consensus state not found", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -544,7 +544,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { }, false}, {"connection state verification failed", func() { // chainB connection is not in INIT - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -552,7 +552,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { counterpartyClient = suite.chainB.GetClientState(clientB) }, false}, {"client state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -568,7 +568,7 @@ func (suite *KeeperTestSuite) TestConnOpenAck() { suite.Require().NoError(err) }, false}, {"consensus state verification failed", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -644,7 +644,7 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { expPass bool }{ {"success", func() { - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -656,15 +656,15 @@ func (suite *KeeperTestSuite) TestConnOpenConfirm() { }, true}, {"connection not found", func() { // connections are never created - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) }, false}, {"chain B's connection state is not TRYOPEN", func() { // connections are OPEN - clientA, clientB, _, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB, _, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) }, false}, {"connection state verification failed", func() { // chainA is in INIT - clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) diff --git a/x/ibc/core/03-connection/keeper/keeper_test.go b/x/ibc/core/03-connection/keeper/keeper_test.go index 20259e3f3b..aa64d8e673 100644 --- a/x/ibc/core/03-connection/keeper/keeper_test.go +++ b/x/ibc/core/03-connection/keeper/keeper_test.go @@ -32,7 +32,7 @@ func TestKeeperTestSuite(t *testing.T) { } func (suite *KeeperTestSuite) TestSetAndGetConnection() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) connA := suite.chainA.GetFirstTestConnection(clientA, clientB) _, existed := suite.chainA.App.IBCKeeper.ConnectionKeeper.GetConnection(suite.chainA.GetContext(), connA.ID) suite.Require().False(existed) @@ -43,7 +43,7 @@ func (suite *KeeperTestSuite) TestSetAndGetConnection() { } func (suite *KeeperTestSuite) TestSetAndGetClientConnectionPaths() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) _, existed := suite.chainA.App.IBCKeeper.ConnectionKeeper.GetClientConnectionPaths(suite.chainA.GetContext(), clientA) suite.False(existed) @@ -56,7 +56,7 @@ func (suite *KeeperTestSuite) TestSetAndGetClientConnectionPaths() { // create 2 connections: A0 - B0, A1 - B1 func (suite KeeperTestSuite) TestGetAllConnections() { - clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) connA1, connB1 := suite.coordinator.CreateConnection(suite.chainA, suite.chainB, clientA, clientB) counterpartyB0 := types.NewCounterparty(clientB, connB0.ID, suite.chainB.GetPrefix()) // connection B0 @@ -78,8 +78,8 @@ func (suite KeeperTestSuite) TestGetAllConnections() { // the test creates 2 clients clientA0 and clientA1. clientA0 has a single // connection and clientA1 has 2 connections. func (suite KeeperTestSuite) TestGetAllClientConnectionPaths() { - clientA0, _, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) - clientA1, clientB1, connA1, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA0, _, connA0, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) + clientA1, clientB1, connA1, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) connA2, _ := suite.coordinator.CreateConnection(suite.chainA, suite.chainB, clientA1, clientB1) expPaths := []types.ConnectionPaths{ @@ -103,7 +103,7 @@ func (suite *KeeperTestSuite) TestGetTimestampAtHeight() { expPass bool }{ {"verification success", func() { - _, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) connection = suite.chainA.GetConnection(connA) }, true}, {"consensus state not found", func() { diff --git a/x/ibc/core/03-connection/keeper/verify_test.go b/x/ibc/core/03-connection/keeper/verify_test.go index b70448c288..77d12b18c9 100644 --- a/x/ibc/core/03-connection/keeper/verify_test.go +++ b/x/ibc/core/03-connection/keeper/verify_test.go @@ -9,7 +9,7 @@ import ( channeltypes "github.com/line/lfb-sdk/x/ibc/core/04-channel/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibcmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) @@ -38,7 +38,7 @@ func (suite *KeeperTestSuite) TestVerifyClientState() { suite.Run(tc.msg, func() { suite.SetupTest() // reset - _, clientB, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, clientB, connA, _ := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) counterpartyClient, clientProof := suite.chainB.QueryClientStateProof(clientB) proofHeight := clienttypes.NewHeight(0, uint64(suite.chainB.GetContext().BlockHeight()-1)) @@ -83,20 +83,20 @@ func (suite *KeeperTestSuite) TestVerifyClientConsensusState() { expPass bool }{ {"verification success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) }, true}, {"client state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) changeClientID = true }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) heightDiff = 5 }, false}, {"verification failed", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) clientB := connB.ClientID clientState := suite.chainB.GetClientState(clientB) @@ -170,7 +170,7 @@ func (suite *KeeperTestSuite) TestVerifyConnectionState() { suite.Run(tc.msg, func() { suite.SetupTest() // reset - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) connection := suite.chainA.GetConnection(connA) if tc.changeClientID { @@ -426,7 +426,7 @@ func (suite *KeeperTestSuite) TestVerifyPacketReceiptAbsence() { } else { // need to update height to prove absence suite.coordinator.CommitBlock(suite.chainA, suite.chainB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) } packetReceiptKey := host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) diff --git a/x/ibc/core/03-connection/types/msgs_test.go b/x/ibc/core/03-connection/types/msgs_test.go index ec86e25cfe..4ed3dbc130 100644 --- a/x/ibc/core/03-connection/types/msgs_test.go +++ b/x/ibc/core/03-connection/types/msgs_test.go @@ -17,7 +17,7 @@ import ( clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" "github.com/line/lfb-sdk/x/ibc/core/03-connection/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" abci "github.com/line/ostracon/abci/types" ) diff --git a/x/ibc/core/04-channel/keeper/grpc_query_test.go b/x/ibc/core/04-channel/keeper/grpc_query_test.go index f842d350ee..1fbbcb805d 100644 --- a/x/ibc/core/04-channel/keeper/grpc_query_test.go +++ b/x/ibc/core/04-channel/keeper/grpc_query_test.go @@ -62,7 +62,7 @@ func (suite *KeeperTestSuite) TestQueryChannel() { { "success", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) // init channel channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -377,7 +377,7 @@ func (suite *KeeperTestSuite) TestQueryChannelClientState() { { "success", func() { - clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) // init channel channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -509,7 +509,7 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { { "success", func() { - clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) // init channel channelA, _, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) diff --git a/x/ibc/core/04-channel/keeper/handshake_test.go b/x/ibc/core/04-channel/keeper/handshake_test.go index 8ffc040b87..189432f53b 100644 --- a/x/ibc/core/04-channel/keeper/handshake_test.go +++ b/x/ibc/core/04-channel/keeper/handshake_test.go @@ -32,7 +32,7 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) features = []string{"ORDER_ORDERED", "ORDER_UNORDERED"} suite.chainA.CreatePortCapability(suite.chainA.NextTestChannel(connA, ibctesting.MockPort).PortID) portCap = suite.chainA.GetPortCapability(suite.chainA.NextTestChannel(connA, ibctesting.MockPort).PortID) @@ -46,12 +46,12 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { suite.Require().NotNil(connB) }, false}, {"capability is incorrect", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) features = []string{"ORDER_ORDERED", "ORDER_UNORDERED"} portCap = capabilitytypes.NewCapability(3) }, false}, {"connection version not negotiated", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) // modify connA versions conn := suite.chainA.GetConnection(connA) @@ -68,7 +68,7 @@ func (suite *KeeperTestSuite) TestChanOpenInit() { portCap = suite.chainA.GetPortCapability(suite.chainA.NextTestChannel(connA, ibctesting.MockPort).PortID) }, false}, {"connection does not support ORDERED channels", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) // modify connA versions to only support UNORDERED channels conn := suite.chainA.GetConnection(connA) @@ -149,14 +149,14 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.chainB.CreatePortCapability(suite.chainB.NextTestChannel(connB, ibctesting.MockPort).PortID) portCap = suite.chainB.GetPortCapability(suite.chainB.NextTestChannel(connB, ibctesting.MockPort).PortID) }, true}, {"success with crossing hello", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) _, channelB, err := suite.coordinator.ChanOpenInitOnBothChains(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -164,7 +164,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { portCap = suite.chainB.GetPortCapability(suite.chainB.NextTestChannel(connB, ibctesting.MockPort).PortID) }, true}, {"previous channel with invalid state", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) // make previous channel have wrong ordering suite.coordinator.ChanOpenInit(suite.chainB, suite.chainA, connB, connA, ibctesting.MockPort, ibctesting.MockPort, types.UNORDERED) @@ -179,7 +179,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { portCap = suite.chainB.GetPortCapability(connB.FirstOrNextTestChannel(ibctesting.MockPort).PortID) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // pass capability check suite.chainB.CreatePortCapability(connB.FirstOrNextTestChannel(ibctesting.MockPort).PortID) portCap = suite.chainB.GetPortCapability(connB.FirstOrNextTestChannel(ibctesting.MockPort).PortID) @@ -189,7 +189,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { suite.Require().NoError(err) }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.chainB.CreatePortCapability(suite.chainB.NextTestChannel(connB, ibctesting.MockPort).PortID) @@ -199,17 +199,17 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { }, false}, {"channel verification failed", func() { // not creating a channel on chainA will result in an invalid proof of existence - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) portCap = suite.chainB.GetPortCapability(suite.chainB.NextTestChannel(connB, ibctesting.MockPort).PortID) }, false}, {"port capability not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) portCap = capabilitytypes.NewCapability(3) }, false}, {"connection version not negotiated", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) // modify connB versions @@ -226,7 +226,7 @@ func (suite *KeeperTestSuite) TestChanOpenTry() { portCap = suite.chainB.GetPortCapability(suite.chainB.NextTestChannel(connB, ibctesting.MockPort).PortID) }, false}, {"connection does not support ORDERED channels", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) // modify connA versions to only support UNORDERED channels @@ -296,7 +296,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -306,7 +306,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, {"success with empty stored counterparty channel ID", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -332,7 +332,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"connection not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -347,7 +347,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainA.GetContext(), channelA.PortID, channelA.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) var err error connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -361,7 +361,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -373,7 +373,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { heightDiff = 3 // consensus state doesn't exist at this height }, false}, {"invalid counterparty channel identifier", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -386,7 +386,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { }, false}, {"channel verification failed", func() { // chainB is INIT, chainA in TRYOPEN - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelB, channelA, err := suite.coordinator.ChanOpenInit(suite.chainB, suite.chainA, connB, connA, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -396,7 +396,7 @@ func (suite *KeeperTestSuite) TestChanOpenAck() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"channel capability not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -451,7 +451,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { ) testCases := []testCase{ {"success", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -471,7 +471,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"connection not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -489,7 +489,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { suite.chainB.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainB.GetContext(), channelB.PortID, channelB.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) var err error connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) @@ -499,7 +499,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"consensus state not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -515,7 +515,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { }, false}, {"channel verification failed", func() { // chainA is INIT, chainB in TRYOPEN - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -525,7 +525,7 @@ func (suite *KeeperTestSuite) TestChanOpenConfirm() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"channel capability not found", func() { - _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA, channelB, err := suite.coordinator.ChanOpenInit(suite.chainA, suite.chainB, connA, connB, ibctesting.MockPort, ibctesting.MockPort, types.ORDERED) suite.Require().NoError(err) @@ -612,7 +612,7 @@ func (suite *KeeperTestSuite) TestChanCloseInit() { suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainA.GetContext(), channelA.PortID, channelA.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) var err error connA, connB, err = suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) @@ -701,7 +701,7 @@ func (suite *KeeperTestSuite) TestChanCloseConfirm() { suite.chainB.App.IBCKeeper.ChannelKeeper.SetChannel(suite.chainB.GetContext(), channelB.PortID, channelB.ID, channel) }, false}, {"connection is not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) var err error connB, connA, err = suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) diff --git a/x/ibc/core/04-channel/keeper/keeper_test.go b/x/ibc/core/04-channel/keeper/keeper_test.go index 60ec9e391b..21bd78177b 100644 --- a/x/ibc/core/04-channel/keeper/keeper_test.go +++ b/x/ibc/core/04-channel/keeper/keeper_test.go @@ -40,7 +40,7 @@ func (suite *KeeperTestSuite) SetupTest() { // and existence of a channel in INIT on chainA. func (suite *KeeperTestSuite) TestSetChannel() { // create client and connections on both chains - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) // check for channel to be created on chainA channelA := suite.chainA.NextTestChannel(connA, ibctesting.MockPort) diff --git a/x/ibc/core/04-channel/keeper/packet_test.go b/x/ibc/core/04-channel/keeper/packet_test.go index 8b1ca1923b..97b9ba76e9 100644 --- a/x/ibc/core/04-channel/keeper/packet_test.go +++ b/x/ibc/core/04-channel/keeper/packet_test.go @@ -8,7 +8,7 @@ import ( "github.com/line/lfb-sdk/x/ibc/core/04-channel/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibcmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) @@ -147,7 +147,7 @@ func (suite *KeeperTestSuite) TestSendPacket() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"next sequence send not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA := suite.chainA.NextTestChannel(connA, ibctesting.TransferPort) channelB := suite.chainB.NextTestChannel(connB, ibctesting.TransferPort) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) @@ -293,7 +293,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"connection not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // connection on chainB is in INIT connB, connA, err := suite.coordinator.ConnOpenInit(suite.chainB, suite.chainA, clientB, clientA) suite.Require().NoError(err) @@ -321,7 +321,7 @@ func (suite *KeeperTestSuite) TestRecvPacket() { channelCap = suite.chainB.GetChannelCapability(channelB.PortID, channelB.ID) }, false}, {"next receive sequence is not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA := suite.chainA.NextTestChannel(connA, ibctesting.TransferPort) channelB := suite.chainB.NextTestChannel(connB, ibctesting.TransferPort) @@ -565,7 +565,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"connection not OPEN", func() { - clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, clientB := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) // connection on chainA is in INIT connA, connB, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB) suite.Require().NoError(err) @@ -598,7 +598,7 @@ func (suite *KeeperTestSuite) TestAcknowledgePacket() { channelCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"next ack sequence not found", func() { - _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint) + _, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Ostracon) channelA := suite.chainA.NextTestChannel(connA, ibctesting.TransferPort) channelB := suite.chainB.NextTestChannel(connB, ibctesting.TransferPort) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) diff --git a/x/ibc/core/04-channel/keeper/timeout_test.go b/x/ibc/core/04-channel/keeper/timeout_test.go index 878f261207..ca4704a8d8 100644 --- a/x/ibc/core/04-channel/keeper/timeout_test.go +++ b/x/ibc/core/04-channel/keeper/timeout_test.go @@ -29,7 +29,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), uint64(suite.chainB.GetContext().BlockTime().UnixNano())) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) }, true}, {"success: UNORDERED", func() { ordered = false @@ -38,7 +38,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) }, true}, {"channel not found", func() { // use wrong channel naming @@ -77,7 +77,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) }, false}, {"packet already received ", func() { ordered = true @@ -86,12 +86,12 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) }, false}, {"packet hasn't been sent", func() { clientA, _, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, timeoutHeight, uint64(suite.chainB.GetContext().BlockTime().UnixNano())) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) }, false}, {"next seq receive verification failed", func() { // set ordered to false resulting in wrong proof provided @@ -100,7 +100,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.ORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) }, false}, {"packet ack verification failed", func() { // set ordered to true resulting in wrong proof provided @@ -109,7 +109,7 @@ func (suite *KeeperTestSuite) TestTimeoutPacket() { clientA, clientB, _, _, channelA, channelB := suite.coordinator.Setup(suite.chainA, suite.chainB, types.UNORDERED) packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) }, false}, } @@ -213,7 +213,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, @@ -224,7 +224,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, true}, @@ -273,7 +273,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, @@ -291,7 +291,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), uint64(suite.chainB.GetContext().BlockTime().UnixNano())) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"packet ack verification failed", func() { @@ -301,7 +301,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { packet = types.NewPacket(validPacketData, 1, channelA.PortID, channelA.ID, channelB.PortID, channelB.ID, clienttypes.GetSelfHeight(suite.chainB.GetContext()), disabledTimeoutTimestamp) suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) chanCap = suite.chainA.GetChannelCapability(channelA.PortID, channelA.ID) }, false}, {"channel capability not found", func() { @@ -311,7 +311,7 @@ func (suite *KeeperTestSuite) TestTimeoutOnClose() { suite.coordinator.SendPacket(suite.chainA, suite.chainB, packet, clientB) suite.coordinator.SetChannelClosed(suite.chainB, suite.chainA, channelB) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) chanCap = capabilitytypes.NewCapability(100) }, false}, diff --git a/x/ibc/core/05-port/keeper/keeper_test.go b/x/ibc/core/05-port/keeper/keeper_test.go index 999c016d1e..6a75584c0a 100644 --- a/x/ibc/core/05-port/keeper/keeper_test.go +++ b/x/ibc/core/05-port/keeper/keeper_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -28,7 +28,7 @@ func (suite *KeeperTestSuite) SetupTest() { isCheckTx := false app := simapp.Setup(isCheckTx) - suite.ctx = app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + suite.ctx = app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) suite.keeper = &app.IBCKeeper.PortKeeper } diff --git a/x/ibc/core/23-commitment/types/merkle.go b/x/ibc/core/23-commitment/types/merkle.go index 0701116879..89eade09da 100644 --- a/x/ibc/core/23-commitment/types/merkle.go +++ b/x/ibc/core/23-commitment/types/merkle.go @@ -7,7 +7,7 @@ import ( ics23 "github.com/confio/ics23/go" "github.com/gogo/protobuf/proto" - ostcrypto "github.com/line/ostracon/proto/ostracon/crypto" + occrypto "github.com/line/ostracon/proto/ostracon/crypto" sdkerrors "github.com/line/lfb-sdk/types/errors" "github.com/line/lfb-sdk/x/ibc/core/exported" @@ -272,7 +272,7 @@ func verifyChainedMembershipProof(root []byte, specs []*ics23.ProofSpec, proofs // blankMerkleProof and blankProofOps will be used to compare against their zero values, // and are declared as globals to avoid having to unnecessarily re-allocate on every comparison. var blankMerkleProof = &MerkleProof{} -var blankProofOps = &ostcrypto.ProofOps{} +var blankProofOps = &occrypto.ProofOps{} // Empty returns true if the root is empty func (proof *MerkleProof) Empty() bool { diff --git a/x/ibc/core/client/cli/cli.go b/x/ibc/core/client/cli/cli.go index a15865e4d0..e7d2e84f2f 100644 --- a/x/ibc/core/client/cli/cli.go +++ b/x/ibc/core/client/cli/cli.go @@ -9,7 +9,7 @@ import ( channel "github.com/line/lfb-sdk/x/ibc/core/04-channel" host "github.com/line/lfb-sdk/x/ibc/core/24-host" solomachine "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine" - tendermint "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint" + tendermint "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/ibc/core/exported/client.go b/x/ibc/core/exported/client.go index 18b654daed..656b13d416 100644 --- a/x/ibc/core/exported/client.go +++ b/x/ibc/core/exported/client.go @@ -15,8 +15,8 @@ const ( // Solomachine is used to indicate that the light client is a solo machine. Solomachine string = "06-solomachine" - // Tendermint is used to indicate that the client uses the Tendermint Consensus Algorithm. - Tendermint string = "07-tendermint" + // Ostracon is used to indicate that the client uses the Ostracon Consensus Algorithm. + Ostracon string = "99-ostracon" // Localhost is the client type for a localhost client. It is also used as the clientID // for the localhost client. diff --git a/x/ibc/core/genesis_test.go b/x/ibc/core/genesis_test.go index 3929358feb..aeba81da51 100644 --- a/x/ibc/core/genesis_test.go +++ b/x/ibc/core/genesis_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/codec" @@ -16,14 +16,14 @@ import ( commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" "github.com/line/lfb-sdk/x/ibc/core/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" - localhosttypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" + localhoctypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) const ( connectionID = "connection-0" - clientID = "07-tendermint-0" + clientID = "99-ostracon-0" connectionID2 = "connection-1" clientID2 = "07-tendermin-1" localhostID = exported.Localhost + "-1" @@ -59,7 +59,7 @@ func TestIBCTestSuite(t *testing.T) { } func (suite *IBCTestSuite) TestValidateGenesis() { - header := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, clienttypes.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) + header := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, clienttypes.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Voters, suite.chainA.Voters, suite.chainA.Signers) testCases := []struct { name string @@ -80,7 +80,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( - localhostID, localhosttypes.NewClientState("chaindID", clientHeight), + localhostID, localhoctypes.NewClientState("chaindID", clientHeight), ), }, []clienttypes.ClientConsensusStates{ @@ -105,7 +105,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { }, ), }, - clienttypes.NewParams(exported.Tendermint, exported.Localhost), + clienttypes.NewParams(exported.Ostracon, exported.Localhost), true, 2, ), @@ -159,7 +159,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( - localhostID, localhosttypes.NewClientState("(chaindID)", clienttypes.ZeroHeight()), + localhostID, localhoctypes.NewClientState("(chaindID)", clienttypes.ZeroHeight()), ), }, nil, @@ -172,7 +172,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { }, ), }, - clienttypes.NewParams(exported.Tendermint), + clienttypes.NewParams(exported.Ostracon), false, 2, ), @@ -223,7 +223,7 @@ func (suite *IBCTestSuite) TestValidateGenesis() { } func (suite *IBCTestSuite) TestInitGenesis() { - header := suite.chainA.CreateTMClientHeader(suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, clienttypes.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Signers) + header := suite.chainA.CreateOCClientHeader(suite.chainA.ChainID, suite.chainA.CurrentHeader.Height, clienttypes.NewHeight(0, uint64(suite.chainA.CurrentHeader.Height-1)), suite.chainA.CurrentHeader.Time, suite.chainA.Vals, suite.chainA.Vals, suite.chainA.Voters, suite.chainA.Voters, suite.chainA.Signers) testCases := []struct { name string @@ -242,7 +242,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { clientID, ibctmtypes.NewClientState(suite.chainA.ChainID, ibctmtypes.DefaultTrustLevel, ibctesting.TrustingPeriod, ibctesting.UnbondingPeriod, ibctesting.MaxClockDrift, clientHeight, commitmenttypes.GetSDKSpecs(), ibctesting.UpgradePath, false, false), ), clienttypes.NewIdentifiedClientState( - exported.Localhost, localhosttypes.NewClientState("chaindID", clientHeight), + exported.Localhost, localhoctypes.NewClientState("chaindID", clientHeight), ), }, []clienttypes.ClientConsensusStates{ @@ -267,7 +267,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { }, ), }, - clienttypes.NewParams(exported.Tendermint, exported.Localhost), + clienttypes.NewParams(exported.Ostracon, exported.Localhost), true, 0, ), @@ -317,7 +317,7 @@ func (suite *IBCTestSuite) TestInitGenesis() { app := simapp.Setup(false) suite.NotPanics(func() { - ibc.InitGenesis(app.BaseApp.NewContext(false, ostproto.Header{Height: 1}), *app.IBCKeeper, true, tc.genState) + ibc.InitGenesis(app.BaseApp.NewContext(false, ocproto.Header{Height: 1}), *app.IBCKeeper, true, tc.genState) }) } } @@ -333,8 +333,8 @@ func (suite *IBCTestSuite) TestExportGenesis() { // creates clients suite.coordinator.Setup(suite.chainA, suite.chainB, channeltypes.UNORDERED) // create extra clients - suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) - suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) + suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Ostracon) + suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Ostracon) }, }, } diff --git a/x/ibc/core/keeper/msg_server_test.go b/x/ibc/core/keeper/msg_server_test.go index 0145b0bc94..bd4fb5080b 100644 --- a/x/ibc/core/keeper/msg_server_test.go +++ b/x/ibc/core/keeper/msg_server_test.go @@ -12,7 +12,7 @@ import ( host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" "github.com/line/lfb-sdk/x/ibc/core/keeper" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibcmock "github.com/line/lfb-sdk/x/ibc/testing/mock" upgradetypes "github.com/line/lfb-sdk/x/upgrade/types" @@ -330,7 +330,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, true}, @@ -343,7 +343,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) }, true}, @@ -361,7 +361,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) }, true}, {"success: ORDERED timeout out of order packet", func() { @@ -377,7 +377,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutPacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, true}, @@ -457,7 +457,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) @@ -478,7 +478,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) @@ -504,7 +504,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.PacketReceiptKey(packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) // close counterparty channel @@ -528,7 +528,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) } - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) // close counterparty channel @@ -567,7 +567,7 @@ func (suite *KeeperTestSuite) TestHandleTimeoutOnClosePacket() { suite.Require().NoError(err) // need to update chainA client to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) packetKey = host.NextSequenceRecvKey(packet.GetDestPort(), packet.GetDestChannel()) }, false}, @@ -646,7 +646,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -683,7 +683,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) msg, err = clienttypes.NewMsgUpgradeClient(clientA, upgradedClient, upgradedConsState, nil, nil, suite.chainA.SenderAccount.GetAddress()) @@ -695,7 +695,7 @@ func (suite *KeeperTestSuite) TestUpgradeClient() { for _, tc := range cases { tc := tc - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) tc.setup() diff --git a/x/ibc/core/simulation/decoder_test.go b/x/ibc/core/simulation/decoder_test.go index 28eda8fa2e..814a30e841 100644 --- a/x/ibc/core/simulation/decoder_test.go +++ b/x/ibc/core/simulation/decoder_test.go @@ -13,7 +13,7 @@ import ( channeltypes "github.com/line/lfb-sdk/x/ibc/core/04-channel/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/simulation" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) func TestDecodeStore(t *testing.T) { diff --git a/x/ibc/core/spec/07_params.md b/x/ibc/core/spec/07_params.md index 67e79ef81d..76ac043e87 100644 --- a/x/ibc/core/spec/07_params.md +++ b/x/ibc/core/spec/07_params.md @@ -10,7 +10,7 @@ The ibc clients contain the following parameters: | Key | Type | Default Value | |------------------|------|---------------| -| `AllowedClients` | []string | `"06-solomachine","07-tendermint"` | +| `AllowedClients` | []string | `"06-solomachine","99-ostracon"` | ### AllowedClients diff --git a/x/ibc/core/types/codec.go b/x/ibc/core/types/codec.go index 679c0181ad..27fbee81ca 100644 --- a/x/ibc/core/types/codec.go +++ b/x/ibc/core/types/codec.go @@ -7,8 +7,8 @@ import ( channeltypes "github.com/line/lfb-sdk/x/ibc/core/04-channel/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" solomachinetypes "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" - localhosttypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + localhoctypes "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) // RegisterInterfaces registers x/ibc interfaces into protobuf Any. @@ -18,6 +18,6 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { channeltypes.RegisterInterfaces(registry) solomachinetypes.RegisterInterfaces(registry) ibctmtypes.RegisterInterfaces(registry) - localhosttypes.RegisterInterfaces(registry) + localhoctypes.RegisterInterfaces(registry) commitmenttypes.RegisterInterfaces(registry) } diff --git a/x/ibc/light-clients/06-solomachine/types/client_state_test.go b/x/ibc/light-clients/06-solomachine/types/client_state_test.go index a2a8798709..67d030e9e9 100644 --- a/x/ibc/light-clients/06-solomachine/types/client_state_test.go +++ b/x/ibc/light-clients/06-solomachine/types/client_state_test.go @@ -7,7 +7,7 @@ import ( commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -103,7 +103,7 @@ func (suite *SoloMachineTestSuite) TestInitialize() { false, }, { - "invalid consensus state: Tendermint consensus state", + "invalid consensus state: Ostracon consensus state", &ibctmtypes.ConsensusState{}, false, }, @@ -132,7 +132,7 @@ func (suite *SoloMachineTestSuite) TestInitialize() { func (suite *SoloMachineTestSuite) TestVerifyClientState() { // create client for tendermint so we can use client state for verification - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA) path := suite.solomachine.GetClientStatePath(counterpartyClientIdentifier) @@ -258,7 +258,7 @@ func (suite *SoloMachineTestSuite) TestVerifyClientState() { func (suite *SoloMachineTestSuite) TestVerifyClientConsensusState() { // create client for tendermint so we can use consensus state for verification - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA) consensusState, found := suite.chainA.GetConsensusState(clientA, clientState.GetLatestHeight()) suite.Require().True(found) diff --git a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go index ac734d41df..8f8e35c570 100644 --- a/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/06-solomachine/types/misbehaviour_handle_test.go @@ -3,7 +3,7 @@ package types_test import ( "github.com/line/lfb-sdk/x/ibc/core/exported" "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) diff --git a/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go b/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go index dc50c4f958..69301f9e1b 100644 --- a/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go +++ b/x/ibc/light-clients/06-solomachine/types/proposal_handle_test.go @@ -3,7 +3,7 @@ package types_test import ( "github.com/line/lfb-sdk/x/ibc/core/exported" "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) diff --git a/x/ibc/light-clients/06-solomachine/types/update_test.go b/x/ibc/light-clients/06-solomachine/types/update_test.go index 47a2d8c996..16aa4f7b4c 100644 --- a/x/ibc/light-clients/06-solomachine/types/update_test.go +++ b/x/ibc/light-clients/06-solomachine/types/update_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/line/lfb-sdk/types" "github.com/line/lfb-sdk/x/ibc/core/exported" "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) diff --git a/x/ibc/light-clients/07-tendermint/types/fraction.go b/x/ibc/light-clients/07-tendermint/types/fraction.go deleted file mode 100644 index 7f87b5d576..0000000000 --- a/x/ibc/light-clients/07-tendermint/types/fraction.go +++ /dev/null @@ -1,25 +0,0 @@ -package types - -import ( - ostmath "github.com/line/ostracon/libs/math" - "github.com/line/ostracon/light" -) - -// DefaultTrustLevel is the tendermint light client default trust level -var DefaultTrustLevel = NewFractionFromTm(light.DefaultTrustLevel) - -// NewFractionFromTm returns a new Fraction instance from a ostmath.Fraction -func NewFractionFromTm(f ostmath.Fraction) Fraction { - return Fraction{ - Numerator: f.Numerator, - Denominator: f.Denominator, - } -} - -// ToTendermint converts Fraction to ostmath.Fraction -func (f Fraction) ToTendermint() ostmath.Fraction { - return ostmath.Fraction{ - Numerator: f.Numerator, - Denominator: f.Denominator, - } -} diff --git a/x/ibc/light-clients/09-localhost/types/client_state_test.go b/x/ibc/light-clients/09-localhost/types/client_state_test.go index 0ef9060bec..09028a3ee3 100644 --- a/x/ibc/light-clients/09-localhost/types/client_state_test.go +++ b/x/ibc/light-clients/09-localhost/types/client_state_test.go @@ -8,7 +8,7 @@ import ( commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" "github.com/line/lfb-sdk/x/ibc/light-clients/09-localhost/types" ) diff --git a/x/ibc/light-clients/09-localhost/types/localhost_test.go b/x/ibc/light-clients/09-localhost/types/localhost_test.go index 62e5015973..ac95926072 100644 --- a/x/ibc/light-clients/09-localhost/types/localhost_test.go +++ b/x/ibc/light-clients/09-localhost/types/localhost_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/codec" @@ -34,7 +34,7 @@ func (suite *LocalhostTestSuite) SetupTest() { app := simapp.Setup(isCheckTx) suite.cdc = app.AppCodec() - suite.ctx = app.BaseApp.NewContext(isCheckTx, ostproto.Header{Height: 1, ChainID: "ibc-chain"}) + suite.ctx = app.BaseApp.NewContext(isCheckTx, ocproto.Header{Height: 1, ChainID: "ibc-chain"}) suite.store = app.IBCKeeper.ClientKeeper.ClientStore(suite.ctx, exported.Localhost) } diff --git a/x/ibc/light-clients/07-tendermint/client/cli/cli.go b/x/ibc/light-clients/99-ostracon/client/cli/cli.go similarity index 81% rename from x/ibc/light-clients/07-tendermint/client/cli/cli.go rename to x/ibc/light-clients/99-ostracon/client/cli/cli.go index c8dcbe7049..78bf953be7 100644 --- a/x/ibc/light-clients/07-tendermint/client/cli/cli.go +++ b/x/ibc/light-clients/99-ostracon/client/cli/cli.go @@ -3,10 +3,10 @@ package cli import ( "github.com/spf13/cobra" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) -// NewTxCmd returns a root CLI command handler for all x/ibc/light-clients/07-tendermint transaction commands. +// NewTxCmd returns a root CLI command handler for all x/ibc/light-clients/99-ostracon transaction commands. func NewTxCmd() *cobra.Command { txCmd := &cobra.Command{ Use: types.SubModuleName, diff --git a/x/ibc/light-clients/07-tendermint/client/cli/tx.go b/x/ibc/light-clients/99-ostracon/client/cli/tx.go similarity index 98% rename from x/ibc/light-clients/07-tendermint/client/cli/tx.go rename to x/ibc/light-clients/99-ostracon/client/cli/tx.go index f5e435395d..b20b05099a 100644 --- a/x/ibc/light-clients/07-tendermint/client/cli/tx.go +++ b/x/ibc/light-clients/99-ostracon/client/cli/tx.go @@ -19,7 +19,7 @@ import ( "github.com/line/lfb-sdk/version" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) const ( @@ -71,7 +71,7 @@ func NewCreateClientCmd() *cobra.Command { lvl, _ := cmd.Flags().GetString(flagTrustLevel) if lvl == "default" { - trustLevel = types.NewFractionFromTm(light.DefaultTrustLevel) + trustLevel = types.NewFractionFromOc(light.DefaultTrustLevel) } else { trustLevel, err = parseFraction(lvl) if err != nil { diff --git a/x/ibc/light-clients/07-tendermint/doc.go b/x/ibc/light-clients/99-ostracon/doc.go similarity index 100% rename from x/ibc/light-clients/07-tendermint/doc.go rename to x/ibc/light-clients/99-ostracon/doc.go diff --git a/x/ibc/light-clients/07-tendermint/module.go b/x/ibc/light-clients/99-ostracon/module.go similarity index 65% rename from x/ibc/light-clients/07-tendermint/module.go rename to x/ibc/light-clients/99-ostracon/module.go index e74fe02d39..27a2cebb06 100644 --- a/x/ibc/light-clients/07-tendermint/module.go +++ b/x/ibc/light-clients/99-ostracon/module.go @@ -3,8 +3,8 @@ package tendermint import ( "github.com/spf13/cobra" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/client/cli" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/client/cli" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) // Name returns the IBC client name diff --git a/x/ibc/light-clients/07-tendermint/types/client_state.go b/x/ibc/light-clients/99-ostracon/types/client_state.go similarity index 98% rename from x/ibc/light-clients/07-tendermint/types/client_state.go rename to x/ibc/light-clients/99-ostracon/types/client_state.go index dedd9b7b1b..bda996e933 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state.go +++ b/x/ibc/light-clients/99-ostracon/types/client_state.go @@ -49,7 +49,7 @@ func (cs ClientState) GetChainID() string { // ClientType is tendermint. func (cs ClientState) ClientType() string { - return exported.Tendermint + return exported.Ostracon } // GetLatestHeight returns latest block height. @@ -80,7 +80,7 @@ func (cs ClientState) Validate() error { if strings.TrimSpace(cs.ChainId) == "" { return sdkerrors.Wrap(ErrInvalidChainID, "chain id cannot be empty string") } - if err := light.ValidateTrustLevel(cs.TrustLevel.ToTendermint()); err != nil { + if err := light.ValidateTrustLevel(cs.TrustLevel.ToOstracon()); err != nil { return err } if cs.TrustingPeriod == 0 { @@ -140,7 +140,7 @@ func (cs ClientState) ZeroCustomFields() exported.ClientState { } } -// Initialize will check that initial consensus state is a Tendermint consensus state +// Initialize will check that initial consensus state is a Ostracon consensus state // and will store ProcessedTime for initial consensus state as ctx.BlockTime() func (cs ClientState) Initialize(ctx sdk.Context, _ codec.BinaryMarshaler, clientStore sdk.KVStore, consState exported.ConsensusState) error { if _, ok := consState.(*ConsensusState); !ok { @@ -192,7 +192,7 @@ func (cs ClientState) VerifyClientState( } // VerifyClientConsensusState verifies a proof of the consensus state of the -// Tendermint client stored on the target machine. +// Ostracon client stored on the target machine. func (cs ClientState) VerifyClientConsensusState( store sdk.KVStore, cdc codec.BinaryMarshaler, diff --git a/x/ibc/light-clients/07-tendermint/types/client_state_test.go b/x/ibc/light-clients/99-ostracon/types/client_state_test.go similarity index 99% rename from x/ibc/light-clients/07-tendermint/types/client_state_test.go rename to x/ibc/light-clients/99-ostracon/types/client_state_test.go index c95af41cd1..0f46ab5368 100644 --- a/x/ibc/light-clients/07-tendermint/types/client_state_test.go +++ b/x/ibc/light-clients/99-ostracon/types/client_state_test.go @@ -10,7 +10,7 @@ import ( commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibcmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) @@ -119,7 +119,7 @@ func (suite *TendermintTestSuite) TestInitialize() { }, } - clientA, err := suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) + clientA, err := suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Ostracon) suite.Require().NoError(err) clientState := suite.chainA.GetClientState(clientA) @@ -639,7 +639,7 @@ func (suite *TendermintTestSuite) TestVerifyPacketReceiptAbsence() { suite.Require().NoError(err) // need to update chainA's client representing chainB to prove missing ack - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) var ok bool clientStateI := suite.chainA.GetClientState(clientA) @@ -746,7 +746,7 @@ func (suite *TendermintTestSuite) TestVerifyNextSeqRecv() { suite.Require().NoError(err) // need to update chainA's client representing chainB - suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) var ok bool clientStateI := suite.chainA.GetClientState(clientA) diff --git a/x/ibc/light-clients/07-tendermint/types/codec.go b/x/ibc/light-clients/99-ostracon/types/codec.go similarity index 100% rename from x/ibc/light-clients/07-tendermint/types/codec.go rename to x/ibc/light-clients/99-ostracon/types/codec.go diff --git a/x/ibc/light-clients/07-tendermint/types/consensus_state.go b/x/ibc/light-clients/99-ostracon/types/consensus_state.go similarity index 90% rename from x/ibc/light-clients/07-tendermint/types/consensus_state.go rename to x/ibc/light-clients/99-ostracon/types/consensus_state.go index f7d33f07cf..013056a36b 100644 --- a/x/ibc/light-clients/07-tendermint/types/consensus_state.go +++ b/x/ibc/light-clients/99-ostracon/types/consensus_state.go @@ -4,7 +4,7 @@ import ( "time" ostbytes "github.com/line/ostracon/libs/bytes" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" sdkerrors "github.com/line/lfb-sdk/types/errors" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" @@ -23,9 +23,9 @@ func NewConsensusState( } } -// ClientType returns Tendermint +// ClientType returns Ostracon func (ConsensusState) ClientType() string { - return exported.Tendermint + return exported.Ostracon } // GetRoot returns the commitment Root for the specific @@ -45,7 +45,7 @@ func (cs ConsensusState) ValidateBasic() error { if cs.Root.Empty() { return sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "root cannot be empty") } - if err := osttypes.ValidateHash(cs.NextValidatorsHash); err != nil { + if err := octypes.ValidateHash(cs.NextValidatorsHash); err != nil { return sdkerrors.Wrap(err, "next validators hash is invalid") } if cs.Timestamp.Unix() <= 0 { diff --git a/x/ibc/light-clients/07-tendermint/types/consensus_state_test.go b/x/ibc/light-clients/99-ostracon/types/consensus_state_test.go similarity index 92% rename from x/ibc/light-clients/07-tendermint/types/consensus_state_test.go rename to x/ibc/light-clients/99-ostracon/types/consensus_state_test.go index d6686a4090..f203e3781d 100644 --- a/x/ibc/light-clients/07-tendermint/types/consensus_state_test.go +++ b/x/ibc/light-clients/99-ostracon/types/consensus_state_test.go @@ -5,7 +5,7 @@ import ( commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) func (suite *TendermintTestSuite) TestConsensusStateValidateBasic() { @@ -56,7 +56,7 @@ func (suite *TendermintTestSuite) TestConsensusStateValidateBasic() { tc := tc // check just to increase coverage - suite.Require().Equal(exported.Tendermint, tc.consensusState.ClientType()) + suite.Require().Equal(exported.Ostracon, tc.consensusState.ClientType()) suite.Require().Equal(tc.consensusState.GetRoot(), tc.consensusState.Root) err := tc.consensusState.ValidateBasic() diff --git a/x/ibc/light-clients/07-tendermint/types/errors.go b/x/ibc/light-clients/99-ostracon/types/errors.go similarity index 88% rename from x/ibc/light-clients/07-tendermint/types/errors.go rename to x/ibc/light-clients/99-ostracon/types/errors.go index 6f4cb28554..3f4b3f89ab 100644 --- a/x/ibc/light-clients/07-tendermint/types/errors.go +++ b/x/ibc/light-clients/99-ostracon/types/errors.go @@ -5,10 +5,10 @@ import ( ) const ( - SubModuleName = "tendermint-client" + SubModuleName = "ostracon-client" ) -// IBC tendermint client sentinel errors +// IBC ostracon client sentinel errors var ( ErrInvalidChainID = sdkerrors.Register(SubModuleName, 2, "invalid chain-id") ErrInvalidTrustingPeriod = sdkerrors.Register(SubModuleName, 3, "invalid trusting period") @@ -22,4 +22,5 @@ var ( ErrUnbondingPeriodExpired = sdkerrors.Register(SubModuleName, 11, "time since latest trusted state has passed the unbonding period") ErrInvalidProofSpecs = sdkerrors.Register(SubModuleName, 12, "invalid proof specs") ErrInvalidValidatorSet = sdkerrors.Register(SubModuleName, 13, "invalid validator set") + ErrInvalidVoterSet = sdkerrors.Register(SubModuleName, 99, "invalid voter set") ) diff --git a/x/ibc/light-clients/99-ostracon/types/fraction.go b/x/ibc/light-clients/99-ostracon/types/fraction.go new file mode 100644 index 0000000000..aab6cbb3ed --- /dev/null +++ b/x/ibc/light-clients/99-ostracon/types/fraction.go @@ -0,0 +1,25 @@ +package types + +import ( + ocmath "github.com/line/ostracon/libs/math" + "github.com/line/ostracon/light" +) + +// DefaultTrustLevel is the ostracon light client default trust level +var DefaultTrustLevel = NewFractionFromOc(light.DefaultTrustLevel) + +// NewFractionFromOc returns a new Fraction instance from a ocmath.Fraction +func NewFractionFromOc(f ocmath.Fraction) Fraction { + return Fraction{ + Numerator: f.Numerator, + Denominator: f.Denominator, + } +} + +// ToOstracon converts Fraction to ocmath.Fraction +func (f Fraction) ToOstracon() ocmath.Fraction { + return ocmath.Fraction{ + Numerator: f.Numerator, + Denominator: f.Denominator, + } +} diff --git a/x/ibc/light-clients/07-tendermint/types/genesis.go b/x/ibc/light-clients/99-ostracon/types/genesis.go similarity index 100% rename from x/ibc/light-clients/07-tendermint/types/genesis.go rename to x/ibc/light-clients/99-ostracon/types/genesis.go diff --git a/x/ibc/light-clients/07-tendermint/types/genesis_test.go b/x/ibc/light-clients/99-ostracon/types/genesis_test.go similarity index 96% rename from x/ibc/light-clients/07-tendermint/types/genesis_test.go rename to x/ibc/light-clients/99-ostracon/types/genesis_test.go index 8bc52ea880..5fdcba7464 100644 --- a/x/ibc/light-clients/07-tendermint/types/genesis_test.go +++ b/x/ibc/light-clients/99-ostracon/types/genesis_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/line/lfb-sdk/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) func (suite *TendermintTestSuite) TestExportMetadata() { diff --git a/x/ibc/light-clients/07-tendermint/types/header.go b/x/ibc/light-clients/99-ostracon/types/header.go similarity index 71% rename from x/ibc/light-clients/07-tendermint/types/header.go rename to x/ibc/light-clients/99-ostracon/types/header.go index d7c0999fb8..a5e1393fa3 100644 --- a/x/ibc/light-clients/07-tendermint/types/header.go +++ b/x/ibc/light-clients/99-ostracon/types/header.go @@ -4,7 +4,7 @@ import ( "bytes" "time" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" sdkerrors "github.com/line/lfb-sdk/types/errors" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" @@ -23,12 +23,12 @@ func (h Header) ConsensusState() *ConsensusState { } } -// ClientType defines that the Header is a Tendermint consensus algorithm +// ClientType defines that the Header is a Ostracon consensus algorithm func (h Header) ClientType() string { - return exported.Tendermint + return exported.Ostracon } -// GetHeight returns the current height. It returns 0 if the tendermint +// GetHeight returns the current height. It returns 0 if the ostracon // header is nil. // NOTE: the header.Header is checked to be non nil in ValidateBasic. func (h Header) GetHeight() exported.Height { @@ -37,7 +37,7 @@ func (h Header) GetHeight() exported.Height { } // GetTime returns the current block timestamp. It returns a zero time if -// the tendermint header is nil. +// the ostracon header is nil. // NOTE: the header.Header is checked to be non nil in ValidateBasic. func (h Header) GetTime() time.Time { return h.Header.Time @@ -49,16 +49,16 @@ func (h Header) GetTime() time.Time { // with MsgCreateClient func (h Header) ValidateBasic() error { if h.SignedHeader == nil { - return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "tendermint signed header cannot be nil") + return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "ostracon signed header cannot be nil") } if h.Header == nil { - return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "tendermint header cannot be nil") + return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "ostracon header cannot be nil") } - tmSignedHeader, err := osttypes.SignedHeaderFromProto(h.SignedHeader) + ocSignedHeader, err := octypes.SignedHeaderFromProto(h.SignedHeader) if err != nil { - return sdkerrors.Wrap(err, "header is not a tendermint header") + return sdkerrors.Wrap(err, "header is not a ostracon header") } - if err := tmSignedHeader.ValidateBasic(h.Header.GetChainID()); err != nil { + if err := ocSignedHeader.ValidateBasic(h.Header.GetChainID()); err != nil { return sdkerrors.Wrap(err, "header failed basic validation") } @@ -72,11 +72,11 @@ func (h Header) ValidateBasic() error { if h.ValidatorSet == nil { return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "validator set is nil") } - tmValset, err := osttypes.ValidatorSetFromProto(h.ValidatorSet) + ocValset, err := octypes.ValidatorSetFromProto(h.ValidatorSet) if err != nil { - return sdkerrors.Wrap(err, "validator set is not tendermint validator set") + return sdkerrors.Wrap(err, "validator set is not ostracon validator set") } - if !bytes.Equal(h.Header.ValidatorsHash, tmValset.Hash()) { + if !bytes.Equal(h.Header.ValidatorsHash, ocValset.Hash()) { return sdkerrors.Wrap(clienttypes.ErrInvalidHeader, "validator set does not match hash") } return nil diff --git a/x/ibc/light-clients/07-tendermint/types/header_test.go b/x/ibc/light-clients/99-ostracon/types/header_test.go similarity index 87% rename from x/ibc/light-clients/07-tendermint/types/header_test.go rename to x/ibc/light-clients/99-ostracon/types/header_test.go index 6323b47b60..46ab31cee1 100644 --- a/x/ibc/light-clients/07-tendermint/types/header_test.go +++ b/x/ibc/light-clients/99-ostracon/types/header_test.go @@ -3,11 +3,11 @@ package types_test import ( "time" - ostprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" + ocprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) func (suite *TendermintTestSuite) TestGetHeight() { @@ -50,7 +50,7 @@ func (suite *TendermintTestSuite) TestHeaderValidateBasic() { header.ValidatorSet = nil }, false}, {"ValidatorSetFromProto failed", func() { - header.ValidatorSet.Validators[0].PubKey = ostprotocrypto.PublicKey{} + header.ValidatorSet.Validators[0].PubKey = ocprotocrypto.PublicKey{} }, false}, {"header validator hash does not equal hash of validator set", func() { // use chainB's randomly generated validator set @@ -58,7 +58,7 @@ func (suite *TendermintTestSuite) TestHeaderValidateBasic() { }, false}, } - suite.Require().Equal(exported.Tendermint, suite.header.ClientType()) + suite.Require().Equal(exported.Ostracon, suite.header.ClientType()) for _, tc := range testCases { tc := tc diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go b/x/ibc/light-clients/99-ostracon/types/misbehaviour.go similarity index 75% rename from x/ibc/light-clients/07-tendermint/types/misbehaviour.go rename to x/ibc/light-clients/99-ostracon/types/misbehaviour.go index 005c222013..3e3c4082d1 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour.go +++ b/x/ibc/light-clients/99-ostracon/types/misbehaviour.go @@ -4,8 +4,8 @@ import ( "bytes" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" sdkerrors "github.com/line/lfb-sdk/types/errors" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" @@ -24,9 +24,9 @@ func NewMisbehaviour(clientID string, header1, header2 *Header) *Misbehaviour { } } -// ClientType is Tendermint light client +// ClientType is Ostracon light client func (misbehaviour Misbehaviour) ClientType() string { - return exported.Tendermint + return exported.Ostracon } // GetClientID returns the ID of the client that committed a misbehaviour. @@ -69,9 +69,15 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { if misbehaviour.Header1.TrustedValidators == nil { return sdkerrors.Wrap(ErrInvalidValidatorSet, "trusted validator set in Header1 cannot be empty") } + if misbehaviour.Header1.TrustedVoters == nil { + return sdkerrors.Wrap(ErrInvalidVoterSet, "trusted voter set in Header1 cannot be empty") + } if misbehaviour.Header2.TrustedValidators == nil { return sdkerrors.Wrap(ErrInvalidValidatorSet, "trusted validator set in Header2 cannot be empty") } + if misbehaviour.Header2.TrustedVoters == nil { + return sdkerrors.Wrap(ErrInvalidVoterSet, "trusted voter set in Header2 cannot be empty") + } if misbehaviour.Header1.Header.ChainID != misbehaviour.Header2.Header.ChainID { return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers must have identical chainIDs") } @@ -98,11 +104,11 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { return sdkerrors.Wrapf(clienttypes.ErrInvalidMisbehaviour, "headers in misbehaviour are on different heights (%d ≠ %d)", misbehaviour.Header1.GetHeight(), misbehaviour.Header2.GetHeight()) } - blockID1, err := osttypes.BlockIDFromProto(&misbehaviour.Header1.SignedHeader.Commit.BlockID) + blockID1, err := octypes.BlockIDFromProto(&misbehaviour.Header1.SignedHeader.Commit.BlockID) if err != nil { return sdkerrors.Wrap(err, "invalid block ID from header 1 in misbehaviour") } - blockID2, err := osttypes.BlockIDFromProto(&misbehaviour.Header2.SignedHeader.Commit.BlockID) + blockID2, err := octypes.BlockIDFromProto(&misbehaviour.Header2.SignedHeader.Commit.BlockID) if err != nil { return sdkerrors.Wrap(err, "invalid block ID from header 2 in misbehaviour") } @@ -112,29 +118,29 @@ func (misbehaviour Misbehaviour) ValidateBasic() error { return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "headers block hashes are equal") } if err := validCommit(misbehaviour.Header1.Header.ChainID, *blockID1, - misbehaviour.Header1.Commit, misbehaviour.Header1.ValidatorSet); err != nil { + misbehaviour.Header1.Commit, misbehaviour.Header1.VoterSet); err != nil { return err } if err := validCommit(misbehaviour.Header2.Header.ChainID, *blockID2, - misbehaviour.Header2.Commit, misbehaviour.Header2.ValidatorSet); err != nil { + misbehaviour.Header2.Commit, misbehaviour.Header2.VoterSet); err != nil { return err } return nil } // validCommit checks if the given commit is a valid commit from the passed-in validatorset -func validCommit(chainID string, blockID osttypes.BlockID, commit *ostproto.Commit, valSet *ostproto.ValidatorSet) (err error) { - tmCommit, err := osttypes.CommitFromProto(commit) +func validCommit(chainID string, blockID octypes.BlockID, commit *ocproto.Commit, voterSet *ocproto.VoterSet) (err error) { + ocCommit, err := octypes.CommitFromProto(commit) if err != nil { - return sdkerrors.Wrap(err, "commit is not tendermint commit type") + return sdkerrors.Wrap(err, "commit is not ostracon commit type") } - tmValset, err := osttypes.ValidatorSetFromProto(valSet) + ocVoterSet, err := octypes.VoterSetFromProto(voterSet) if err != nil { - return sdkerrors.Wrap(err, "validator set is not tendermint validator set type") + return sdkerrors.Wrap(err, "validator set is not tendermint voter set type") } - if err := tmValset.VerifyCommitLight(chainID, blockID, tmCommit.Height, tmCommit); err != nil { - return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "validator set did not commit to header") + if err := ocVoterSet.VerifyCommit(chainID, blockID, ocCommit.Height, ocCommit); err != nil { + return sdkerrors.Wrap(clienttypes.ErrInvalidMisbehaviour, "voter set did not commit to header") } return nil diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go b/x/ibc/light-clients/99-ostracon/types/misbehaviour_handle.go similarity index 93% rename from x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go rename to x/ibc/light-clients/99-ostracon/types/misbehaviour_handle.go index bc31dfe379..03d46408ed 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle.go +++ b/x/ibc/light-clients/99-ostracon/types/misbehaviour_handle.go @@ -3,7 +3,7 @@ package types import ( "time" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/codec" sdk "github.com/line/lfb-sdk/types" @@ -77,12 +77,12 @@ func checkMisbehaviourHeader( clientState *ClientState, consState *ConsensusState, header *Header, currentTimestamp time.Time, ) error { - tmTrustedValset, err := osttypes.ValidatorSetFromProto(header.TrustedValidators) + ocTrustedVoterSet, err := octypes.VoterSetFromProto(header.TrustedVoters) if err != nil { return sdkerrors.Wrap(err, "trusted validator set is not tendermint validator set type") } - tmCommit, err := osttypes.CommitFromProto(header.Commit) + tmCommit, err := octypes.CommitFromProto(header.Commit) if err != nil { return sdkerrors.Wrap(err, "commit is not tendermint commit type") } @@ -110,8 +110,8 @@ func checkMisbehaviourHeader( // - ValidatorSet must have TrustLevel similarity with trusted FromValidatorSet // - ValidatorSets on both headers are valid given the last trusted ValidatorSet - if err := tmTrustedValset.VerifyCommitLightTrusting( - chainID, tmCommit, clientState.TrustLevel.ToTendermint(), + if err := ocTrustedVoterSet.VerifyCommitLightTrusting( + chainID, tmCommit, clientState.TrustLevel.ToOstracon(), ); err != nil { return sdkerrors.Wrapf(clienttypes.ErrInvalidMisbehaviour, "validator set in header has too much change from trusted validator set: %v", err) } diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go b/x/ibc/light-clients/99-ostracon/types/misbehaviour_handle_test.go similarity index 74% rename from x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go rename to x/ibc/light-clients/99-ostracon/types/misbehaviour_handle_test.go index f78a95c69b..d10fcc3765 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_handle_test.go +++ b/x/ibc/light-clients/99-ostracon/types/misbehaviour_handle_test.go @@ -5,12 +5,12 @@ import ( "time" "github.com/line/ostracon/crypto/tmhash" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibctestingmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) @@ -20,20 +20,21 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { altPubKey, err := altPrivVal.GetPubKey() suite.Require().NoError(err) - altVal := osttypes.NewValidator(altPubKey, 4) + altVal := ibctesting.NewTestValidator(altPubKey, 4) // Create bothValSet with both suite validator and altVal - bothValSet := osttypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) + bothValSet := octypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) + bothVoterSet := octypes.WrapValidatorsToVoterSet(bothValSet.Validators) bothValsHash := bothValSet.Hash() // Create alternative validator set with only altVal - altValSet := osttypes.NewValidatorSet([]*osttypes.Validator{altVal}) + altValSet := octypes.NewValidatorSet([]*octypes.Validator{altVal}) _, suiteVal := suite.valSet.GetByIndex(0) // Create signer array and ensure it is in same order as bothValSet bothSigners := ibctesting.CreateSortedSignerArray(altPrivVal, suite.privVal, altVal, suiteVal) - altSigners := []osttypes.PrivValidator{altPrivVal} + altSigners := []octypes.PrivValidator{altPrivVal} heightMinus1 := clienttypes.NewHeight(height.RevisionNumber, height.RevisionHeight-1) heightMinus3 := clienttypes.NewHeight(height.RevisionNumber, height.RevisionHeight-3) @@ -57,8 +58,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -72,8 +73,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), heightMinus1, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -87,8 +88,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), heightMinus3, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), ClientId: chainID, }, suite.now, @@ -102,8 +103,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), heightMinus3, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainIDRevision0, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainIDRevision0, int64(height.RevisionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainIDRevision0, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainIDRevision0, int64(height.RevisionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), ClientId: chainID, }, suite.now, @@ -117,8 +118,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), heightMinus3, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainIDRevision0, 3, heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainIDRevision0, 3, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainIDRevision0, 3, heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainIDRevision0, 3, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), ClientId: chainID, }, suite.now, @@ -132,8 +133,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), heightMinus3, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainIDRevision1, 1, heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainIDRevision1, 1, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainIDRevision1, 1, heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainIDRevision1, 1, heightMinus3, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), ClientId: chainID, }, suite.now, @@ -147,8 +148,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, suite.valSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), ClientId: chainID, }, suite.now, @@ -162,8 +163,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader("ethermint", int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader("ethermint", int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader("ethermint", int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -177,8 +178,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), heightMinus3, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), ClientId: chainID, }, suite.now, @@ -192,8 +193,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), suite.valsHash), heightMinus3, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus3, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -207,8 +208,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -222,8 +223,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -248,8 +249,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -263,8 +264,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now.Add(trustingPeriod), @@ -278,8 +279,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, suite.valSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, suite.valSet, bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, suite.valSet, bothVoterSet, octypes.WrapValidatorsToVoterSet(suite.valSet.Validators), bothSigners), ClientId: chainID, }, suite.now, @@ -293,8 +294,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, altValSet, bothValSet, altSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, altValSet, bothValSet, octypes.WrapValidatorsToVoterSet(altValSet.Validators), bothVoterSet, altSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners), ClientId: chainID, }, suite.now, @@ -308,8 +309,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet, bothSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, altSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, bothValSet, bothValSet,bothVoterSet, bothVoterSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, octypes.WrapValidatorsToVoterSet(altValSet.Validators), bothVoterSet, altSigners), ClientId: chainID, }, suite.now, @@ -323,8 +324,8 @@ func (suite *TendermintTestSuite) TestCheckMisbehaviourAndUpdateState() { types.NewConsensusState(suite.now, commitmenttypes.NewMerkleRoot(tmhash.Sum([]byte("app_hash"))), bothValsHash), height, &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, altValSet, bothValSet, altSigners), - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, altSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now, altValSet, bothValSet, octypes.WrapValidatorsToVoterSet(altValSet.Validators), bothVoterSet, altSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), height, suite.now.Add(time.Minute), altValSet, bothValSet, octypes.WrapValidatorsToVoterSet(altValSet.Validators), bothVoterSet, altSigners), ClientId: chainID, }, suite.now, diff --git a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go b/x/ibc/light-clients/99-ostracon/types/misbehaviour_test.go similarity index 66% rename from x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go rename to x/ibc/light-clients/99-ostracon/types/misbehaviour_test.go index a49f396463..6baf58946e 100644 --- a/x/ibc/light-clients/07-tendermint/types/misbehaviour_test.go +++ b/x/ibc/light-clients/99-ostracon/types/misbehaviour_test.go @@ -4,27 +4,28 @@ import ( "time" "github.com/line/ostracon/crypto/tmhash" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibctestingmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) func (suite *TendermintTestSuite) TestMisbehaviour() { - signers := []osttypes.PrivValidator{suite.privVal} + signers := []octypes.PrivValidator{suite.privVal} heightMinus1 := clienttypes.NewHeight(0, height.RevisionHeight-1) + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) misbehaviour := &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, voterSet, voterSet, signers), ClientId: clientID, } - suite.Require().Equal(exported.Tendermint, misbehaviour.ClientType()) + suite.Require().Equal(exported.Ostracon, misbehaviour.ClientType()) suite.Require().Equal(clientID, misbehaviour.GetClientID()) suite.Require().Equal(height, misbehaviour.GetHeight()) } @@ -36,23 +37,26 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { revisionHeight := int64(height.RevisionHeight) - altVal := osttypes.NewValidator(altPubKey, revisionHeight) + altVal := ibctesting.NewTestValidator(altPubKey, revisionHeight) // Create bothValSet with both suite validator and altVal - bothValSet := osttypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) + bothValSet := octypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) // Create alternative validator set with only altVal - altValSet := osttypes.NewValidatorSet([]*osttypes.Validator{altVal}) + altValSet := octypes.NewValidatorSet([]*octypes.Validator{altVal}) - signers := []osttypes.PrivValidator{suite.privVal} + signers := []octypes.PrivValidator{suite.privVal} // Create signer array and ensure it is in same order as bothValSet _, suiteVal := suite.valSet.GetByIndex(0) bothSigners := ibctesting.CreateSortedSignerArray(altPrivVal, suite.privVal, altVal, suiteVal) - altSigners := []osttypes.PrivValidator{altPrivVal} + altSigners := []octypes.PrivValidator{altPrivVal} heightMinus1 := clienttypes.NewHeight(0, height.RevisionHeight-1) + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) + bothVoterSet := octypes.WrapValidatorsToVoterSet(bothValSet.Validators) + testCases := []struct { name string misbehaviour *types.Misbehaviour @@ -63,7 +67,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "valid misbehaviour", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, suite.valSet, voterSet, voterSet, signers), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -85,7 +89,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "valid misbehaviour with different trusted headers", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), clienttypes.NewHeight(0, height.RevisionHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, signers), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), clienttypes.NewHeight(0, height.RevisionHeight-3), suite.now.Add(time.Minute), suite.valSet, bothValSet, voterSet, bothVoterSet, signers), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -94,7 +98,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { { "trusted height is 0 in Header1", &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, voterSet, voterSet, signers), Header2: suite.header, ClientId: clientID, }, @@ -105,7 +109,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "trusted height is 0 in Header2", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), clienttypes.ZeroHeight(), suite.now.Add(time.Minute), suite.valSet, suite.valSet, voterSet, voterSet, signers), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -114,7 +118,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { { "trusted valset is nil in Header1", &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, signers), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, voterSet, nil, signers), Header2: suite.header, ClientId: clientID, }, @@ -125,7 +129,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "trusted valset is nil in Header2", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, signers), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now.Add(time.Minute), suite.valSet, nil, voterSet, nil, signers), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -135,7 +139,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "invalid client ID ", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, voterSet, voterSet, signers), ClientId: "GAIA", }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -145,7 +149,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "chainIDs do not match", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader("ethermint", int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, signers), + Header2: suite.chainA.CreateOCClientHeader("ethermint", int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, voterSet, voterSet, signers), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -155,7 +159,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "mismatched heights", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, 6, clienttypes.NewHeight(0, 4), suite.now, suite.valSet, suite.valSet, signers), + Header2: suite.chainA.CreateOCClientHeader(chainID, 6, clienttypes.NewHeight(0, 4), suite.now, suite.valSet, suite.valSet, voterSet, voterSet, signers), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { return nil }, @@ -174,19 +178,19 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { { "header 1 doesn't have 2/3 majority", &types.Misbehaviour{ - Header1: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), + Header1: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothVoterSet, voterSet, bothSigners), Header2: suite.header, ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { // voteSet contains only altVal which is less than 2/3 of total power (height/1height) - wrongVoteSet := osttypes.NewVoteSet(chainID, int64(misbehaviour.Header1.GetHeight().GetRevisionHeight()), 1, ostproto.PrecommitType, altValSet) - blockID, err := osttypes.BlockIDFromProto(&misbehaviour.Header1.Commit.BlockID) + wrongVoteSet := octypes.NewVoteSet(chainID, int64(misbehaviour.Header1.GetHeight().GetRevisionHeight()), 1, ocproto.PrecommitType, octypes.WrapValidatorsToVoterSet(altValSet.Validators)) + blockID, err := octypes.BlockIDFromProto(&misbehaviour.Header1.Commit.BlockID) if err != nil { return err } - tmCommit, err := osttypes.MakeCommit(*blockID, int64(misbehaviour.Header2.GetHeight().GetRevisionHeight()), misbehaviour.Header1.Commit.Round, wrongVoteSet, altSigners, suite.now) + tmCommit, err := octypes.MakeCommit(*blockID, int64(misbehaviour.Header2.GetHeight().GetRevisionHeight()), misbehaviour.Header1.Commit.Round, wrongVoteSet, altSigners, suite.now) misbehaviour.Header1.Commit = tmCommit.ToProto() return err }, @@ -196,18 +200,18 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "header 2 doesn't have 2/3 majority", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothVoterSet, voterSet, bothSigners), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { // voteSet contains only altVal which is less than 2/3 of total power (height/1height) - wrongVoteSet := osttypes.NewVoteSet(chainID, int64(misbehaviour.Header2.GetHeight().GetRevisionHeight()), 1, ostproto.PrecommitType, altValSet) - blockID, err := osttypes.BlockIDFromProto(&misbehaviour.Header2.Commit.BlockID) + wrongVoteSet := octypes.NewVoteSet(chainID, int64(misbehaviour.Header2.GetHeight().GetRevisionHeight()), 1, ocproto.PrecommitType, octypes.WrapValidatorsToVoterSet(altValSet.Validators)) + blockID, err := octypes.BlockIDFromProto(&misbehaviour.Header2.Commit.BlockID) if err != nil { return err } - tmCommit, err := osttypes.MakeCommit(*blockID, int64(misbehaviour.Header2.GetHeight().GetRevisionHeight()), misbehaviour.Header2.Commit.Round, wrongVoteSet, altSigners, suite.now) + tmCommit, err := octypes.MakeCommit(*blockID, int64(misbehaviour.Header2.GetHeight().GetRevisionHeight()), misbehaviour.Header2.Commit.Round, wrongVoteSet, altSigners, suite.now) misbehaviour.Header2.Commit = tmCommit.ToProto() return err }, @@ -217,7 +221,7 @@ func (suite *TendermintTestSuite) TestMisbehaviourValidateBasic() { "validators sign off on wrong commit", &types.Misbehaviour{ Header1: suite.header, - Header2: suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothSigners), + Header2: suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, bothValSet, suite.valSet, bothVoterSet, voterSet, bothSigners), ClientId: clientID, }, func(misbehaviour *types.Misbehaviour) error { diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go b/x/ibc/light-clients/99-ostracon/types/ostracon.pb.go similarity index 70% rename from x/ibc/light-clients/07-tendermint/types/tendermint.pb.go rename to x/ibc/light-clients/99-ostracon/types/ostracon.pb.go index 820f6b7e7b..fe4266f742 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint.pb.go +++ b/x/ibc/light-clients/99-ostracon/types/ostracon.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc/lightclients/tendermint/v1/tendermint.proto +// source: ibc/lightclients/ostracon/v1/ostracon.proto package types @@ -33,7 +33,7 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ClientState from Tendermint tracks the current validator set, latest height, +// ClientState from Ostracon tracks the current validator set, latest height, // and a possible frozen height. type ClientState struct { ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` @@ -69,7 +69,7 @@ func (m *ClientState) Reset() { *m = ClientState{} } func (m *ClientState) String() string { return proto.CompactTextString(m) } func (*ClientState) ProtoMessage() {} func (*ClientState) Descriptor() ([]byte, []int) { - return fileDescriptor_c6d6cf2b288949be, []int{0} + return fileDescriptor_049a55681d0db341, []int{0} } func (m *ClientState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -98,7 +98,7 @@ func (m *ClientState) XXX_DiscardUnknown() { var xxx_messageInfo_ClientState proto.InternalMessageInfo -// ConsensusState defines the consensus state from Tendermint. +// ConsensusState defines the consensus state from Ostracon. type ConsensusState struct { // timestamp that corresponds to the block height in which the ConsensusState // was stored. @@ -112,7 +112,7 @@ func (m *ConsensusState) Reset() { *m = ConsensusState{} } func (m *ConsensusState) String() string { return proto.CompactTextString(m) } func (*ConsensusState) ProtoMessage() {} func (*ConsensusState) Descriptor() ([]byte, []int) { - return fileDescriptor_c6d6cf2b288949be, []int{1} + return fileDescriptor_049a55681d0db341, []int{1} } func (m *ConsensusState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -153,7 +153,7 @@ func (m *Misbehaviour) Reset() { *m = Misbehaviour{} } func (m *Misbehaviour) String() string { return proto.CompactTextString(m) } func (*Misbehaviour) ProtoMessage() {} func (*Misbehaviour) Descriptor() ([]byte, []int) { - return fileDescriptor_c6d6cf2b288949be, []int{2} + return fileDescriptor_049a55681d0db341, []int{2} } func (m *Misbehaviour) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -182,9 +182,9 @@ func (m *Misbehaviour) XXX_DiscardUnknown() { var xxx_messageInfo_Misbehaviour proto.InternalMessageInfo -// Header defines the Tendermint client consensus Header. +// Header defines the Ostracon client consensus Header. // It encapsulates all the information necessary to update from a trusted -// Tendermint ConsensusState. The inclusion of TrustedHeight and +// Ostracon ConsensusState. The inclusion of TrustedHeight and // TrustedValidators allows this update to process correctly, so long as the // ConsensusState for the TrustedHeight exists, this removes race conditions // among relayers The SignedHeader and ValidatorSet are the new untrusted update @@ -197,15 +197,17 @@ var xxx_messageInfo_Misbehaviour proto.InternalMessageInfo type Header struct { *types2.SignedHeader `protobuf:"bytes,1,opt,name=signed_header,json=signedHeader,proto3,embedded=signed_header" json:"signed_header,omitempty" yaml:"signed_header"` ValidatorSet *types2.ValidatorSet `protobuf:"bytes,2,opt,name=validator_set,json=validatorSet,proto3" json:"validator_set,omitempty" yaml:"validator_set"` - TrustedHeight types.Height `protobuf:"bytes,3,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height" yaml:"trusted_height"` - TrustedValidators *types2.ValidatorSet `protobuf:"bytes,4,opt,name=trusted_validators,json=trustedValidators,proto3" json:"trusted_validators,omitempty" yaml:"trusted_validators"` + VoterSet *types2.VoterSet `protobuf:"bytes,3,opt,name=voter_set,json=voterSet,proto3" json:"voter_set,omitempty" yaml:"voter_set"` + TrustedHeight types.Height `protobuf:"bytes,4,opt,name=trusted_height,json=trustedHeight,proto3" json:"trusted_height" yaml:"trusted_height"` + TrustedValidators *types2.ValidatorSet `protobuf:"bytes,5,opt,name=trusted_validators,json=trustedValidators,proto3" json:"trusted_validators,omitempty" yaml:"trusted_validators"` + TrustedVoters *types2.VoterSet `protobuf:"bytes,6,opt,name=trusted_voters,json=trustedVoters,proto3" json:"trusted_voters,omitempty" yaml:"trusted_voters"` } func (m *Header) Reset() { *m = Header{} } func (m *Header) String() string { return proto.CompactTextString(m) } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_c6d6cf2b288949be, []int{3} + return fileDescriptor_049a55681d0db341, []int{3} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,6 +243,13 @@ func (m *Header) GetValidatorSet() *types2.ValidatorSet { return nil } +func (m *Header) GetVoterSet() *types2.VoterSet { + if m != nil { + return m.VoterSet + } + return nil +} + func (m *Header) GetTrustedHeight() types.Height { if m != nil { return m.TrustedHeight @@ -255,6 +264,13 @@ func (m *Header) GetTrustedValidators() *types2.ValidatorSet { return nil } +func (m *Header) GetTrustedVoters() *types2.VoterSet { + if m != nil { + return m.TrustedVoters + } + return nil +} + // Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. type Fraction struct { Numerator uint64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` @@ -265,7 +281,7 @@ func (m *Fraction) Reset() { *m = Fraction{} } func (m *Fraction) String() string { return proto.CompactTextString(m) } func (*Fraction) ProtoMessage() {} func (*Fraction) Descriptor() ([]byte, []int) { - return fileDescriptor_c6d6cf2b288949be, []int{4} + return fileDescriptor_049a55681d0db341, []int{4} } func (m *Fraction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -309,88 +325,90 @@ func (m *Fraction) GetDenominator() uint64 { } func init() { - proto.RegisterType((*ClientState)(nil), "ibc.lightclients.tendermint.v1.ClientState") - proto.RegisterType((*ConsensusState)(nil), "ibc.lightclients.tendermint.v1.ConsensusState") - proto.RegisterType((*Misbehaviour)(nil), "ibc.lightclients.tendermint.v1.Misbehaviour") - proto.RegisterType((*Header)(nil), "ibc.lightclients.tendermint.v1.Header") - proto.RegisterType((*Fraction)(nil), "ibc.lightclients.tendermint.v1.Fraction") + proto.RegisterType((*ClientState)(nil), "ibc.lightclients.ostracon.v1.ClientState") + proto.RegisterType((*ConsensusState)(nil), "ibc.lightclients.ostracon.v1.ConsensusState") + proto.RegisterType((*Misbehaviour)(nil), "ibc.lightclients.ostracon.v1.Misbehaviour") + proto.RegisterType((*Header)(nil), "ibc.lightclients.ostracon.v1.Header") + proto.RegisterType((*Fraction)(nil), "ibc.lightclients.ostracon.v1.Fraction") } func init() { - proto.RegisterFile("ibc/lightclients/tendermint/v1/tendermint.proto", fileDescriptor_c6d6cf2b288949be) + proto.RegisterFile("ibc/lightclients/ostracon/v1/ostracon.proto", fileDescriptor_049a55681d0db341) } -var fileDescriptor_c6d6cf2b288949be = []byte{ - // 1091 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, - 0x17, 0x6f, 0xda, 0x7e, 0xb7, 0xc9, 0x24, 0xdd, 0xf6, 0xeb, 0x2d, 0xdd, 0xb4, 0x74, 0xe3, 0x68, - 0x40, 0x4b, 0x84, 0xa8, 0x4d, 0xb2, 0x07, 0xa4, 0x0a, 0x09, 0xe1, 0x2e, 0xa8, 0x45, 0xac, 0xa8, - 0x5c, 0x40, 0x02, 0x84, 0xcc, 0xc4, 0x9e, 0xc4, 0x43, 0x6d, 0x8f, 0xf1, 0x4c, 0x42, 0xca, 0x8d, - 0x1b, 0x17, 0xa4, 0x3d, 0x70, 0xe0, 0xc0, 0x81, 0x3f, 0x67, 0x8f, 0x3d, 0x72, 0x32, 0xa8, 0xbd, - 0x70, 0xce, 0x91, 0x13, 0xf2, 0xcc, 0xf8, 0x47, 0xb3, 0x3f, 0xaa, 0xe5, 0x12, 0xcd, 0x7b, 0xef, - 0xf3, 0x3e, 0x9f, 0xcc, 0x9b, 0x37, 0x6f, 0x0c, 0x4c, 0x32, 0x74, 0xcd, 0x80, 0x8c, 0x7d, 0xee, - 0x06, 0x04, 0x47, 0x9c, 0x99, 0x1c, 0x47, 0x1e, 0x4e, 0x42, 0x12, 0x71, 0x73, 0xda, 0xaf, 0x58, - 0x46, 0x9c, 0x50, 0x4e, 0xb5, 0x0e, 0x19, 0xba, 0x46, 0x35, 0xc1, 0xa8, 0x40, 0xa6, 0xfd, 0xdd, - 0x0e, 0x65, 0x3c, 0x41, 0x2e, 0x8d, 0x4c, 0x7e, 0x1e, 0x63, 0x66, 0x4e, 0x51, 0x40, 0x3c, 0xc4, - 0x69, 0x22, 0xf3, 0x77, 0x77, 0x17, 0xe2, 0xe2, 0x57, 0xc5, 0xee, 0xb8, 0x34, 0x1a, 0x11, 0x6a, - 0xc6, 0x09, 0xa5, 0xa3, 0xdc, 0xd9, 0x19, 0x53, 0x3a, 0x0e, 0xb0, 0x29, 0xac, 0xe1, 0x64, 0x64, - 0x7a, 0x93, 0x04, 0x71, 0x42, 0x23, 0x15, 0xd7, 0x17, 0xe3, 0x9c, 0x84, 0x98, 0x71, 0x14, 0xc6, - 0x39, 0x20, 0xdb, 0xa2, 0x4b, 0x13, 0x6c, 0xca, 0x7f, 0x9c, 0x6d, 0x4b, 0xae, 0x14, 0xe0, 0x8d, - 0x12, 0x40, 0xc3, 0x90, 0xf0, 0x30, 0x07, 0x15, 0x96, 0x02, 0x6e, 0x8d, 0xe9, 0x98, 0x8a, 0xa5, - 0x99, 0xad, 0xa4, 0x17, 0xfe, 0xbd, 0x06, 0x9a, 0x87, 0x82, 0xef, 0x94, 0x23, 0x8e, 0xb5, 0x1d, - 0x50, 0x77, 0x7d, 0x44, 0x22, 0x87, 0x78, 0xed, 0x5a, 0xb7, 0xd6, 0x6b, 0xd8, 0x6b, 0xc2, 0x3e, - 0xf6, 0x34, 0x0c, 0x9a, 0x3c, 0x99, 0x30, 0xee, 0x04, 0x78, 0x8a, 0x83, 0xf6, 0x72, 0xb7, 0xd6, - 0x6b, 0x0e, 0x7a, 0xc6, 0x8b, 0x4b, 0x6a, 0x7c, 0x98, 0x20, 0x37, 0xdb, 0xb0, 0xb5, 0xfb, 0x24, - 0xd5, 0x97, 0xe6, 0xa9, 0xae, 0x9d, 0xa3, 0x30, 0x38, 0x80, 0x15, 0x2a, 0x68, 0x03, 0x61, 0x7d, - 0x9c, 0x19, 0xda, 0x08, 0x6c, 0x08, 0x8b, 0x44, 0x63, 0x27, 0xc6, 0x09, 0xa1, 0x5e, 0x7b, 0x45, - 0x48, 0xed, 0x18, 0xb2, 0x58, 0x46, 0x5e, 0x2c, 0xe3, 0xa1, 0x2a, 0xa6, 0x05, 0x15, 0xf7, 0x76, - 0x85, 0xbb, 0xcc, 0x87, 0xbf, 0xfe, 0xa9, 0xd7, 0xec, 0xdb, 0xb9, 0xf7, 0x44, 0x38, 0x35, 0x02, - 0x36, 0x27, 0xd1, 0x90, 0x46, 0x5e, 0x45, 0x68, 0xf5, 0x26, 0xa1, 0xd7, 0x94, 0xd0, 0x5d, 0x29, - 0xb4, 0x48, 0x20, 0x95, 0x36, 0x0a, 0xb7, 0x92, 0xc2, 0x60, 0x23, 0x44, 0x33, 0xc7, 0x0d, 0xa8, - 0x7b, 0xe6, 0x78, 0x09, 0x19, 0xf1, 0xf6, 0xff, 0x5e, 0x72, 0x4b, 0x0b, 0xf9, 0x52, 0x68, 0x3d, - 0x44, 0xb3, 0xc3, 0xcc, 0xf9, 0x30, 0xf3, 0x69, 0x5f, 0x83, 0xf5, 0x51, 0x42, 0x7f, 0xc0, 0x91, - 0xe3, 0xe3, 0xec, 0x40, 0xda, 0xb7, 0x84, 0xc8, 0xae, 0x38, 0xa2, 0xac, 0x45, 0x0c, 0xd5, 0x39, - 0xd3, 0xbe, 0x71, 0x24, 0x10, 0xd6, 0x9e, 0x52, 0xd9, 0x92, 0x2a, 0xd7, 0xd2, 0xa1, 0xdd, 0x92, - 0xb6, 0xc4, 0x66, 0xf4, 0x01, 0xe2, 0x98, 0xf1, 0x9c, 0x7e, 0xed, 0x65, 0xe9, 0xaf, 0xa5, 0x43, - 0xbb, 0x25, 0x6d, 0x45, 0x7f, 0x0c, 0x9a, 0xe2, 0xea, 0x38, 0x2c, 0xc6, 0x2e, 0x6b, 0xd7, 0xbb, - 0x2b, 0xbd, 0xe6, 0x60, 0xd3, 0x20, 0x2e, 0x1b, 0x3c, 0x30, 0x4e, 0xb2, 0xc8, 0x69, 0x8c, 0x5d, - 0x6b, 0xbb, 0x6c, 0xa1, 0x0a, 0x1c, 0xda, 0x20, 0xce, 0x21, 0x4c, 0x3b, 0x00, 0xad, 0x49, 0x3c, - 0x4e, 0x90, 0x87, 0x9d, 0x18, 0x71, 0xbf, 0xdd, 0xe8, 0xae, 0xf4, 0x1a, 0xd6, 0xdd, 0x79, 0xaa, - 0xdf, 0x51, 0xe7, 0x56, 0x89, 0x42, 0xbb, 0xa9, 0xcc, 0x13, 0xc4, 0x7d, 0xcd, 0x01, 0x3b, 0x28, - 0x08, 0xe8, 0xf7, 0xce, 0x24, 0xf6, 0x10, 0xc7, 0x0e, 0x1a, 0x71, 0x9c, 0x38, 0x78, 0x16, 0x93, - 0xe4, 0xbc, 0x0d, 0xba, 0xb5, 0x5e, 0xdd, 0x7a, 0x7d, 0x9e, 0xea, 0x5d, 0x49, 0xf4, 0x5c, 0x28, - 0xb4, 0xb7, 0x45, 0xec, 0x33, 0x11, 0x7a, 0x3f, 0x8b, 0x7c, 0x20, 0x02, 0xda, 0x77, 0x40, 0x7f, - 0x46, 0x56, 0x48, 0xd8, 0x10, 0xfb, 0x68, 0x4a, 0xe8, 0x24, 0x69, 0x37, 0x85, 0xcc, 0x9b, 0xf3, - 0x54, 0xbf, 0xff, 0x5c, 0x99, 0x6a, 0x02, 0xb4, 0xf7, 0x16, 0xc5, 0x1e, 0x55, 0xc2, 0x07, 0xab, - 0x3f, 0xfd, 0xae, 0x2f, 0xc1, 0xdf, 0x96, 0xc1, 0xed, 0x43, 0x1a, 0x31, 0x1c, 0xb1, 0x09, 0x93, - 0xb7, 0xdd, 0x02, 0x8d, 0x62, 0xe0, 0x88, 0xeb, 0x9e, 0x1d, 0xe7, 0x62, 0x4b, 0x7e, 0x9a, 0x23, - 0xac, 0x7a, 0x76, 0x9c, 0x8f, 0xb3, 0xce, 0x2b, 0xd3, 0xb4, 0x77, 0xc1, 0x6a, 0x42, 0x29, 0x57, - 0xf3, 0x00, 0x56, 0xba, 0xa1, 0x9c, 0x40, 0xd3, 0xbe, 0xf1, 0x08, 0x27, 0x67, 0x01, 0xb6, 0x29, - 0xe5, 0xd6, 0x6a, 0x46, 0x63, 0x8b, 0x2c, 0xed, 0xc7, 0x1a, 0xd8, 0x8a, 0xf0, 0x8c, 0x3b, 0xc5, - 0xa8, 0x65, 0x8e, 0x8f, 0x98, 0x2f, 0xee, 0x7c, 0xcb, 0xfa, 0x64, 0x9e, 0xea, 0xaf, 0xca, 0x1a, - 0x3c, 0x0b, 0x05, 0xff, 0x49, 0xf5, 0xb7, 0xc6, 0x84, 0xfb, 0x93, 0x61, 0x26, 0x67, 0x06, 0x24, - 0xc2, 0x66, 0x31, 0xa3, 0x03, 0x32, 0x64, 0xe6, 0xf0, 0x9c, 0x63, 0x66, 0x1c, 0xe1, 0x99, 0x95, - 0x2d, 0x6c, 0x2d, 0xa3, 0xf9, 0xbc, 0x60, 0x39, 0x42, 0xcc, 0x57, 0xe5, 0xf9, 0x79, 0x19, 0xb4, - 0xaa, 0x55, 0xd3, 0xfa, 0xa0, 0x21, 0x1b, 0xba, 0x98, 0x85, 0xd6, 0xd6, 0x3c, 0xd5, 0x37, 0xe5, - 0xdf, 0x29, 0x42, 0xd0, 0xae, 0xcb, 0xf5, 0xb1, 0xa7, 0x21, 0x50, 0xf7, 0x31, 0xf2, 0x70, 0xe2, - 0xf4, 0x55, 0x3d, 0xee, 0xdf, 0x34, 0x1f, 0x8f, 0x04, 0xde, 0xea, 0x5c, 0xa6, 0xfa, 0x9a, 0x5c, - 0xf7, 0xe7, 0xa9, 0xbe, 0x21, 0x45, 0x72, 0x32, 0x68, 0xaf, 0xc9, 0x65, 0xbf, 0x22, 0x31, 0x50, - 0x73, 0xf1, 0x3f, 0x48, 0x0c, 0x9e, 0x92, 0x18, 0x14, 0x12, 0x03, 0x55, 0x8f, 0x5f, 0x56, 0xc0, - 0x2d, 0x89, 0xd6, 0x1c, 0xb0, 0xce, 0xc8, 0x38, 0xc2, 0x9e, 0x23, 0x21, 0xaa, 0x55, 0xf6, 0x8c, - 0xbc, 0xd4, 0x86, 0x7c, 0x08, 0x4f, 0x05, 0x48, 0xc9, 0xed, 0x5d, 0xa4, 0x7a, 0xad, 0xbc, 0xfb, - 0xd7, 0x08, 0xa0, 0xdd, 0x62, 0x15, 0xac, 0xf6, 0x15, 0x58, 0x2f, 0x4e, 0xd6, 0x61, 0x38, 0x6f, - 0xa6, 0xa7, 0x04, 0x8a, 0x83, 0x3b, 0xc5, 0xdc, 0x6a, 0x97, 0xe4, 0xd7, 0x92, 0xa1, 0xdd, 0x9a, - 0x56, 0x70, 0xda, 0x37, 0x40, 0x8e, 0x7e, 0xa1, 0x2e, 0x06, 0xd7, 0xca, 0x8d, 0x83, 0xeb, 0x9e, - 0x1a, 0x5c, 0xaf, 0x54, 0x1e, 0x94, 0x22, 0x1f, 0xda, 0xeb, 0xca, 0xa1, 0x46, 0xd7, 0xb7, 0x40, - 0xcb, 0x11, 0x65, 0x83, 0xaa, 0xc7, 0xe4, 0xc5, 0x7b, 0xb8, 0x37, 0x4f, 0xf5, 0x9d, 0xeb, 0x1a, - 0x25, 0x03, 0xb4, 0xff, 0xaf, 0x9c, 0x65, 0xc3, 0xc2, 0x8f, 0x40, 0x3d, 0x7f, 0x52, 0xb5, 0x3d, - 0xd0, 0x88, 0x26, 0x21, 0x4e, 0xb2, 0x88, 0x38, 0x93, 0x55, 0xbb, 0x74, 0x68, 0x5d, 0xd0, 0xf4, - 0x70, 0x44, 0x43, 0x12, 0x89, 0xf8, 0xb2, 0x88, 0x57, 0x5d, 0xd6, 0x17, 0x4f, 0x2e, 0x3b, 0xb5, - 0x8b, 0xcb, 0x4e, 0xed, 0xaf, 0xcb, 0x4e, 0xed, 0xf1, 0x55, 0x67, 0xe9, 0xe2, 0xaa, 0xb3, 0xf4, - 0xc7, 0x55, 0x67, 0xe9, 0xcb, 0xf7, 0x16, 0x2f, 0x55, 0x30, 0x1a, 0xee, 0x33, 0xef, 0xcc, 0x9c, - 0x95, 0xdf, 0x5c, 0xfb, 0xf9, 0x47, 0xd7, 0xdb, 0xef, 0xec, 0x57, 0xbe, 0xbb, 0xc4, 0x2e, 0x87, - 0xb7, 0xc4, 0xf8, 0x78, 0xf0, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xdc, 0xe9, 0x05, 0xa3, - 0x09, 0x00, 0x00, +var fileDescriptor_049a55681d0db341 = []byte{ + // 1131 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, + 0x17, 0x6f, 0xda, 0x7c, 0xdb, 0x64, 0x92, 0x6e, 0xfb, 0x9d, 0x2d, 0xdd, 0x34, 0x64, 0xe3, 0xc8, + 0xac, 0x96, 0x0a, 0xa8, 0xad, 0x64, 0x4f, 0x5b, 0xc1, 0x01, 0x77, 0x41, 0x2d, 0xb0, 0xa2, 0x72, + 0x61, 0x91, 0x16, 0x21, 0xe3, 0xd8, 0x93, 0x64, 0xa8, 0xed, 0x31, 0x9e, 0x49, 0x48, 0xb9, 0x71, + 0x83, 0xdb, 0x1e, 0x39, 0x70, 0xe0, 0x1f, 0xe1, 0xbe, 0xc7, 0x1e, 0x39, 0x19, 0xd4, 0x4a, 0xfc, + 0x01, 0x39, 0x72, 0x42, 0x9e, 0x19, 0xff, 0x48, 0xba, 0xed, 0xaa, 0x97, 0x68, 0xe6, 0xbd, 0xcf, + 0xfb, 0x7c, 0xf2, 0xde, 0xbc, 0x79, 0x63, 0xf0, 0x2e, 0xee, 0x3b, 0xba, 0x87, 0x87, 0x23, 0xe6, + 0x78, 0x18, 0x05, 0x8c, 0xea, 0x84, 0xb2, 0xc8, 0x76, 0x48, 0xa0, 0x4f, 0xba, 0xd9, 0x5a, 0x0b, + 0x23, 0xc2, 0x08, 0x6c, 0xe1, 0xbe, 0xa3, 0x15, 0xc1, 0x5a, 0x06, 0x98, 0x74, 0x9b, 0xed, 0x2c, + 0x92, 0x9d, 0x85, 0x88, 0xea, 0x13, 0xdb, 0xc3, 0xae, 0xcd, 0x48, 0x24, 0xa2, 0x9b, 0xcd, 0x45, + 0x3f, 0x61, 0xe8, 0x3a, 0x1f, 0xff, 0x95, 0xbe, 0xbb, 0x0e, 0x09, 0x06, 0x98, 0xe8, 0x61, 0x44, + 0xc8, 0x20, 0x35, 0xb6, 0x87, 0x84, 0x0c, 0x3d, 0xa4, 0xf3, 0x5d, 0x7f, 0x3c, 0xd0, 0xdd, 0x71, + 0x64, 0x33, 0x9c, 0xfe, 0xd5, 0xa6, 0xb2, 0xe8, 0x67, 0xd8, 0x47, 0x94, 0xd9, 0x7e, 0x98, 0x02, + 0x92, 0xc4, 0x1d, 0x12, 0x21, 0x5d, 0xe4, 0x92, 0xa4, 0x2b, 0x56, 0x12, 0xf0, 0x76, 0x0e, 0x20, + 0xbe, 0x8f, 0x99, 0x9f, 0x82, 0xb2, 0x9d, 0x04, 0x6e, 0x0d, 0xc9, 0x90, 0xf0, 0xa5, 0x9e, 0xac, + 0x84, 0x55, 0xfd, 0x67, 0x0d, 0xd4, 0x0e, 0x38, 0xdf, 0x09, 0xb3, 0x19, 0x82, 0x3b, 0xa0, 0xe2, + 0x8c, 0x6c, 0x1c, 0x58, 0xd8, 0x6d, 0x94, 0x3a, 0xa5, 0xdd, 0xaa, 0xb9, 0xc6, 0xf7, 0x47, 0x2e, + 0x74, 0x40, 0x8d, 0x45, 0x63, 0xca, 0x2c, 0x0f, 0x4d, 0x90, 0xd7, 0x58, 0xee, 0x94, 0x76, 0x6b, + 0xbd, 0x87, 0xda, 0x4d, 0xc5, 0xd6, 0x3e, 0x8e, 0x6c, 0x27, 0x49, 0xd7, 0x68, 0xbe, 0x8c, 0x95, + 0xa5, 0x59, 0xac, 0xc0, 0x33, 0xdb, 0xf7, 0xf6, 0xd5, 0x02, 0x91, 0x6a, 0x02, 0xbe, 0xfb, 0x2c, + 0xd9, 0xc0, 0x01, 0xd8, 0xe0, 0x3b, 0x1c, 0x0c, 0xad, 0x10, 0x45, 0x98, 0xb8, 0x8d, 0x15, 0x2e, + 0xb4, 0xa3, 0x89, 0x52, 0x69, 0x69, 0xa9, 0xb4, 0x27, 0xb2, 0x94, 0x86, 0x2a, 0xb9, 0xb7, 0x0b, + 0xdc, 0x79, 0xbc, 0xfa, 0xeb, 0x5f, 0x4a, 0xc9, 0xbc, 0x93, 0x5a, 0x8f, 0xb9, 0x11, 0x62, 0xb0, + 0x39, 0x0e, 0xfa, 0x24, 0x70, 0x0b, 0x42, 0xe5, 0xd7, 0x09, 0xbd, 0x25, 0x85, 0xee, 0x09, 0xa1, + 0x45, 0x02, 0xa1, 0xb4, 0x91, 0x99, 0xa5, 0x14, 0x02, 0x1b, 0xbe, 0x3d, 0xb5, 0x1c, 0x8f, 0x38, + 0xa7, 0x96, 0x1b, 0xe1, 0x01, 0x6b, 0xfc, 0xef, 0x96, 0x29, 0x2d, 0xc4, 0x0b, 0xa1, 0x75, 0xdf, + 0x9e, 0x1e, 0x24, 0xc6, 0x27, 0x89, 0x0d, 0x7e, 0x03, 0xd6, 0x07, 0x11, 0xf9, 0x11, 0x05, 0xd6, + 0x08, 0x25, 0xc7, 0xd1, 0x58, 0xe5, 0x22, 0x4d, 0x7e, 0x40, 0x49, 0x83, 0x68, 0xb2, 0x6f, 0x26, + 0x5d, 0xed, 0x90, 0x23, 0x8c, 0x96, 0x54, 0xd9, 0x12, 0x2a, 0x73, 0xe1, 0xaa, 0x59, 0x17, 0x7b, + 0x81, 0x4d, 0xe8, 0x3d, 0x9b, 0x21, 0xca, 0x52, 0xfa, 0xb5, 0xdb, 0xd2, 0xcf, 0x85, 0xab, 0x66, + 0x5d, 0xec, 0x25, 0xfd, 0x11, 0xa8, 0xf1, 0x8b, 0x63, 0xd1, 0x10, 0x39, 0xb4, 0x51, 0xe9, 0xac, + 0xec, 0xd6, 0x7a, 0x9b, 0x1a, 0x76, 0x68, 0xef, 0x91, 0x76, 0x9c, 0x78, 0x4e, 0x42, 0xe4, 0x18, + 0xdb, 0x79, 0x0b, 0x15, 0xe0, 0xaa, 0x09, 0xc2, 0x14, 0x42, 0xe1, 0x3e, 0xa8, 0x8f, 0xc3, 0x61, + 0x64, 0xbb, 0xc8, 0x0a, 0x6d, 0x36, 0x6a, 0x54, 0x3b, 0x2b, 0xbb, 0x55, 0xe3, 0xde, 0x2c, 0x56, + 0xee, 0xca, 0x73, 0x2b, 0x78, 0x55, 0xb3, 0x26, 0xb7, 0xc7, 0x36, 0x1b, 0x41, 0x0b, 0xec, 0xd8, + 0x9e, 0x47, 0x7e, 0xb0, 0xc6, 0xa1, 0x6b, 0x33, 0x64, 0xd9, 0x03, 0x86, 0x22, 0x0b, 0x4d, 0x43, + 0x1c, 0x9d, 0x35, 0x40, 0xa7, 0xb4, 0x5b, 0x31, 0x1e, 0xcc, 0x62, 0xa5, 0x23, 0x88, 0xae, 0x85, + 0xaa, 0xe6, 0x36, 0xf7, 0x7d, 0xc9, 0x5d, 0x1f, 0x26, 0x9e, 0x8f, 0xb8, 0x03, 0x7e, 0x0f, 0x94, + 0x57, 0x44, 0xf9, 0x98, 0xf6, 0xd1, 0xc8, 0x9e, 0x60, 0x32, 0x8e, 0x1a, 0x35, 0x2e, 0xf3, 0xce, + 0x2c, 0x56, 0x1e, 0x5e, 0x2b, 0x53, 0x0c, 0x50, 0xcd, 0xd6, 0xa2, 0xd8, 0xd3, 0x82, 0x7b, 0xbf, + 0xfc, 0xf3, 0xef, 0xca, 0x92, 0xfa, 0xdb, 0x32, 0xb8, 0x73, 0x40, 0x02, 0x8a, 0x02, 0x3a, 0xa6, + 0xe2, 0xae, 0x1b, 0xa0, 0x9a, 0x8d, 0x1b, 0x7e, 0xd9, 0x93, 0xe3, 0x5c, 0x6c, 0xc9, 0x2f, 0x52, + 0x84, 0x51, 0x49, 0x8e, 0xf3, 0x45, 0xd2, 0x79, 0x79, 0x18, 0x7c, 0x1f, 0x94, 0x23, 0x42, 0x98, + 0x9c, 0x06, 0x6a, 0xa1, 0x1b, 0xf2, 0xf9, 0x33, 0xe9, 0x6a, 0x4f, 0x51, 0x74, 0xea, 0x21, 0x93, + 0x10, 0x66, 0x94, 0x13, 0x1a, 0x93, 0x47, 0xc1, 0x9f, 0x4a, 0x60, 0x2b, 0x40, 0x53, 0x66, 0x65, + 0x43, 0x98, 0x5a, 0x23, 0x9b, 0x8e, 0xf8, 0x9d, 0xaf, 0x1b, 0x9f, 0xcf, 0x62, 0xe5, 0x4d, 0x51, + 0x83, 0x57, 0xa1, 0xd4, 0x7f, 0x63, 0xe5, 0xbd, 0x21, 0x66, 0xa3, 0x71, 0x3f, 0x91, 0xd3, 0x3d, + 0x1c, 0xa0, 0xfc, 0x5d, 0xf0, 0x70, 0x9f, 0xea, 0xfd, 0x33, 0x86, 0xa8, 0x76, 0x88, 0xa6, 0x46, + 0xb2, 0x30, 0x61, 0x42, 0xf3, 0x2c, 0x63, 0x39, 0xb4, 0xe9, 0x48, 0x96, 0xe7, 0x97, 0x65, 0x50, + 0x2f, 0x56, 0x0d, 0x76, 0x41, 0x55, 0x34, 0x74, 0x36, 0x09, 0x8d, 0xad, 0x59, 0xac, 0x6c, 0x8a, + 0xbf, 0x93, 0xb9, 0x54, 0xb3, 0x22, 0xd6, 0x47, 0x2e, 0xb4, 0x40, 0x65, 0x84, 0x6c, 0x17, 0x45, + 0x56, 0x57, 0xd6, 0xe3, 0xc1, 0xcd, 0xd3, 0xf1, 0x90, 0xa3, 0x8d, 0xf6, 0x45, 0xac, 0xac, 0x89, + 0x75, 0x77, 0x16, 0x2b, 0x1b, 0x42, 0x22, 0xa5, 0x52, 0xcd, 0x35, 0xb1, 0xec, 0x16, 0x04, 0x7a, + 0x72, 0x2a, 0xde, 0x5a, 0xa0, 0x77, 0x45, 0xa0, 0x97, 0x09, 0xf4, 0x64, 0x2d, 0xfe, 0x28, 0x83, + 0x55, 0x81, 0x86, 0x16, 0x58, 0xa7, 0x78, 0x18, 0x20, 0xd7, 0x12, 0x10, 0xd9, 0x26, 0xad, 0x5c, + 0x45, 0x3c, 0x81, 0x27, 0x1c, 0x24, 0xe5, 0x5a, 0xe7, 0xb1, 0x52, 0xca, 0xef, 0xfd, 0x1c, 0x81, + 0x6a, 0xd6, 0x69, 0x01, 0x0b, 0xbf, 0x06, 0xeb, 0xd9, 0xa9, 0x5a, 0x14, 0xa5, 0x8d, 0x74, 0x45, + 0x20, 0x3b, 0xb4, 0x13, 0xc4, 0x8c, 0x46, 0x4e, 0x3e, 0x17, 0xac, 0x9a, 0xf5, 0x49, 0x01, 0x07, + 0x3f, 0x05, 0x55, 0xfe, 0x7a, 0x73, 0x62, 0x51, 0xb0, 0xc6, 0x15, 0xe2, 0x04, 0x90, 0x90, 0x16, + 0x4e, 0x37, 0x0b, 0x52, 0xcd, 0xca, 0x44, 0xfa, 0xe1, 0xb7, 0x40, 0xbc, 0x21, 0x3c, 0x15, 0x3e, + 0x01, 0xcb, 0xaf, 0x9d, 0x80, 0xf7, 0xe5, 0x04, 0x7c, 0xa3, 0xf0, 0x32, 0x65, 0xf1, 0xaa, 0xb9, + 0x2e, 0x0d, 0x72, 0x06, 0x7e, 0x07, 0x60, 0x8a, 0xc8, 0x3b, 0x5d, 0xbe, 0x15, 0x37, 0x17, 0xe4, + 0xfe, 0x2c, 0x56, 0x76, 0xe6, 0x35, 0x72, 0x06, 0xd5, 0xfc, 0xbf, 0x34, 0xe6, 0x9d, 0x0f, 0x9f, + 0xe7, 0xd9, 0xf0, 0x0c, 0xa9, 0x7c, 0x2e, 0xae, 0xaf, 0xcf, 0xce, 0xd5, 0x3c, 0x44, 0x64, 0x9e, + 0xc7, 0x33, 0xb1, 0xff, 0x04, 0x54, 0xd2, 0x77, 0x1f, 0xb6, 0x40, 0x35, 0x18, 0xfb, 0x28, 0x4a, + 0x54, 0x79, 0xf3, 0x94, 0xcd, 0xdc, 0x00, 0x3b, 0xa0, 0xe6, 0xa2, 0x80, 0xf8, 0x38, 0xe0, 0xfe, + 0x65, 0xee, 0x2f, 0x9a, 0x8c, 0xaf, 0x5e, 0x5e, 0xb4, 0x4b, 0xe7, 0x17, 0xed, 0xd2, 0xdf, 0x17, + 0xed, 0xd2, 0x8b, 0xcb, 0xf6, 0xd2, 0xf9, 0x65, 0x7b, 0xe9, 0xcf, 0xcb, 0xf6, 0xd2, 0xf3, 0x0f, + 0x16, 0x6f, 0xbe, 0x37, 0xe8, 0xef, 0x51, 0xf7, 0x54, 0x9f, 0xea, 0xd9, 0xc7, 0xe2, 0x5e, 0xfa, + 0xb5, 0xf8, 0xf8, 0xf1, 0xde, 0xfc, 0xa7, 0x5b, 0x7f, 0x95, 0x4f, 0xb8, 0x47, 0xff, 0x05, 0x00, + 0x00, 0xff, 0xff, 0x33, 0x00, 0x4a, 0x88, 0x5a, 0x0a, 0x00, 0x00, } func (m *ClientState) Marshal() (dAtA []byte, err error) { @@ -437,7 +455,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.UpgradePath) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.UpgradePath[iNdEx]) copy(dAtA[i:], m.UpgradePath[iNdEx]) - i = encodeVarintTendermint(dAtA, i, uint64(len(m.UpgradePath[iNdEx]))) + i = encodeVarintOstracon(dAtA, i, uint64(len(m.UpgradePath[iNdEx]))) i-- dAtA[i] = 0x4a } @@ -450,7 +468,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 @@ -462,7 +480,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a @@ -472,7 +490,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 @@ -481,7 +499,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err3 } i -= n3 - i = encodeVarintTendermint(dAtA, i, uint64(n3)) + i = encodeVarintOstracon(dAtA, i, uint64(n3)) i-- dAtA[i] = 0x2a n4, err4 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.UnbondingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingPeriod):]) @@ -489,7 +507,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err4 } i -= n4 - i = encodeVarintTendermint(dAtA, i, uint64(n4)) + i = encodeVarintOstracon(dAtA, i, uint64(n4)) i-- dAtA[i] = 0x22 n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TrustingPeriod, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.TrustingPeriod):]) @@ -497,7 +515,7 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err5 } i -= n5 - i = encodeVarintTendermint(dAtA, i, uint64(n5)) + i = encodeVarintOstracon(dAtA, i, uint64(n5)) i-- dAtA[i] = 0x1a { @@ -506,14 +524,14 @@ func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 if len(m.ChainId) > 0 { i -= len(m.ChainId) copy(dAtA[i:], m.ChainId) - i = encodeVarintTendermint(dAtA, i, uint64(len(m.ChainId))) + i = encodeVarintOstracon(dAtA, i, uint64(len(m.ChainId))) i-- dAtA[i] = 0xa } @@ -543,7 +561,7 @@ func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.NextValidatorsHash) > 0 { i -= len(m.NextValidatorsHash) copy(dAtA[i:], m.NextValidatorsHash) - i = encodeVarintTendermint(dAtA, i, uint64(len(m.NextValidatorsHash))) + i = encodeVarintOstracon(dAtA, i, uint64(len(m.NextValidatorsHash))) i-- dAtA[i] = 0x1a } @@ -553,7 +571,7 @@ func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -562,7 +580,7 @@ func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err8 } i -= n8 - i = encodeVarintTendermint(dAtA, i, uint64(n8)) + i = encodeVarintOstracon(dAtA, i, uint64(n8)) i-- dAtA[i] = 0xa return len(dAtA) - i, nil @@ -595,7 +613,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -607,7 +625,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -615,7 +633,7 @@ func (m *Misbehaviour) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.ClientId) > 0 { i -= len(m.ClientId) copy(dAtA[i:], m.ClientId) - i = encodeVarintTendermint(dAtA, i, uint64(len(m.ClientId))) + i = encodeVarintOstracon(dAtA, i, uint64(len(m.ClientId))) i-- dAtA[i] = 0xa } @@ -642,6 +660,18 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.TrustedVoters != nil { + { + size, err := m.TrustedVoters.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOstracon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } if m.TrustedValidators != nil { { size, err := m.TrustedValidators.MarshalToSizedBuffer(dAtA[:i]) @@ -649,10 +679,10 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } { size, err := m.TrustedHeight.MarshalToSizedBuffer(dAtA[:i]) @@ -660,10 +690,22 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 + if m.VoterSet != nil { + { + size, err := m.VoterSet.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOstracon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } if m.ValidatorSet != nil { { size, err := m.ValidatorSet.MarshalToSizedBuffer(dAtA[:i]) @@ -671,7 +713,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -683,7 +725,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintTendermint(dAtA, i, uint64(size)) + i = encodeVarintOstracon(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa @@ -712,20 +754,20 @@ func (m *Fraction) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Denominator != 0 { - i = encodeVarintTendermint(dAtA, i, uint64(m.Denominator)) + i = encodeVarintOstracon(dAtA, i, uint64(m.Denominator)) i-- dAtA[i] = 0x10 } if m.Numerator != 0 { - i = encodeVarintTendermint(dAtA, i, uint64(m.Numerator)) + i = encodeVarintOstracon(dAtA, i, uint64(m.Numerator)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func encodeVarintTendermint(dAtA []byte, offset int, v uint64) int { - offset -= sovTendermint(v) +func encodeVarintOstracon(dAtA []byte, offset int, v uint64) int { + offset -= sovOstracon(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -743,30 +785,30 @@ func (m *ClientState) Size() (n int) { _ = l l = len(m.ChainId) if l > 0 { - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } l = m.TrustLevel.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.TrustingPeriod) - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.UnbondingPeriod) - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxClockDrift) - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) l = m.FrozenHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) l = m.LatestHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) if len(m.ProofSpecs) > 0 { for _, e := range m.ProofSpecs { l = e.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } } if len(m.UpgradePath) > 0 { for _, s := range m.UpgradePath { l = len(s) - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } } if m.AllowUpdateAfterExpiry { @@ -785,12 +827,12 @@ func (m *ConsensusState) Size() (n int) { var l int _ = l l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) l = m.Root.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) l = len(m.NextValidatorsHash) if l > 0 { - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } return n } @@ -803,15 +845,15 @@ func (m *Misbehaviour) Size() (n int) { _ = l l = len(m.ClientId) if l > 0 { - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } if m.Header1 != nil { l = m.Header1.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } if m.Header2 != nil { l = m.Header2.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } return n } @@ -824,17 +866,25 @@ func (m *Header) Size() (n int) { _ = l if m.SignedHeader != nil { l = m.SignedHeader.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) } if m.ValidatorSet != nil { l = m.ValidatorSet.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) + } + if m.VoterSet != nil { + l = m.VoterSet.Size() + n += 1 + l + sovOstracon(uint64(l)) } l = m.TrustedHeight.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) if m.TrustedValidators != nil { l = m.TrustedValidators.Size() - n += 1 + l + sovTendermint(uint64(l)) + n += 1 + l + sovOstracon(uint64(l)) + } + if m.TrustedVoters != nil { + l = m.TrustedVoters.Size() + n += 1 + l + sovOstracon(uint64(l)) } return n } @@ -846,19 +896,19 @@ func (m *Fraction) Size() (n int) { var l int _ = l if m.Numerator != 0 { - n += 1 + sovTendermint(uint64(m.Numerator)) + n += 1 + sovOstracon(uint64(m.Numerator)) } if m.Denominator != 0 { - n += 1 + sovTendermint(uint64(m.Denominator)) + n += 1 + sovOstracon(uint64(m.Denominator)) } return n } -func sovTendermint(x uint64) (n int) { +func sovOstracon(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozTendermint(x uint64) (n int) { - return sovTendermint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozOstracon(x uint64) (n int) { + return sovOstracon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *ClientState) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -868,7 +918,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -896,7 +946,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -910,11 +960,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -928,7 +978,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -941,11 +991,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -961,7 +1011,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -974,11 +1024,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -994,7 +1044,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1007,11 +1057,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1027,7 +1077,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1040,11 +1090,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1060,7 +1110,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1073,11 +1123,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1093,7 +1143,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1106,11 +1156,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1126,7 +1176,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1139,11 +1189,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1160,7 +1210,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1174,11 +1224,11 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1192,7 +1242,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1212,7 +1262,7 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1227,12 +1277,12 @@ func (m *ClientState) Unmarshal(dAtA []byte) error { m.AllowUpdateAfterMisbehaviour = bool(v != 0) default: iNdEx = preIndex - skippy, err := skipTendermint(dAtA[iNdEx:]) + skippy, err := skipOstracon(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1254,7 +1304,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1282,7 +1332,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1295,11 +1345,11 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1315,7 +1365,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1328,11 +1378,11 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1348,7 +1398,7 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1361,11 +1411,11 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1377,12 +1427,12 @@ func (m *ConsensusState) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTendermint(dAtA[iNdEx:]) + skippy, err := skipOstracon(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1404,7 +1454,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1432,7 +1482,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1446,11 +1496,11 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1464,7 +1514,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1477,11 +1527,11 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1500,7 +1550,7 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1513,11 +1563,11 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1531,12 +1581,12 @@ func (m *Misbehaviour) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTendermint(dAtA[iNdEx:]) + skippy, err := skipOstracon(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1558,7 +1608,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1586,7 +1636,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1599,11 +1649,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1622,7 +1672,7 @@ func (m *Header) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1635,11 +1685,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1652,13 +1702,49 @@ func (m *Header) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoterSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOstracon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOstracon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOstracon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VoterSet == nil { + m.VoterSet = &types2.VoterSet{} + } + if err := m.VoterSet.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TrustedHeight", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1671,11 +1757,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1684,14 +1770,14 @@ func (m *Header) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TrustedValidators", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1704,11 +1790,11 @@ func (m *Header) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if postIndex > l { return io.ErrUnexpectedEOF @@ -1720,14 +1806,50 @@ func (m *Header) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TrustedVoters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOstracon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOstracon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOstracon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TrustedVoters == nil { + m.TrustedVoters = &types2.VoterSet{} + } + if err := m.TrustedVoters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipTendermint(dAtA[iNdEx:]) + skippy, err := skipOstracon(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1749,7 +1871,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1777,7 +1899,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { m.Numerator = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1796,7 +1918,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { m.Denominator = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowTendermint + return ErrIntOverflowOstracon } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1810,12 +1932,12 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipTendermint(dAtA[iNdEx:]) + skippy, err := skipOstracon(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTendermint + return ErrInvalidLengthOstracon } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1829,7 +1951,7 @@ func (m *Fraction) Unmarshal(dAtA []byte) error { } return nil } -func skipTendermint(dAtA []byte) (n int, err error) { +func skipOstracon(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -1837,7 +1959,7 @@ func skipTendermint(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowTendermint + return 0, ErrIntOverflowOstracon } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1854,7 +1976,7 @@ func skipTendermint(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowTendermint + return 0, ErrIntOverflowOstracon } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1870,7 +1992,7 @@ func skipTendermint(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowTendermint + return 0, ErrIntOverflowOstracon } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1883,14 +2005,14 @@ func skipTendermint(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthTendermint + return 0, ErrInvalidLengthOstracon } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTendermint + return 0, ErrUnexpectedEndOfGroupOstracon } depth-- case 5: @@ -1899,7 +2021,7 @@ func skipTendermint(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthTendermint + return 0, ErrInvalidLengthOstracon } if depth == 0 { return iNdEx, nil @@ -1909,7 +2031,7 @@ func skipTendermint(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthTendermint = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTendermint = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTendermint = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthOstracon = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOstracon = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOstracon = fmt.Errorf("proto: unexpected end of group") ) diff --git a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go b/x/ibc/light-clients/99-ostracon/types/ostracon_test.go similarity index 74% rename from x/ibc/light-clients/07-tendermint/types/tendermint_test.go rename to x/ibc/light-clients/99-ostracon/types/ostracon_test.go index eb19dc441d..a8de741484 100644 --- a/x/ibc/light-clients/07-tendermint/types/tendermint_test.go +++ b/x/ibc/light-clients/99-ostracon/types/ostracon_test.go @@ -5,24 +5,24 @@ import ( "time" ostbytes "github.com/line/ostracon/libs/bytes" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/codec" "github.com/line/lfb-sdk/simapp" sdk "github.com/line/lfb-sdk/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibctestingmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) const ( - chainID = "gaia" - chainIDRevision0 = "gaia-revision-0" - chainIDRevision1 = "gaia-revision-1" - clientID = "gaiamainnet" + chainID = "lfb" + chainIDRevision0 = "lfb-revision-0" + chainIDRevision1 = "lfb-revision-1" + clientID = "lfbmainnet" trustingPeriod time.Duration = time.Hour * 24 * 7 * 2 ubdPeriod time.Duration = time.Hour * 24 * 7 * 3 maxClockDrift time.Duration = time.Second * 10 @@ -46,8 +46,8 @@ type TendermintTestSuite struct { // TODO: deprecate usage in favor of testing package ctx sdk.Context cdc codec.Marshaler - privVal osttypes.PrivValidator - valSet *osttypes.ValidatorSet + privVal octypes.PrivValidator + valSet *octypes.ValidatorSet valsHash ostbytes.HexBytes header *ibctmtypes.Header now time.Time @@ -83,11 +83,12 @@ func (suite *TendermintTestSuite) SetupTest() { heightMinus1 := clienttypes.NewHeight(0, height.RevisionHeight-1) - val := osttypes.NewValidator(pubKey, 10) - suite.valSet = osttypes.NewValidatorSet([]*osttypes.Validator{val}) + val := ibctesting.NewTestValidator(pubKey, 10) + suite.valSet = octypes.NewValidatorSet([]*octypes.Validator{val}) suite.valsHash = suite.valSet.Hash() - suite.header = suite.chainA.CreateTMClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, []osttypes.PrivValidator{suite.privVal}) - suite.ctx = app.BaseApp.NewContext(checkTx, ostproto.Header{Height: 1, Time: suite.now}) + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) + suite.header = suite.chainA.CreateOCClientHeader(chainID, int64(height.RevisionHeight), heightMinus1, suite.now, suite.valSet, suite.valSet, voterSet, voterSet, []octypes.PrivValidator{suite.privVal}) + suite.ctx = app.BaseApp.NewContext(checkTx, ocproto.Header{Height: 1, Time: suite.now}) } func TestTendermintTestSuite(t *testing.T) { diff --git a/x/ibc/light-clients/07-tendermint/types/proposal_handle.go b/x/ibc/light-clients/99-ostracon/types/proposal_handle.go similarity index 96% rename from x/ibc/light-clients/07-tendermint/types/proposal_handle.go rename to x/ibc/light-clients/99-ostracon/types/proposal_handle.go index 233746d7d6..656a9a7063 100644 --- a/x/ibc/light-clients/07-tendermint/types/proposal_handle.go +++ b/x/ibc/light-clients/99-ostracon/types/proposal_handle.go @@ -3,7 +3,7 @@ package types import ( "time" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/codec" sdk "github.com/line/lfb-sdk/types" @@ -85,7 +85,7 @@ func (cs ClientState) unexpireClient( return newClientState, consensusState, nil } -// checkProposedHeader checks if the Tendermint header is valid for updating a client after +// checkProposedHeader checks if the Ostracon header is valid for updating a client after // a passed proposal. // It returns an error if: // - the header provided is not parseable to tendermint types @@ -96,7 +96,7 @@ func (cs ClientState) unexpireClient( // NOTE: header.ValidateBasic is called in the 02-client proposal handler. Additional checks // on the validator set and the validator set hash are done in header.ValidateBasic. func (cs ClientState) checkProposedHeader(consensusState *ConsensusState, header *Header, currentTimestamp time.Time) error { - tmSignedHeader, err := osttypes.SignedHeaderFromProto(header.SignedHeader) + tmSignedHeader, err := octypes.SignedHeaderFromProto(header.SignedHeader) if err != nil { return sdkerrors.Wrap(err, "signed header in not tendermint signed header type") } diff --git a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go b/x/ibc/light-clients/99-ostracon/types/proposal_handle_test.go similarity index 97% rename from x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go rename to x/ibc/light-clients/99-ostracon/types/proposal_handle_test.go index 7add5f973f..2c5d7843af 100644 --- a/x/ibc/light-clients/07-tendermint/types/proposal_handle_test.go +++ b/x/ibc/light-clients/99-ostracon/types/proposal_handle_test.go @@ -3,7 +3,7 @@ package types_test import ( clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -13,7 +13,7 @@ var ( // sanity checks func (suite *TendermintTestSuite) TestCheckProposedHeaderAndUpdateStateBasic() { - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA).(*types.ClientState) clientStore := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) @@ -202,7 +202,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeaderAndUpdateState() { suite.SetupTest() // reset // construct client state based on test case parameters - clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ := suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState := suite.chainA.GetClientState(clientA).(*types.ClientState) clientState.AllowUpdateAfterExpiry = tc.AllowUpdateAfterExpiry clientState.AllowUpdateAfterMisbehaviour = tc.AllowUpdateAfterMisbehaviour @@ -216,7 +216,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeaderAndUpdateState() { } // use next header for chainB to unfreeze client on chainA - unfreezeClientHeader, err := suite.chainA.ConstructUpdateTMClientHeader(suite.chainB, clientA) + unfreezeClientHeader, err := suite.chainA.ConstructUpdateOCClientHeader(suite.chainB, clientA) suite.Require().NoError(err) clientStore := suite.chainA.App.IBCKeeper.ClientKeeper.ClientStore(suite.chainA.GetContext(), clientA) @@ -234,7 +234,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeaderAndUpdateState() { // use next header for chainB to unexpire clients but with empty trusted heights // and validators. Update chainB time so header won't be expired. - unexpireClientHeader, err := suite.chainA.ConstructUpdateTMClientHeader(suite.chainB, clientA) + unexpireClientHeader, err := suite.chainA.ConstructUpdateOCClientHeader(suite.chainB, clientA) suite.Require().NoError(err) unexpireClientHeader.TrustedHeight = clienttypes.ZeroHeight() unexpireClientHeader.TrustedValidators = nil @@ -320,7 +320,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeader() { suite.Run(tc.name, func() { suite.SetupTest() // reset - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) clientState = suite.chainA.GetClientState(clientA).(*types.ClientState) clientState.AllowUpdateAfterExpiry = true clientState.AllowUpdateAfterMisbehaviour = false @@ -332,7 +332,7 @@ func (suite *TendermintTestSuite) TestCheckProposedHeader() { // use next header for chainB to unexpire clients but with empty trusted heights // and validators. - header, err = suite.chainA.ConstructUpdateTMClientHeader(suite.chainB, clientA) + header, err = suite.chainA.ConstructUpdateOCClientHeader(suite.chainB, clientA) suite.Require().NoError(err) header.TrustedHeight = clienttypes.ZeroHeight() header.TrustedValidators = nil diff --git a/x/ibc/light-clients/07-tendermint/types/store.go b/x/ibc/light-clients/99-ostracon/types/store.go similarity index 100% rename from x/ibc/light-clients/07-tendermint/types/store.go rename to x/ibc/light-clients/99-ostracon/types/store.go diff --git a/x/ibc/light-clients/07-tendermint/types/store_test.go b/x/ibc/light-clients/99-ostracon/types/store_test.go similarity index 96% rename from x/ibc/light-clients/07-tendermint/types/store_test.go rename to x/ibc/light-clients/99-ostracon/types/store_test.go index e7c6936486..ae4c474767 100644 --- a/x/ibc/light-clients/07-tendermint/types/store_test.go +++ b/x/ibc/light-clients/99-ostracon/types/store_test.go @@ -6,7 +6,7 @@ import ( host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" solomachinetypes "github.com/line/lfb-sdk/x/ibc/light-clients/06-solomachine/types" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ) @@ -81,7 +81,7 @@ func (suite *TendermintTestSuite) TestGetProcessedTime() { // coordinator increments time before creating client expectedTime := suite.chainA.CurrentHeader.Time.Add(ibctesting.TimeIncrement) - clientA, err := suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Tendermint) + clientA, err := suite.coordinator.CreateClient(suite.chainA, suite.chainB, exported.Ostracon) suite.Require().NoError(err) clientState := suite.chainA.GetClientState(clientA) @@ -96,7 +96,7 @@ func (suite *TendermintTestSuite) TestGetProcessedTime() { // coordinator increments time before updating client expectedTime = suite.chainA.CurrentHeader.Time.Add(ibctesting.TimeIncrement) - err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err = suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) clientState = suite.chainA.GetClientState(clientA) diff --git a/x/ibc/light-clients/07-tendermint/types/update.go b/x/ibc/light-clients/99-ostracon/types/update.go similarity index 83% rename from x/ibc/light-clients/07-tendermint/types/update.go rename to x/ibc/light-clients/99-ostracon/types/update.go index 1bf4ea0858..24c09fea3f 100644 --- a/x/ibc/light-clients/07-tendermint/types/update.go +++ b/x/ibc/light-clients/99-ostracon/types/update.go @@ -5,7 +5,7 @@ import ( "time" "github.com/line/ostracon/light" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/lfb-sdk/codec" sdk "github.com/line/lfb-sdk/types" @@ -19,7 +19,7 @@ import ( // create the consensus state for the header.Height // and update the client state if the header height is greater than the latest client state height // It returns an error if: -// - the client or header provided are not parseable to tendermint types +// - the client or header provided are not parseable to ostracon types // - the header is invalid // - header height is less than or equal to the trusted header height // - header revision is not equal to trusted header revision @@ -35,8 +35,8 @@ import ( // the new latest height // UpdateClient must only be used to update within a single revision, thus header revision number and trusted height's revision // number must be the same. To update to a new revision, use a separate upgrade path -// Tendermint client validity checking uses the bisection algorithm described -// in the [Tendermint spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md). +// Ostracon client validity checking uses the bisection algorithm described +// in the [Ostracon spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md). func (cs ClientState) CheckHeaderAndUpdateState( ctx sdk.Context, cdc codec.BinaryMarshaler, clientStore sdk.KVStore, header exported.Header, @@ -66,14 +66,14 @@ func (cs ClientState) CheckHeaderAndUpdateState( // checkTrustedHeader checks that consensus state matches trusted fields of Header func checkTrustedHeader(header *Header, consState *ConsensusState) error { - tmTrustedValidators, err := osttypes.ValidatorSetFromProto(header.TrustedValidators) + ocTrustedValidators, err := octypes.ValidatorSetFromProto(header.TrustedValidators) if err != nil { - return sdkerrors.Wrap(err, "trusted validator set in not tendermint validator set type") + return sdkerrors.Wrap(err, "trusted validator set in not ostracon validator set type") } // assert that trustedVals is NextValidators of last trusted header // to do this, we check that trustedVals.Hash() == consState.NextValidatorsHash - tvalHash := tmTrustedValidators.Hash() + tvalHash := ocTrustedValidators.Hash() if !bytes.Equal(consState.NextValidatorsHash, tvalHash) { return sdkerrors.Wrapf( ErrInvalidValidatorSet, @@ -84,7 +84,7 @@ func checkTrustedHeader(header *Header, consState *ConsensusState) error { return nil } -// checkValidity checks if the Tendermint header is valid. +// checkValidity checks if the Ostracon header is valid. // CONTRACT: consState.Height == header.TrustedHeight func checkValidity( clientState *ClientState, consState *ConsensusState, @@ -104,19 +104,19 @@ func checkValidity( ) } - tmTrustedValidators, err := osttypes.ValidatorSetFromProto(header.TrustedValidators) + ocTrustedVoters, err := octypes.VoterSetFromProto(header.TrustedVoters) if err != nil { - return sdkerrors.Wrap(err, "trusted validator set in not tendermint validator set type") + return sdkerrors.Wrap(err, "trusted validator set in not ostracon validator set type") } - tmSignedHeader, err := osttypes.SignedHeaderFromProto(header.SignedHeader) + ocSignedHeader, err := octypes.SignedHeaderFromProto(header.SignedHeader) if err != nil { - return sdkerrors.Wrap(err, "signed header in not tendermint signed header type") + return sdkerrors.Wrap(err, "signed header in not ostracon signed header type") } - tmValidatorSet, err := osttypes.ValidatorSetFromProto(header.ValidatorSet) + ocVoterSet, err := octypes.VoterSetFromProto(header.VoterSet) if err != nil { - return sdkerrors.Wrap(err, "validator set in not tendermint validator set type") + return sdkerrors.Wrap(err, "voter set in not ostracon voter set type") } // assert header height is newer than consensus state @@ -140,13 +140,13 @@ func checkValidity( // Construct a trusted header using the fields in consensus state // Only Height, Time, and NextValidatorsHash are necessary for verification - trustedHeader := osttypes.Header{ + trustedHeader := octypes.Header{ ChainID: chainID, Height: int64(header.TrustedHeight.RevisionHeight), Time: consState.Timestamp, NextValidatorsHash: consState.NextValidatorsHash, } - signedHeader := osttypes.SignedHeader{ + signedHeader := octypes.SignedHeader{ Header: &trustedHeader, } @@ -155,10 +155,10 @@ func checkValidity( // - assert header timestamp is not past the trusting period // - assert header timestamp is past latest stored consensus state timestamp // - assert that a TrustLevel proportion of TrustedValidators signed new Commit - err = light.Verify( + err = light.VerifyWithVoterSet( &signedHeader, - tmTrustedValidators, tmSignedHeader, tmValidatorSet, - clientState.TrustingPeriod, currentTimestamp, clientState.MaxClockDrift, clientState.TrustLevel.ToTendermint(), + ocTrustedVoters, ocSignedHeader, ocVoterSet, + clientState.TrustingPeriod, currentTimestamp, clientState.MaxClockDrift, clientState.TrustLevel.ToOstracon(), ) if err != nil { return sdkerrors.Wrap(err, "failed to verify header") @@ -178,7 +178,7 @@ func update(ctx sdk.Context, clientStore sdk.KVStore, clientState *ClientState, NextValidatorsHash: header.Header.NextValidatorsHash, } - // set context time as processed time as this is state internal to tendermint client logic. + // set context time as processed time as this is state internal to ostracon client logic. // client state and consensus state will be set by client keeper SetProcessedTime(clientStore, header.GetHeight(), uint64(ctx.BlockTime().UnixNano())) diff --git a/x/ibc/light-clients/07-tendermint/types/update_test.go b/x/ibc/light-clients/99-ostracon/types/update_test.go similarity index 82% rename from x/ibc/light-clients/07-tendermint/types/update_test.go rename to x/ibc/light-clients/99-ostracon/types/update_test.go index af0ca5a45e..4f0b1b918b 100644 --- a/x/ibc/light-clients/07-tendermint/types/update_test.go +++ b/x/ibc/light-clients/99-ostracon/types/update_test.go @@ -3,11 +3,11 @@ package types_test import ( "time" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" - types "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + types "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" ibctestingmock "github.com/line/lfb-sdk/x/ibc/testing/mock" ) @@ -34,20 +34,24 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { heightMinus3 := clienttypes.NewHeight(height.RevisionNumber, height.RevisionHeight-3) heightPlus5 := clienttypes.NewHeight(height.RevisionNumber, height.RevisionHeight+5) - altVal := osttypes.NewValidator(altPubKey, revisionHeight) + altVal := ibctesting.NewTestValidator(altPubKey, revisionHeight) // Create bothValSet with both suite validator and altVal. Would be valid update - bothValSet := osttypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) + bothValSet := octypes.NewValidatorSet(append(suite.valSet.Validators, altVal)) // Create alternative validator set with only altVal, invalid update (too much change in valSet) - altValSet := osttypes.NewValidatorSet([]*osttypes.Validator{altVal}) + altValSet := octypes.NewValidatorSet([]*octypes.Validator{altVal}) - signers := []osttypes.PrivValidator{suite.privVal} + signers := []octypes.PrivValidator{suite.privVal} + + voterSet := octypes.WrapValidatorsToVoterSet(suite.valSet.Validators) + bothVoterSet := octypes.WrapValidatorsToVoterSet(bothValSet.Validators) + altVoterSet := octypes.WrapValidatorsToVoterSet(altValSet.Validators) // Create signer array and ensure it is in same order as bothValSet _, suiteVal := suite.valSet.GetByIndex(0) bothSigners := ibctesting.CreateSortedSignerArray(altPrivVal, suite.privVal, altVal, suiteVal) - altSigners := []osttypes.PrivValidator{altPrivVal} + altSigners := []octypes.PrivValidator{altPrivVal} testCases := []struct { name string @@ -59,7 +63,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) currentTime = suite.now }, expPass: true, @@ -69,7 +73,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothVoterSet, voterSet, bothSigners) currentTime = suite.now }, expPass: true, @@ -79,7 +83,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners) currentTime = suite.now }, expPass: true, @@ -90,7 +94,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) consStateHeight = heightMinus3 - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightMinus1.RevisionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothSigners) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightMinus1.RevisionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothVoterSet, voterSet, bothSigners) currentTime = suite.now }, expPass: true, @@ -100,7 +104,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainIDRevision1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainIDRevision0, int64(height.RevisionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothSigners) + newHeader = suite.chainA.CreateOCClientHeader(chainIDRevision0, int64(height.RevisionHeight), heightMinus3, suite.headerTime, bothValSet, suite.valSet, bothVoterSet, voterSet, bothSigners) currentTime = suite.now }, expPass: true, @@ -110,7 +114,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader("ethermint", int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader("ethermint", int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) currentTime = suite.now }, expPass: false, @@ -120,7 +124,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainIDRevision0, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainIDRevision1, 1, height, suite.headerTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainIDRevision1, 1, height, suite.headerTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) currentTime = suite.now }, expPass: false, @@ -130,7 +134,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainIDRevision1, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(1, 1), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainIDRevision1, 3, height, suite.headerTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainIDRevision1, 3, height, suite.headerTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) currentTime = suite.now }, expPass: false, @@ -140,7 +144,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothSigners) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, bothValSet, suite.valSet, bothVoterSet, voterSet, bothSigners) currentTime = suite.now }, expPass: false, @@ -150,7 +154,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), bothValSet.Hash()) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, bothValSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, bothValSet, voterSet, bothVoterSet, signers) currentTime = suite.now }, expPass: false, @@ -160,7 +164,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, altValSet, suite.valSet, altSigners) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, altValSet, suite.valSet, altVoterSet, voterSet, altSigners) currentTime = suite.now }, expPass: false, @@ -170,7 +174,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, bothValSet, bothValSet, bothSigners) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus5.RevisionHeight), height, suite.headerTime, bothValSet, bothValSet, bothVoterSet, bothVoterSet, bothSigners) currentTime = suite.now }, expPass: false, @@ -180,7 +184,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) // make current time pass trusting period from last timestamp on clientstate currentTime = suite.now.Add(trustingPeriod) }, @@ -191,7 +195,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.now.Add(time.Minute), suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.now.Add(time.Minute), suite.valSet, suite.valSet, voterSet, voterSet, signers) currentTime = suite.now }, expPass: false, @@ -201,7 +205,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.clientTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.clientTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) currentTime = suite.now }, expPass: false, @@ -211,7 +215,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { setup: func() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, height, commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightPlus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) // cause new header to fail validatebasic by changing commit height to mismatch header height newHeader.SignedHeader.Commit.Height = revisionHeight - 1 currentTime = suite.now @@ -224,7 +228,7 @@ func (suite *TendermintTestSuite) TestCheckHeaderAndUpdateState() { clientState = types.NewClientState(chainID, types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, clienttypes.NewHeight(height.RevisionNumber, heightPlus5.RevisionHeight), commitmenttypes.GetSDKSpecs(), upgradePath, false, false) consensusState = types.NewConsensusState(suite.clientTime, commitmenttypes.NewMerkleRoot(suite.header.Header.GetAppHash()), suite.valsHash) // Make new header at height less than latest client state - newHeader = suite.chainA.CreateTMClientHeader(chainID, int64(heightMinus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, signers) + newHeader = suite.chainA.CreateOCClientHeader(chainID, int64(heightMinus1.RevisionHeight), height, suite.headerTime, suite.valSet, suite.valSet, voterSet, voterSet, signers) currentTime = suite.now }, expPass: false, diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade.go b/x/ibc/light-clients/99-ostracon/types/upgrade.go similarity index 95% rename from x/ibc/light-clients/07-tendermint/types/upgrade.go rename to x/ibc/light-clients/99-ostracon/types/upgrade.go index 8110236d13..0420388940 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade.go +++ b/x/ibc/light-clients/99-ostracon/types/upgrade.go @@ -14,14 +14,14 @@ import ( // VerifyUpgradeAndUpdateState checks if the upgraded client has been committed by the current client // It will zero out all client-specific fields (e.g. TrustingPeriod and verify all data -// in client state that must be the same across all valid Tendermint clients for the new chain. +// in client state that must be the same across all valid Ostracon clients for the new chain. // VerifyUpgrade will return an error if: -// - the upgradedClient is not a Tendermint ClientState +// - the upgradedClient is not a Ostracon ClientState // - the lastest height of the client state does not have the same revision number or has a greater // height than the committed client. // - the height of upgraded client is not greater than that of current client // - the latest height of the new client does not match or is greater than the height in committed client -// - any Tendermint chain specified parameter in upgraded client such as ChainID, UnbondingPeriod, +// - any Ostracon chain specified parameter in upgraded client such as ChainID, UnbondingPeriod, // and ProofSpecs do not match parameters set by committed client func (cs ClientState) VerifyUpgradeAndUpdateState( ctx sdk.Context, cdc codec.BinaryMarshaler, clientStore sdk.KVStore, @@ -45,12 +45,12 @@ func (cs ClientState) VerifyUpgradeAndUpdateState( // counterparty must also commit to the upgraded consensus state at a sub-path under the upgrade path specified tmUpgradeClient, ok := upgradedClient.(*ClientState) if !ok { - return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidClientType, "upgraded client must be Tendermint client. expected: %T got: %T", + return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidClientType, "upgraded client must be Ostracon client. expected: %T got: %T", &ClientState{}, upgradedClient) } tmUpgradeConsState, ok := upgradedConsState.(*ConsensusState) if !ok { - return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "upgraded consensus state must be Tendermint consensus state. expected %T, got: %T", + return nil, nil, sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "upgraded consensus state must be Ostracon consensus state. expected %T, got: %T", &ConsensusState{}, upgradedConsState) } diff --git a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go b/x/ibc/light-clients/99-ostracon/types/upgrade_test.go similarity index 97% rename from x/ibc/light-clients/07-tendermint/types/upgrade_test.go rename to x/ibc/light-clients/99-ostracon/types/upgrade_test.go index f3a8031b06..f39cd32e25 100644 --- a/x/ibc/light-clients/07-tendermint/types/upgrade_test.go +++ b/x/ibc/light-clients/99-ostracon/types/upgrade_test.go @@ -4,7 +4,7 @@ import ( clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" "github.com/line/lfb-sdk/x/ibc/core/exported" - "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" upgradetypes "github.com/line/lfb-sdk/x/upgrade/types" ) @@ -41,7 +41,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -71,7 +71,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -102,7 +102,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -133,7 +133,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { upgradedClient = types.NewClientState("wrongchainID", types.DefaultTrustLevel, trustingPeriod, ubdPeriod, maxClockDrift, newClientHeight, commitmenttypes.GetSDKSpecs(), upgradePath, true, true) suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -161,7 +161,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { upgradedClient = types.NewClientState("newChainId", types.DefaultTrustLevel, ubdPeriod, ubdPeriod+trustingPeriod, maxClockDrift+5, lastHeight, commitmenttypes.GetSDKSpecs(), upgradePath, true, false) suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -196,7 +196,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -306,7 +306,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -340,7 +340,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -369,7 +369,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -395,7 +395,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) // expire chainB's client @@ -427,7 +427,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -458,7 +458,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // commit upgrade store changes and update clients suite.coordinator.CommitBlock(suite.chainB) - err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Tendermint) + err := suite.coordinator.UpdateClient(suite.chainA, suite.chainB, clientA, exported.Ostracon) suite.Require().NoError(err) cs, found := suite.chainA.App.IBCKeeper.ClientKeeper.GetClientState(suite.chainA.GetContext(), clientA) @@ -477,7 +477,7 @@ func (suite *TendermintTestSuite) TestVerifyUpgrade() { // reset suite suite.SetupTest() - clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Tendermint) + clientA, _ = suite.coordinator.SetupClients(suite.chainA, suite.chainB, exported.Ostracon) tc.setup() diff --git a/x/ibc/spec/README.md b/x/ibc/spec/README.md index eb626c82ca..92e1676092 100644 --- a/x/ibc/spec/README.md +++ b/x/ibc/spec/README.md @@ -25,7 +25,7 @@ For the general specification please refer to the [Interchain Standards](https:/ 3.1 [Solo Machine Client](./../light-clients/06-solomachine/spec/README.md) - 3.2 [Tendermint Client](./../light-clients/07-tendermint/spec/README.md) + 3.2 [Tendermint Client](./../light-clients/99-ostracon/spec/README.md) 3.3 [Localhost Client](./../light-clients/09-localhost/spec/README.md) @@ -46,7 +46,7 @@ in the SDK's `x/ibc` module: * [ICS 004 - Channel and Packet Semantics](https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics): Implemented in [`x/ibc/core/04-channel`](github.com/line/lfb-sdk/tree/main/x/ibc/core/04-channel) * [ICS 005 - Port Allocation](https://github.com/cosmos/ics/blob/master/spec/core/ics-005-port-allocation): Implemented in [`x/ibc/core/05-port`](github.com/line/lfb-sdk/tree/main/x/ibc/core/05-port) * [ICS 006 - Solo Machine Client](https://github.com/cosmos/ics/blob/master/spec/client/ics-006-solo-machine-client): Implemented in [`x/ibc/light-clients/06-solomachine`](https://github.com/line/lfb-sdk/tree/main/x/ibc/light-clients/06-solomachine) -* [ICS 007 - Tendermint Client](https://github.com/cosmos/ics/blob/master/spec/client/ics-007-tendermint-client): Implemented in [`x/ibc/light-clients/07-tendermint`](https://github.com/line/lfb-sdk/tree/main/x/ibc/light-clients/07-tendermint) +* [ICS 007 - Tendermint Client](https://github.com/cosmos/ics/blob/master/spec/client/ics-099-ostracon-client): Implemented in [`x/ibc/light-clients/99-ostracon`](https://github.com/line/lfb-sdk/tree/main/x/ibc/light-clients/99-ostracon) * [ICS 009 - Loopback Client](https://github.com/cosmos/ibc/tree/master/spec/client/ics-009-loopback-client): Implemented in [`x/ibc/light-clients/09-localhost`](https://github.com/line/lfb-sdk/tree/main/x/ibc/light-clients/09-localhost) * [ICS 018- Relayer Algorithms](https://github.com/cosmos/ibc/tree/master/spec/relayer/ics-018-relayer-algorithms): Not implemented yet. * [ICS 020 - Fungible Token Transfer](https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer): Implemented in [`x/ibc/applications/transfer`](https://github.com/line/lfb-sdk/tree/main/x/ibc/applications/transfer) @@ -90,7 +90,7 @@ x/ibc │ └── module.go ├── light-clients/ │   ├── 06-solomachine/ -│   ├── 07-tendermint/ +│   ├── 99-ostracon/ │   └── 09-localhost/ └── testing/ ``` diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 397f12a1f1..6b04c2c292 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -8,10 +8,11 @@ import ( "time" abci "github.com/line/ostracon/abci/types" + "github.com/line/ostracon/crypto" "github.com/line/ostracon/crypto/tmhash" - ostproto "github.com/line/ostracon/proto/ostracon/types" - ostprotoversion "github.com/line/ostracon/proto/ostracon/version" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + ocprotoversion "github.com/line/ostracon/proto/ostracon/version" + octypes "github.com/line/ostracon/types" tmversion "github.com/line/ostracon/version" "github.com/stretchr/testify/require" @@ -33,7 +34,7 @@ import ( host "github.com/line/lfb-sdk/x/ibc/core/24-host" "github.com/line/lfb-sdk/x/ibc/core/exported" "github.com/line/lfb-sdk/x/ibc/core/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" "github.com/line/lfb-sdk/x/ibc/testing/mock" "github.com/line/lfb-sdk/x/staking/teststaking" stakingtypes "github.com/line/lfb-sdk/x/staking/types" @@ -87,13 +88,15 @@ type TestChain struct { App *simapp.SimApp ChainID string LastHeader *ibctmtypes.Header // header for last block height committed - CurrentHeader ostproto.Header // header for current block height + CurrentHeader ocproto.Header // header for current block height QueryServer types.QueryServer TxConfig client.TxConfig Codec codec.BinaryMarshaler - Vals *osttypes.ValidatorSet - Signers []osttypes.PrivValidator + Vals *octypes.ValidatorSet + Voters *octypes.VoterSet + + Signers []octypes.PrivValidator senderPrivKey cryptotypes.PrivKey SenderAccount authtypes.AccountI @@ -103,6 +106,12 @@ type TestChain struct { Connections []*TestConnection // track connectionID's created for this chain } +func NewTestValidator(pubkey crypto.PubKey, stakingPower int64) *octypes.Validator { + val := octypes.NewValidator(pubkey, stakingPower) + val.VotingPower = val.StakingPower + return val +} + // NewTestChain initializes a new TestChain instance with a single validator set using a // generated private key. It also creates a sender account to be used for delivering transactions. // @@ -118,9 +127,9 @@ func NewTestChain(t *testing.T, chainID string) *TestChain { require.NoError(t, err) // create validator set with single validator - validator := osttypes.NewValidator(pubKey, 1) - valSet := osttypes.NewValidatorSet([]*osttypes.Validator{validator}) - signers := []osttypes.PrivValidator{privVal} + validator := NewTestValidator(pubKey, 1) + valSet := octypes.NewValidatorSet([]*octypes.Validator{validator}) + signers := []octypes.PrivValidator{privVal} // generate genesis account senderPrivKey := secp256k1.GenPrivKey() @@ -134,7 +143,7 @@ func NewTestChain(t *testing.T, chainID string) *TestChain { app := simapp.SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance) // create current header and call begin block - header := ostproto.Header{ + header := ocproto.Header{ ChainID: chainID, Height: 1, Time: globalStartTime, @@ -152,6 +161,7 @@ func NewTestChain(t *testing.T, chainID string) *TestChain { TxConfig: txConfig, Codec: app.AppCodec(), Vals: valSet, + Voters: octypes.WrapValidatorsToVoterSet(valSet.Validators), Signers: signers, senderPrivKey: senderPrivKey, SenderAccount: acc, @@ -192,7 +202,7 @@ func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) { revision := clienttypes.ParseChainID(chain.ChainID) // proof height + 1 is returned as the proof created corresponds to the height the proof - // was created in the IAVL tree. Tendermint and subsequently the clients that rely on it + // was created in the IAVL tree. Ostracon and subsequently the clients that rely on it // have heights 1 above the IAVL tree. Thus we return proof height + 1 return proof, clienttypes.NewHeight(revision, uint64(res.Height)+1) } @@ -216,7 +226,7 @@ func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, cl revision := clienttypes.ParseChainID(chain.ChainID) // proof height + 1 is returned as the proof created corresponds to the height the proof - // was created in the IAVL tree. Tendermint and subsequently the clients that rely on it + // was created in the IAVL tree. Ostracon and subsequently the clients that rely on it // have heights 1 above the IAVL tree. Thus we return proof height + 1 return proof, clienttypes.NewHeight(revision, uint64(res.Height+1)) } @@ -253,10 +263,10 @@ func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clien func (chain *TestChain) NextBlock() { // set the last header to the current header // use nil trusted fields - chain.LastHeader = chain.CurrentTMClientHeader() + chain.LastHeader = chain.CurrentOCClientHeader() // increment the current header - chain.CurrentHeader = ostproto.Header{ + chain.CurrentHeader = ocproto.Header{ ChainID: chain.ChainID, Height: chain.App.LastBlockHeight() + 1, AppHash: chain.App.LastCommitID().Hash, @@ -329,7 +339,7 @@ func (chain *TestChain) GetConsensusState(clientID string, height exported.Heigh // GetValsAtHeight will return the validator set of the chain at a given height. It will return // a success boolean depending on if the validator set exists or not at that height. -func (chain *TestChain) GetValsAtHeight(height int64) (*osttypes.ValidatorSet, bool) { +func (chain *TestChain) GetValsAtHeight(height int64) (*octypes.ValidatorSet, bool) { histInfo, ok := chain.App.StakingKeeper.GetHistoricalInfo(chain.GetContext(), height) if !ok { return nil, false @@ -337,11 +347,32 @@ func (chain *TestChain) GetValsAtHeight(height int64) (*osttypes.ValidatorSet, b valSet := stakingtypes.Validators(histInfo.Valset) - tmValidators, err := teststaking.ToTmValidators(valSet) + ocValidators, err := teststaking.ToOcValidators(valSet) if err != nil { panic(err) } - return osttypes.NewValidatorSet(tmValidators), true + + return octypes.NewValidatorSet(ocValidators), true +} + +func (chain *TestChain) GetVotersAtHeight(height int64) (*octypes.VoterSet, bool) { + histInfo, ok := chain.App.StakingKeeper.GetHistoricalInfo(chain.GetContext(), height) + if !ok { + return nil, false + } + + // Voters of test chain is always same to validator set + voters := stakingtypes.Validators(histInfo.Valset) + ocVoters, err := teststaking.ToOcValidators(voters) + if err != nil { + panic(err) + } + // Validators saved in HistoricalInfo store have no voting power. + // We set voting power same as staking power for test. + for i := 0; i < len(ocVoters); i++ { + ocVoters[i].VotingPower = ocVoters[i].StakingPower + } + return octypes.WrapValidatorsToVoterSet(ocVoters), true } // GetConnection retrieves an IBC Connection for the provided TestConnection. The @@ -444,7 +475,7 @@ func (chain *TestChain) NextTestChannel(conn *TestConnection, portID string) Tes } } -// ConstructMsgCreateClient constructs a message to create a new client state (tendermint or solomachine). +// ConstructMsgCreateClient constructs a message to create a new client state (ostracon or solomachine). // NOTE: a solo machine client will be created with an empty diversifier. func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, clientID string, clientType string) *clienttypes.MsgCreateClient { var ( @@ -453,7 +484,7 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client ) switch clientType { - case exported.Tendermint: + case exported.Ostracon: height := counterparty.LastHeader.GetHeight().(clienttypes.Height) clientState = ibctmtypes.NewClientState( counterparty.ChainID, DefaultTrustLevel, TrustingPeriod, UnbondingPeriod, MaxClockDrift, @@ -475,19 +506,19 @@ func (chain *TestChain) ConstructMsgCreateClient(counterparty *TestChain, client return msg } -// CreateTMClient will construct and execute a 07-tendermint MsgCreateClient. A counterparty +// CreateOCClient will construct and execute a 99-ostracon MsgCreateClient. A counterparty // client will be created on the (target) chain. -func (chain *TestChain) CreateTMClient(counterparty *TestChain, clientID string) error { +func (chain *TestChain) CreateOCClient(counterparty *TestChain, clientID string) error { // construct MsgCreateClient using counterparty - msg := chain.ConstructMsgCreateClient(counterparty, clientID, exported.Tendermint) + msg := chain.ConstructMsgCreateClient(counterparty, clientID, exported.Ostracon) return chain.sendMsgs(msg) } -// UpdateTMClient will construct and execute a 07-tendermint MsgUpdateClient. The counterparty -// client will be updated on the (target) chain. UpdateTMClient mocks the relayer flow -// necessary for updating a Tendermint client. -func (chain *TestChain) UpdateTMClient(counterparty *TestChain, clientID string) error { - header, err := chain.ConstructUpdateTMClientHeader(counterparty, clientID) +// UpdateOCClient will construct and execute a 99-ostracon MsgUpdateClient. The counterparty +// client will be updated on the (target) chain. UpdateOCClient mocks the relayer flow +// necessary for updating a Ostracon client. +func (chain *TestChain) UpdateOCClient(counterparty *TestChain, clientID string) error { + header, err := chain.ConstructUpdateOCClientHeader(counterparty, clientID) require.NoError(chain.t, err) msg, err := clienttypes.NewMsgUpdateClient( @@ -499,41 +530,54 @@ func (chain *TestChain) UpdateTMClient(counterparty *TestChain, clientID string) return chain.sendMsgs(msg) } -// ConstructUpdateTMClientHeader will construct a valid 07-tendermint Header to update the +// ConstructUpdateOCClientHeader will construct a valid 99-ostracon Header to update the // light client on the source chain. -func (chain *TestChain) ConstructUpdateTMClientHeader(counterparty *TestChain, clientID string) (*ibctmtypes.Header, error) { +func (chain *TestChain) ConstructUpdateOCClientHeader(counterparty *TestChain, clientID string) (*ibctmtypes.Header, error) { header := counterparty.LastHeader // Relayer must query for LatestHeight on client to get TrustedHeight trustedHeight := chain.GetClientState(clientID).GetLatestHeight().(clienttypes.Height) var ( - tmTrustedVals *osttypes.ValidatorSet - ok bool + ocTrustedVals *octypes.ValidatorSet + ocTrustedVoters *octypes.VoterSet + ok bool ) // Once we get TrustedHeight from client, we must query the validators from the counterparty chain // If the LatestHeight == LastHeader.Height, then TrustedValidators are current validators // If LatestHeight < LastHeader.Height, we can query the historical validator set from HistoricalInfo if trustedHeight == counterparty.LastHeader.GetHeight() { - tmTrustedVals = counterparty.Vals + ocTrustedVals = counterparty.Vals + ocTrustedVoters = counterparty.Voters } else { // NOTE: We need to get validators from counterparty at height: trustedHeight+1 // since the last trusted validators for a header at height h // is the NextValidators at h+1 committed to in header h by // NextValidatorsHash - tmTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.RevisionHeight + 1)) + ocTrustedVals, ok = counterparty.GetValsAtHeight(int64(trustedHeight.RevisionHeight + 1)) if !ok { return nil, sdkerrors.Wrapf(ibctmtypes.ErrInvalidHeaderHeight, "could not retrieve trusted validators at trustedHeight: %d", trustedHeight) } + + ocTrustedVoters, ok = counterparty.GetVotersAtHeight(int64(trustedHeight.RevisionHeight + 1)) + if !ok { + return nil, sdkerrors.Wrapf(ibctmtypes.ErrInvalidHeaderHeight, "could not retrieve trusted voters at trustedHeight: %d", trustedHeight) + } } + // inject trusted fields into last header // for now assume revision number is 0 header.TrustedHeight = trustedHeight - trustedVals, err := tmTrustedVals.ToProto() + trustedVals, err := ocTrustedVals.ToProto() + if err != nil { + return nil, err + } + trustedVoters, err := ocTrustedVoters.ToProto() if err != nil { return nil, err } - header.TrustedValidators = trustedVals + header.TrustedValidators = trustedVals + header.TrustedVoters = trustedVoters return header, nil } @@ -544,25 +588,29 @@ func (chain *TestChain) ExpireClient(amount time.Duration) { chain.CurrentHeader.Time = chain.CurrentHeader.Time.Add(amount) } -// CurrentTMClientHeader creates a TM header using the current header parameters +// CurrentOCClientHeader creates a OC header using the current header parameters // on the chain. The trusted fields in the header are set to nil. -func (chain *TestChain) CurrentTMClientHeader() *ibctmtypes.Header { - return chain.CreateTMClientHeader(chain.ChainID, chain.CurrentHeader.Height, clienttypes.Height{}, chain.CurrentHeader.Time, chain.Vals, nil, chain.Signers) +func (chain *TestChain) CurrentOCClientHeader() *ibctmtypes.Header { + return chain.CreateOCClientHeader(chain.ChainID, chain.CurrentHeader.Height, clienttypes.Height{}, chain.CurrentHeader.Time, chain.Vals, nil, chain.Voters, nil, chain.Signers) } -// CreateTMClientHeader creates a TM header to update the TM client. Args are passed in to allow +// CreateOCClientHeader creates a TM header to update the OC client. Args are passed in to allow // caller flexibility to use params that differ from the chain. -func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, timestamp time.Time, tmValSet, tmTrustedVals *osttypes.ValidatorSet, signers []osttypes.PrivValidator) *ibctmtypes.Header { +func (chain *TestChain) CreateOCClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, timestamp time.Time, ocValSet, ocTrustedVals *octypes.ValidatorSet, ocVoterSet, ocTrustedVoterSet *octypes.VoterSet, signers []octypes.PrivValidator) *ibctmtypes.Header { var ( - valSet *ostproto.ValidatorSet - trustedVals *ostproto.ValidatorSet + valSet *ocproto.ValidatorSet + trustedVals *ocproto.ValidatorSet + voterSet *ocproto.VoterSet + trustedVoters *ocproto.VoterSet ) - require.NotNil(chain.t, tmValSet) + require.NotNil(chain.t, ocValSet) + require.NotNil(chain.t, ocVoterSet) - vsetHash := tmValSet.Hash() + vsetHash := ocValSet.Hash() - tmHeader := osttypes.Header{ - Version: ostprotoversion.Consensus{Block: tmversion.BlockProtocol, App: 2}, + proposer := ocValSet.SelectProposer([]byte{}, blockHeight, 0) + ocHeader := octypes.Header{ + Version: ocprotoversion.Consensus{Block: tmversion.BlockProtocol, App: 2}, ChainID: chainID, Height: blockHeight, Time: timestamp, @@ -570,32 +618,45 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, LastCommitHash: chain.App.LastCommitID().Hash, DataHash: tmhash.Sum([]byte("data_hash")), ValidatorsHash: vsetHash, + VotersHash: ocVoterSet.Hash(), NextValidatorsHash: vsetHash, ConsensusHash: tmhash.Sum([]byte("consensus_hash")), AppHash: chain.CurrentHeader.AppHash, LastResultsHash: tmhash.Sum([]byte("last_results_hash")), EvidenceHash: tmhash.Sum([]byte("evidence_hash")), - ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck + ProposerAddress: proposer.Address, //nolint:staticcheck } - hhash := tmHeader.Hash() + hhash := ocHeader.Hash() blockID := MakeBlockID(hhash, 3, tmhash.Sum([]byte("part_set"))) - voteSet := osttypes.NewVoteSet(chainID, blockHeight, 1, ostproto.PrecommitType, tmValSet) + voteSet := octypes.NewVoteSet(chainID, blockHeight, 1, ocproto.PrecommitType, ocVoterSet) - commit, err := osttypes.MakeCommit(blockID, blockHeight, 1, voteSet, signers, timestamp) + commit, err := octypes.MakeCommit(blockID, blockHeight, 1, voteSet, signers, timestamp) require.NoError(chain.t, err) - signedHeader := &ostproto.SignedHeader{ - Header: tmHeader.ToProto(), + signedHeader := &ocproto.SignedHeader{ + Header: ocHeader.ToProto(), Commit: commit.ToProto(), } - valSet, err = tmValSet.ToProto() + valSet, err = ocValSet.ToProto() + if err != nil { + panic(err) + } + + voterSet, err = ocVoterSet.ToProto() if err != nil { panic(err) } - if tmTrustedVals != nil { - trustedVals, err = tmTrustedVals.ToProto() + if ocTrustedVals != nil { + trustedVals, err = ocTrustedVals.ToProto() + if err != nil { + panic(err) + } + } + + if ocTrustedVoterSet != nil { + trustedVoters, err = ocTrustedVoterSet.ToProto() if err != nil { panic(err) } @@ -606,16 +667,18 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, return &ibctmtypes.Header{ SignedHeader: signedHeader, ValidatorSet: valSet, + VoterSet: voterSet, TrustedHeight: trustedHeight, TrustedValidators: trustedVals, + TrustedVoters: trustedVoters, } } -// MakeBlockID copied unimported test functions from osttypes to use them here -func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) osttypes.BlockID { - return osttypes.BlockID{ +// MakeBlockID copied unimported test functions from octypes to use them here +func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) octypes.BlockID { + return octypes.BlockID{ Hash: hash, - PartSetHeader: osttypes.PartSetHeader{ + PartSetHeader: octypes.PartSetHeader{ Total: partSetSize, Hash: partSetHash, }, @@ -626,19 +689,19 @@ func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) osttypes.B // (including voting power). It returns a signer array of PrivValidators that matches the // sorting of ValidatorSet. // The sorting is first by .VotingPower (descending), with secondary index of .Address (ascending). -func CreateSortedSignerArray(altPrivVal, suitePrivVal osttypes.PrivValidator, - altVal, suiteVal *osttypes.Validator) []osttypes.PrivValidator { +func CreateSortedSignerArray(altPrivVal, suitePrivVal octypes.PrivValidator, + altVal, suiteVal *octypes.Validator) []octypes.PrivValidator { switch { case altVal.VotingPower > suiteVal.VotingPower: - return []osttypes.PrivValidator{altPrivVal, suitePrivVal} + return []octypes.PrivValidator{altPrivVal, suitePrivVal} case altVal.VotingPower < suiteVal.VotingPower: - return []osttypes.PrivValidator{suitePrivVal, altPrivVal} + return []octypes.PrivValidator{suitePrivVal, altPrivVal} default: if bytes.Compare(altVal.Address, suiteVal.Address) == -1 { - return []osttypes.PrivValidator{altPrivVal, suitePrivVal} + return []octypes.PrivValidator{altPrivVal, suitePrivVal} } - return []osttypes.PrivValidator{suitePrivVal, altPrivVal} + return []octypes.PrivValidator{suitePrivVal, altPrivVal} } } diff --git a/x/ibc/testing/chain_test.go b/x/ibc/testing/chain_test.go index aba2e1cf0e..cd0add6239 100644 --- a/x/ibc/testing/chain_test.go +++ b/x/ibc/testing/chain_test.go @@ -3,7 +3,7 @@ package ibctesting_test import ( "testing" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/require" ibctesting "github.com/line/lfb-sdk/x/ibc/testing" @@ -19,10 +19,10 @@ func TestCreateSortedSignerArray(t *testing.T) { pubKey2, err := privVal2.GetPubKey() require.NoError(t, err) - validator1 := osttypes.NewValidator(pubKey1, 1) - validator2 := osttypes.NewValidator(pubKey2, 2) + validator1 := ibctesting.NewTestValidator(pubKey1, 1) + validator2 := ibctesting.NewTestValidator(pubKey2, 2) - expected := []osttypes.PrivValidator{privVal2, privVal1} + expected := []octypes.PrivValidator{privVal2, privVal1} actual := ibctesting.CreateSortedSignerArray(privVal1, privVal2, validator1, validator2) require.Equal(t, expected, actual) @@ -36,7 +36,7 @@ func TestCreateSortedSignerArray(t *testing.T) { validator2.Address = []byte{2} validator2.VotingPower = 1 - expected = []osttypes.PrivValidator{privVal1, privVal2} + expected = []octypes.PrivValidator{privVal1, privVal2} actual = ibctesting.CreateSortedSignerArray(privVal1, privVal2, validator1, validator2) require.Equal(t, expected, actual) diff --git a/x/ibc/testing/coordinator.go b/x/ibc/testing/coordinator.go index 70860d9b80..10bef38a9f 100644 --- a/x/ibc/testing/coordinator.go +++ b/x/ibc/testing/coordinator.go @@ -49,7 +49,7 @@ func NewCoordinator(t *testing.T, n int) *Coordinator { func (coord *Coordinator) Setup( chainA, chainB *TestChain, order channeltypes.Order, ) (string, string, *TestConnection, *TestConnection, TestChannel, TestChannel) { - clientA, clientB, connA, connB := coord.SetupClientConnections(chainA, chainB, exported.Tendermint) + clientA, clientB, connA, connB := coord.SetupClientConnections(chainA, chainB, exported.Ostracon) // channels can also be referenced through the returned connections channelA, channelB := coord.CreateMockChannels(chainA, chainB, connA, connB, order) @@ -98,8 +98,8 @@ func (coord *Coordinator) CreateClient( clientID = source.NewClientID(clientType) switch clientType { - case exported.Tendermint: - err = source.CreateTMClient(counterparty, clientID) + case exported.Ostracon: + err = source.CreateOCClient(counterparty, clientID) default: err = fmt.Errorf("client type %s is not supported", clientType) @@ -123,8 +123,8 @@ func (coord *Coordinator) UpdateClient( coord.CommitBlock(source, counterparty) switch clientType { - case exported.Tendermint: - err = source.UpdateTMClient(counterparty, clientID) + case exported.Ostracon: + err = source.UpdateOCClient(counterparty, clientID) default: err = fmt.Errorf("client type %s is not supported", clientType) @@ -226,7 +226,7 @@ func (coord *Coordinator) SendPacket( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyClientID, exported.Tendermint, + counterpartyClientID, exported.Ostracon, ) } @@ -266,7 +266,7 @@ func (coord *Coordinator) WriteAcknowledgement( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyClientID, exported.Tendermint, + counterpartyClientID, exported.Ostracon, ) } @@ -352,7 +352,7 @@ func (coord *Coordinator) SendMsgs(source, counterparty *TestChain, counterparty // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyClientID, exported.Tendermint, + counterpartyClientID, exported.Ostracon, ) } @@ -412,7 +412,7 @@ func (coord *Coordinator) ConnOpenInit( // update source client on counterparty connection if err := coord.UpdateClient( counterparty, source, - counterpartyClientID, exported.Tendermint, + counterpartyClientID, exported.Ostracon, ); err != nil { return sourceConnection, counterpartyConnection, err } @@ -444,7 +444,7 @@ func (coord *Coordinator) ConnOpenInitOnBothChains( // update counterparty client on source connection if err := coord.UpdateClient( source, counterparty, - clientID, exported.Tendermint, + clientID, exported.Ostracon, ); err != nil { return sourceConnection, counterpartyConnection, err } @@ -452,7 +452,7 @@ func (coord *Coordinator) ConnOpenInitOnBothChains( // update source client on counterparty connection if err := coord.UpdateClient( counterparty, source, - counterpartyClientID, exported.Tendermint, + counterpartyClientID, exported.Ostracon, ); err != nil { return sourceConnection, counterpartyConnection, err } @@ -475,7 +475,7 @@ func (coord *Coordinator) ConnOpenTry( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, exported.Tendermint, + counterpartyConnection.ClientID, exported.Ostracon, ) } @@ -494,7 +494,7 @@ func (coord *Coordinator) ConnOpenAck( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, exported.Tendermint, + counterpartyConnection.ClientID, exported.Ostracon, ) } @@ -512,7 +512,7 @@ func (coord *Coordinator) ConnOpenConfirm( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, exported.Tendermint, + counterpartyConnection.ClientID, exported.Ostracon, ) } @@ -544,7 +544,7 @@ func (coord *Coordinator) ChanOpenInit( // update source client on counterparty connection if err := coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, exported.Tendermint, + counterpartyConnection.ClientID, exported.Ostracon, ); err != nil { return sourceChannel, counterpartyChannel, err } @@ -584,7 +584,7 @@ func (coord *Coordinator) ChanOpenInitOnBothChains( // update counterparty client on source connection if err := coord.UpdateClient( source, counterparty, - connection.ClientID, exported.Tendermint, + connection.ClientID, exported.Ostracon, ); err != nil { return sourceChannel, counterpartyChannel, err } @@ -592,7 +592,7 @@ func (coord *Coordinator) ChanOpenInitOnBothChains( // update source client on counterparty connection if err := coord.UpdateClient( counterparty, source, - counterpartyConnection.ClientID, exported.Tendermint, + counterpartyConnection.ClientID, exported.Ostracon, ); err != nil { return sourceChannel, counterpartyChannel, err } @@ -618,7 +618,7 @@ func (coord *Coordinator) ChanOpenTry( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - connection.CounterpartyClientID, exported.Tendermint, + connection.CounterpartyClientID, exported.Ostracon, ) } @@ -637,7 +637,7 @@ func (coord *Coordinator) ChanOpenAck( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - sourceChannel.CounterpartyClientID, exported.Tendermint, + sourceChannel.CounterpartyClientID, exported.Ostracon, ) } @@ -656,7 +656,7 @@ func (coord *Coordinator) ChanOpenConfirm( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - sourceChannel.CounterpartyClientID, exported.Tendermint, + sourceChannel.CounterpartyClientID, exported.Ostracon, ) } @@ -677,7 +677,7 @@ func (coord *Coordinator) ChanCloseInit( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - channel.CounterpartyClientID, exported.Tendermint, + channel.CounterpartyClientID, exported.Ostracon, ) } @@ -696,6 +696,6 @@ func (coord *Coordinator) SetChannelClosed( // update source client on counterparty connection return coord.UpdateClient( counterparty, source, - testChannel.CounterpartyClientID, exported.Tendermint, + testChannel.CounterpartyClientID, exported.Ostracon, ) } diff --git a/x/ibc/testing/mock/privval.go b/x/ibc/testing/mock/privval.go index 0ab2da55c4..eab12c5372 100644 --- a/x/ibc/testing/mock/privval.go +++ b/x/ibc/testing/mock/privval.go @@ -2,15 +2,15 @@ package mock import ( "github.com/line/ostracon/crypto" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" cryptocodec "github.com/line/lfb-sdk/crypto/codec" "github.com/line/lfb-sdk/crypto/keys/ed25519" cryptotypes "github.com/line/lfb-sdk/crypto/types" ) -var _ osttypes.PrivValidator = PV{} +var _ octypes.PrivValidator = PV{} // MockPV implements PrivValidator without any safety or persistence. // Only use it for testing. @@ -24,12 +24,12 @@ func NewPV() PV { // GetPubKey implements PrivValidator interface func (pv PV) GetPubKey() (crypto.PubKey, error) { - return cryptocodec.ToTmPubKeyInterface(pv.PrivKey.PubKey()) + return cryptocodec.ToOcPubKeyInterface(pv.PrivKey.PubKey()) } // SignVote implements PrivValidator interface -func (pv PV) SignVote(chainID string, vote *ostproto.Vote) error { - signBytes := osttypes.VoteSignBytes(chainID, vote) +func (pv PV) SignVote(chainID string, vote *ocproto.Vote) error { + signBytes := octypes.VoteSignBytes(chainID, vote) sig, err := pv.PrivKey.Sign(signBytes) if err != nil { return err @@ -39,8 +39,8 @@ func (pv PV) SignVote(chainID string, vote *ostproto.Vote) error { } // SignProposal implements PrivValidator interface -func (pv PV) SignProposal(chainID string, proposal *ostproto.Proposal) error { - signBytes := osttypes.ProposalSignBytes(chainID, proposal) +func (pv PV) SignProposal(chainID string, proposal *ocproto.Proposal) error { + signBytes := octypes.ProposalSignBytes(chainID, proposal) sig, err := pv.PrivKey.Sign(signBytes) if err != nil { return err @@ -48,3 +48,7 @@ func (pv PV) SignProposal(chainID string, proposal *ostproto.Proposal) error { proposal.Signature = sig return nil } + +func (pv PV) GenerateVRFProof(message []byte) (crypto.Proof, error) { + return nil, nil +} diff --git a/x/ibc/testing/mock/privval_test.go b/x/ibc/testing/mock/privval_test.go index a67178ac16..cb8dd36708 100644 --- a/x/ibc/testing/mock/privval_test.go +++ b/x/ibc/testing/mock/privval_test.go @@ -3,8 +3,8 @@ package mock_test import ( "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/x/ibc/testing/mock" @@ -23,10 +23,10 @@ func TestSignVote(t *testing.T) { pv := mock.NewPV() pk, _ := pv.GetPubKey() - vote := &ostproto.Vote{Height: 2} + vote := &ocproto.Vote{Height: 2} pv.SignVote(chainID, vote) - msg := osttypes.VoteSignBytes(chainID, vote) + msg := octypes.VoteSignBytes(chainID, vote) ok := pk.VerifySignature(msg, vote.Signature) require.True(t, ok) } @@ -35,10 +35,10 @@ func TestSignProposal(t *testing.T) { pv := mock.NewPV() pk, _ := pv.GetPubKey() - proposal := &ostproto.Proposal{Round: 2} + proposal := &ocproto.Proposal{Round: 2} pv.SignProposal(chainID, proposal) - msg := osttypes.ProposalSignBytes(chainID, proposal) + msg := octypes.ProposalSignBytes(chainID, proposal) ok := pk.VerifySignature(msg, proposal.Signature) require.True(t, ok) } diff --git a/x/mint/keeper/grpc_query_test.go b/x/mint/keeper/grpc_query_test.go index ef18458769..dea91f4b8e 100644 --- a/x/mint/keeper/grpc_query_test.go +++ b/x/mint/keeper/grpc_query_test.go @@ -4,7 +4,7 @@ import ( gocontext "context" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/baseapp" @@ -23,7 +23,7 @@ type MintTestSuite struct { func (suite *MintTestSuite) SetupTest() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, app.MintKeeper) diff --git a/x/mint/keeper/integration_test.go b/x/mint/keeper/integration_test.go index c500f8bd31..2d9c30fe36 100644 --- a/x/mint/keeper/integration_test.go +++ b/x/mint/keeper/integration_test.go @@ -1,7 +1,7 @@ package keeper_test import ( - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/simapp" sdk "github.com/line/lfb-sdk/types" @@ -12,7 +12,7 @@ import ( func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) app.MintKeeper.SetParams(ctx, types.DefaultParams()) app.MintKeeper.SetMinter(ctx, types.DefaultInitialMinter()) diff --git a/x/mint/module_test.go b/x/mint/module_test.go index 3ecb14454e..d0b3e09c74 100644 --- a/x/mint/module_test.go +++ b/x/mint/module_test.go @@ -4,7 +4,7 @@ import ( "testing" abcitypes "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -14,7 +14,7 @@ import ( func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.InitChain( abcitypes.RequestInitChain{ diff --git a/x/params/keeper/common_test.go b/x/params/keeper/common_test.go index 5e66750537..35697a5b55 100644 --- a/x/params/keeper/common_test.go +++ b/x/params/keeper/common_test.go @@ -2,7 +2,7 @@ package keeper_test import ( "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/line/lfb-sdk/simapp" @@ -45,6 +45,6 @@ func defaultContext(key sdk.StoreKey) sdk.Context { if err != nil { panic(err) } - ctx := sdk.NewContext(cms, ostproto.Header{}, false, log.NewNopLogger()) + ctx := sdk.NewContext(cms, ocproto.Header{}, false, log.NewNopLogger()) return ctx } diff --git a/x/params/keeper/consensus_params.go b/x/params/keeper/consensus_params.go index 59a55f5aeb..405c863959 100644 --- a/x/params/keeper/consensus_params.go +++ b/x/params/keeper/consensus_params.go @@ -2,7 +2,7 @@ package keeper import ( abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/baseapp" "github.com/line/lfb-sdk/x/params/types" @@ -19,10 +19,10 @@ func ConsensusParamsKeyTable() types.KeyTable { baseapp.ParamStoreKeyBlockParams, abci.BlockParams{}, baseapp.ValidateBlockParams, ), types.NewParamSetPair( - baseapp.ParamStoreKeyEvidenceParams, ostproto.EvidenceParams{}, baseapp.ValidateEvidenceParams, + baseapp.ParamStoreKeyEvidenceParams, ocproto.EvidenceParams{}, baseapp.ValidateEvidenceParams, ), types.NewParamSetPair( - baseapp.ParamStoreKeyValidatorParams, ostproto.ValidatorParams{}, baseapp.ValidateValidatorParams, + baseapp.ParamStoreKeyValidatorParams, ocproto.ValidatorParams{}, baseapp.ValidateValidatorParams, ), ) } diff --git a/x/params/keeper/keeper_test.go b/x/params/keeper/keeper_test.go index 5fdfca9b9c..3037153dde 100644 --- a/x/params/keeper/keeper_test.go +++ b/x/params/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" @@ -40,7 +40,7 @@ func TestKeeperTestSuite(t *testing.T) { // returns context and app func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) return app, ctx } diff --git a/x/params/proposal_handler_test.go b/x/params/proposal_handler_test.go index 37f003b000..dd7d537f7e 100644 --- a/x/params/proposal_handler_test.go +++ b/x/params/proposal_handler_test.go @@ -6,7 +6,7 @@ import ( "github.com/line/lfb-sdk/simapp" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -76,7 +76,7 @@ func newTestInput(t *testing.T) testInput { encCfg := simapp.MakeTestEncodingConfig() keeper := keeper.NewKeeper(encCfg.Marshaler, encCfg.Amino, keyParams) - ctx := sdk.NewContext(cms, ostproto.Header{}, false, log.NewNopLogger()) + ctx := sdk.NewContext(cms, ocproto.Header{}, false, log.NewNopLogger()) return testInput{ctx, cdc, keeper} } diff --git a/x/params/simulation/operations_test.go b/x/params/simulation/operations_test.go index c0999c92ae..e383593a80 100644 --- a/x/params/simulation/operations_test.go +++ b/x/params/simulation/operations_test.go @@ -5,7 +5,7 @@ import ( "math/rand" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" sdk "github.com/line/lfb-sdk/types" @@ -43,7 +43,7 @@ func TestSimulateParamChangeProposalContent(t *testing.T) { s := rand.NewSource(1) r := rand.New(s) - ctx := sdk.NewContext(nil, ostproto.Header{}, true, nil) + ctx := sdk.NewContext(nil, ocproto.Header{}, true, nil) accounts := simtypes.RandomAccounts(r, 3) paramChangePool := []simtypes.ParamChange{MockParamChange{1}, MockParamChange{2}, MockParamChange{3}} diff --git a/x/params/simulation/proposals_test.go b/x/params/simulation/proposals_test.go index 0b3228211c..b67b85c724 100644 --- a/x/params/simulation/proposals_test.go +++ b/x/params/simulation/proposals_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" simappparams "github.com/line/lfb-sdk/simapp/params" @@ -19,7 +19,7 @@ func TestProposalContents(t *testing.T) { s := rand.NewSource(1) r := rand.New(s) - ctx := sdk.NewContext(nil, ostproto.Header{}, true, nil) + ctx := sdk.NewContext(nil, ocproto.Header{}, true, nil) accounts := simtypes.RandomAccounts(r, 3) paramChangePool := []simtypes.ParamChange{MockParamChange{1}, MockParamChange{2}, MockParamChange{3}} diff --git a/x/params/types/subspace_test.go b/x/params/types/subspace_test.go index b267af0940..39f5909b8e 100644 --- a/x/params/types/subspace_test.go +++ b/x/params/types/subspace_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/suite" @@ -38,7 +38,7 @@ func (suite *SubspaceTestSuite) SetupTest() { suite.cdc = encCfg.Marshaler suite.amino = encCfg.Amino - suite.ctx = sdk.NewContext(ms, ostproto.Header{}, false, log.NewNopLogger()) + suite.ctx = sdk.NewContext(ms, ocproto.Header{}, false, log.NewNopLogger()) suite.ss = ss.WithKeyTable(paramKeyTable()) } diff --git a/x/simulation/mock_tendermint.go b/x/simulation/mock_ostracon.go similarity index 90% rename from x/simulation/mock_tendermint.go rename to x/simulation/mock_ostracon.go index 5735c7c9bd..c312f7abb9 100644 --- a/x/simulation/mock_tendermint.go +++ b/x/simulation/mock_ostracon.go @@ -10,7 +10,7 @@ import ( abci "github.com/line/ostracon/abci/types" cryptoenc "github.com/line/ostracon/crypto/encoding" ostbytes "github.com/line/ostracon/libs/bytes" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" ) type mockValidator struct { @@ -71,7 +71,7 @@ func (vals mockValidators) randomProposer(r *rand.Rand) ostbytes.HexBytes { key := keys[r.Intn(len(keys))] proposer := vals[key].val - pk, err := cryptoenc.PubKeyFromProto(proposer.PubKey) + pk, err := cryptoenc.PubKeyFromProto(&proposer.PubKey) if err != nil { //nolint:wsl panic(err) } @@ -79,7 +79,7 @@ func (vals mockValidators) randomProposer(r *rand.Rand) ostbytes.HexBytes { return pk.Address() } -// updateValidators mimics Tendermint's update logic. +// updateValidators mimics Ostracon's update logic. func updateValidators( tb testing.TB, r *rand.Rand, @@ -121,7 +121,7 @@ func updateValidators( func RandomRequestBeginBlock(r *rand.Rand, params Params, validators mockValidators, pastTimes []time.Time, pastVoteInfos [][]abci.VoteInfo, - event func(route, op, evResult string), header ostproto.Header) abci.RequestBeginBlock { + event func(route, op, evResult string), header ocproto.Header) abci.RequestBeginBlock { if len(validators) == 0 { return abci.RequestBeginBlock{ Header: header, @@ -151,15 +151,16 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, event("begin_block", "signing", "missed") } - pubkey, err := cryptoenc.PubKeyFromProto(mVal.val.PubKey) + pubkey, err := cryptoenc.PubKeyFromProto(&mVal.val.PubKey) if err != nil { panic(err) } voteInfos[i] = abci.VoteInfo{ Validator: abci.Validator{ - Address: pubkey.Address(), - Power: mVal.val.Power, + Address: pubkey.Address(), + Power: mVal.val.Power, + VotingPower: mVal.val.Power, }, SignedLastBlock: signed, } @@ -184,7 +185,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, vals := voteInfos if r.Float64() < params.PastEvidenceFraction() && header.Height > 1 { - height = int64(r.Intn(int(header.Height)-1)) + 1 // Tendermint starts at height 1 + height = int64(r.Intn(int(header.Height)-1)) + 1 // Ostracon starts at height 1 // array indices offset by one time = pastTimes[height-1] vals = pastVoteInfos[height-1] diff --git a/x/simulation/params.go b/x/simulation/params.go index 3a38f76960..da379863c7 100644 --- a/x/simulation/params.go +++ b/x/simulation/params.go @@ -6,7 +6,7 @@ import ( "math/rand" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/ostracon/types" "github.com/line/lfb-sdk/codec" @@ -167,10 +167,10 @@ func randomConsensusParams(r *rand.Rand, appState json.RawMessage, cdc codec.JSO MaxBytes: int64(simulation.RandIntBetween(r, 20000000, 30000000)), MaxGas: -1, }, - Validator: &ostproto.ValidatorParams{ + Validator: &ocproto.ValidatorParams{ PubKeyTypes: []string{types.ABCIPubKeyTypeEd25519}, }, - Evidence: &ostproto.EvidenceParams{ + Evidence: &ocproto.EvidenceParams{ MaxAgeNumBlocks: int64(stakingGenesisState.Params.UnbondingTime / AverageBlockTime), MaxAgeDuration: stakingGenesisState.Params.UnbondingTime, }, diff --git a/x/simulation/params_test.go b/x/simulation/params_test.go index 069f96a6ee..6301c5d942 100644 --- a/x/simulation/params_test.go +++ b/x/simulation/params_test.go @@ -5,7 +5,7 @@ import ( "math/rand" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" sdk "github.com/line/lfb-sdk/types" @@ -39,7 +39,7 @@ func TestNewWeightedProposalContent(t *testing.T) { require.Equal(t, key, pContent.AppParamsKey()) require.Equal(t, weight, pContent.DefaultWeight()) - ctx := sdk.NewContext(nil, ostproto.Header{}, true, nil) + ctx := sdk.NewContext(nil, ocproto.Header{}, true, nil) require.Equal(t, content, pContent.ContentSimulatorFn()(nil, ctx, nil)) } diff --git a/x/simulation/simulate.go b/x/simulation/simulate.go index 324e713e90..b8c946a413 100644 --- a/x/simulation/simulate.go +++ b/x/simulation/simulate.go @@ -11,7 +11,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/baseapp" "github.com/line/lfb-sdk/codec" @@ -93,7 +93,7 @@ func SimulateFromSeed( accs = tmpAccs nextValidators := validators - header := ostproto.Header{ + header := ocproto.Header{ ChainID: config.ChainID, Height: 1, Time: genesisTimestamp, @@ -243,7 +243,7 @@ func SimulateFromSeed( //______________________________________________________________________________ type blockSimFn func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, - accounts []simulation.Account, header ostproto.Header) (opCount int) + accounts []simulation.Account, header ocproto.Header) (opCount int) // Returns a function to simulate blocks. Written like this to avoid constant // parameters being passed everytime, to minimize memory overhead. @@ -257,7 +257,7 @@ func createBlockSimulator(testingMode bool, tb testing.TB, w io.Writer, params P selectOp := ops.getSelectOpFn() return func( - r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simulation.Account, header ostproto.Header, + r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accounts []simulation.Account, header ocproto.Header, ) (opCount int) { _, _ = fmt.Fprintf( w, "\rSimulating... block %d/%d, operation %d/%d.", diff --git a/x/slashing/abci_test.go b/x/slashing/abci_test.go index c5f420814d..08e0bf887d 100644 --- a/x/slashing/abci_test.go +++ b/x/slashing/abci_test.go @@ -5,7 +5,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -18,7 +18,7 @@ import ( func TestBeginBlocker(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) pks := simapp.CreateTestPubKeys(1) simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) @@ -36,8 +36,9 @@ func TestBeginBlocker(t *testing.T) { require.Equal(t, amt, app.StakingKeeper.Validator(ctx, addr).GetBondedTokens()) val := abci.Validator{ - Address: pk.Address(), - Power: power, + Address: pk.Address(), + Power: power, + VotingPower: power, } // mark the validator as having signed diff --git a/x/slashing/app_test.go b/x/slashing/app_test.go index 472435b476..12d8128f23 100644 --- a/x/slashing/app_test.go +++ b/x/slashing/app_test.go @@ -5,7 +5,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/crypto/keys/ed25519" @@ -27,14 +27,14 @@ var ( ) func checkValidator(t *testing.T, app *simapp.SimApp, _ sdk.AccAddress, expFound bool) stakingtypes.Validator { - ctxCheck := app.BaseApp.NewContext(true, ostproto.Header{}) + ctxCheck := app.BaseApp.NewContext(true, ocproto.Header{}) validator, found := app.StakingKeeper.GetValidator(ctxCheck, addr1.ToValAddress()) require.Equal(t, expFound, found) return validator } func checkValidatorSigningInfo(t *testing.T, app *simapp.SimApp, addr sdk.ConsAddress, expFound bool) types.ValidatorSigningInfo { - ctxCheck := app.BaseApp.NewContext(true, ostproto.Header{}) + ctxCheck := app.BaseApp.NewContext(true, ocproto.Header{}) signingInfo, found := app.SlashingKeeper.GetValidatorSigningInfo(ctxCheck, addr) require.Equal(t, expFound, found) return signingInfo @@ -68,13 +68,13 @@ func TestSlashingMsgs(t *testing.T) { ) require.NoError(t, err) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{createValidatorMsg}, "", []uint64{0}, []uint64{0}, true, true, priv1) require.NoError(t, err) simapp.CheckBalance(t, app, addr1, sdk.Coins{genCoin.Sub(bondCoin)}) - header = ostproto.Header{Height: app.LastBlockHeight() + 1} + header = ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) validator := checkValidator(t, app, addr1, true) @@ -86,7 +86,7 @@ func TestSlashingMsgs(t *testing.T) { checkValidatorSigningInfo(t, app, valAddr.ToConsAddress(), true) // unjail should fail with unknown validator - header = ostproto.Header{Height: app.LastBlockHeight() + 1} + header = ocproto.Header{Height: app.LastBlockHeight() + 1} _, res, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{unjailMsg}, "", []uint64{0}, []uint64{1}, false, false, priv1) require.Error(t, err) require.Nil(t, res) diff --git a/x/slashing/genesis_test.go b/x/slashing/genesis_test.go index 737f6abbf4..dd40401647 100644 --- a/x/slashing/genesis_test.go +++ b/x/slashing/genesis_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -16,7 +16,7 @@ import ( func TestExportAndInitGenesis(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) diff --git a/x/slashing/handler_test.go b/x/slashing/handler_test.go index 7f7305c889..1bd835dc3b 100644 --- a/x/slashing/handler_test.go +++ b/x/slashing/handler_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -24,7 +24,7 @@ import ( func TestCannotUnjailUnlessJailed(t *testing.T) { // initial setup app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) pks := simapp.CreateTestPubKeys(1) simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) @@ -50,7 +50,7 @@ func TestCannotUnjailUnlessJailed(t *testing.T) { func TestCannotUnjailUnlessMeetMinSelfDelegation(t *testing.T) { // initial setup app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) pks := simapp.CreateTestPubKeys(1) simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) @@ -81,7 +81,7 @@ func TestCannotUnjailUnlessMeetMinSelfDelegation(t *testing.T) { func TestJailedValidatorDelegations(t *testing.T) { // initial setup app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{Time: time.Unix(0, 0)}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{Time: time.Unix(0, 0)}) pks := simapp.CreateTestPubKeys(3) simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(20)) @@ -132,7 +132,7 @@ func TestInvalidMsg(t *testing.T) { k := keeper.Keeper{} h := slashing.NewHandler(k) - res, err := h(sdk.NewContext(nil, ostproto.Header{}, false, nil), testdata.NewTestMsg()) + res, err := h(sdk.NewContext(nil, ocproto.Header{}, false, nil), testdata.NewTestMsg()) require.Error(t, err) require.Nil(t, res) require.True(t, strings.Contains(err.Error(), "unrecognized slashing message type")) @@ -143,7 +143,7 @@ func TestInvalidMsg(t *testing.T) { func TestHandleAbsentValidator(t *testing.T) { // initial setup app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{Time: time.Unix(0, 0)}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{Time: time.Unix(0, 0)}) pks := simapp.CreateTestPubKeys(1) simapp.AddTestAddrsFromPubKeys(app, ctx, pks, sdk.TokensFromConsensusPower(200)) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) @@ -241,7 +241,7 @@ func TestHandleAbsentValidator(t *testing.T) { require.Nil(t, res) // unrevocation should succeed after jail expiration - ctx = ctx.WithBlockHeader(ostproto.Header{Time: time.Unix(1, 0).Add(app.SlashingKeeper.DowntimeJailDuration(ctx))}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: time.Unix(1, 0).Add(app.SlashingKeeper.DowntimeJailDuration(ctx))}) res, err = slh(ctx, types.NewMsgUnjail(addr)) require.NoError(t, err) require.NotNil(t, res) diff --git a/x/slashing/keeper/grpc_query_test.go b/x/slashing/keeper/grpc_query_test.go index b405ee4fcc..4fe415a7e9 100644 --- a/x/slashing/keeper/grpc_query_test.go +++ b/x/slashing/keeper/grpc_query_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/baseapp" @@ -29,7 +29,7 @@ type SlashingTestSuite struct { func (suite *SlashingTestSuite) SetupTest() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.AccountKeeper.SetParams(ctx, authtypes.DefaultParams()) app.BankKeeper.SetParams(ctx, banktypes.DefaultParams()) diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 7ce7c6f508..af2a286d68 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -17,7 +17,7 @@ import ( func TestUnJailNotBonded(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) p := app.StakingKeeper.GetParams(ctx) p.MaxValidators = 5 @@ -81,7 +81,7 @@ func TestUnJailNotBonded(t *testing.T) { // and that they are not immediately jailed func TestHandleNewValidator(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) @@ -125,7 +125,7 @@ func TestHandleNewValidator(t *testing.T) { func TestHandleAlreadyJailed(t *testing.T) { // initial setup app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) valAddrs := simapp.ConvertAddrsToValAddrs(addrDels) @@ -179,7 +179,7 @@ func TestValidatorDippingInAndOut(t *testing.T) { // initial setup // TestParams set the SignedBlocksWindow to 1000 and MaxMissedBlocksPerWindow to 500 app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) params := app.StakingKeeper.GetParams(ctx) diff --git a/x/slashing/keeper/querier_test.go b/x/slashing/keeper/querier_test.go index c0464b2b61..9b3dd38536 100644 --- a/x/slashing/keeper/querier_test.go +++ b/x/slashing/keeper/querier_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/codec" "github.com/line/lfb-sdk/simapp" @@ -17,7 +17,7 @@ import ( func TestNewQuerier(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) legacyQuerierCdc := codec.NewAminoCodec(app.LegacyAmino()) querier := keeper.NewQuerier(app.SlashingKeeper, legacyQuerierCdc.LegacyAmino) @@ -35,7 +35,7 @@ func TestQueryParams(t *testing.T) { cdc := codec.NewLegacyAmino() legacyQuerierCdc := codec.NewAminoCodec(cdc) app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.SlashingKeeper.SetParams(ctx, testslashing.TestParams()) querier := keeper.NewQuerier(app.SlashingKeeper, legacyQuerierCdc.LegacyAmino) diff --git a/x/slashing/keeper/signing_info_test.go b/x/slashing/keeper/signing_info_test.go index 6b856b3d7e..dacb9498e0 100644 --- a/x/slashing/keeper/signing_info_test.go +++ b/x/slashing/keeper/signing_info_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -14,7 +14,7 @@ import ( func TestGetSetValidatorSigningInfo(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) info, found := app.SlashingKeeper.GetValidatorSigningInfo(ctx, addrDels[0].ToConsAddress()) @@ -38,7 +38,7 @@ func TestGetSetValidatorSigningInfo(t *testing.T) { func TestGetSetValidatorMissedBlockBitArray(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) missed := app.SlashingKeeper.GetValidatorMissedBlockBitArray(ctx, addrDels[0].ToConsAddress(), 0) @@ -50,7 +50,7 @@ func TestGetSetValidatorMissedBlockBitArray(t *testing.T) { func TestTombstoned(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) require.Panics(t, func() { app.SlashingKeeper.Tombstone(ctx, addrDels[0].ToConsAddress()) }) @@ -74,7 +74,7 @@ func TestTombstoned(t *testing.T) { func TestJailUntil(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) addrDels := simapp.AddTestAddrsIncremental(app, ctx, 1, sdk.TokensFromConsensusPower(200)) require.Panics(t, func() { app.SlashingKeeper.JailUntil(ctx, addrDels[0].ToConsAddress(), time.Now()) }) diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index 0a7db6a853..e4d7b86097 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -6,7 +6,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -86,7 +86,7 @@ func TestSimulateMsgUnjail(t *testing.T) { app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), val0AccAddress, distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgUnjail(app.AccountKeeper, app.BankKeeper, app.SlashingKeeper, app.StakingKeeper) @@ -106,7 +106,7 @@ func TestSimulateMsgUnjail(t *testing.T) { func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) app.MintKeeper.SetParams(ctx, minttypes.DefaultParams()) app.MintKeeper.SetMinter(ctx, minttypes.DefaultInitialMinter()) diff --git a/x/staking/app_test.go b/x/staking/app_test.go index 8fa55fc8e0..28016562d9 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -4,7 +4,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -15,7 +15,7 @@ import ( ) func checkValidator(t *testing.T, app *simapp.SimApp, addr sdk.ValAddress, expFound bool) types.Validator { - ctxCheck := app.BaseApp.NewContext(true, ostproto.Header{}) + ctxCheck := app.BaseApp.NewContext(true, ocproto.Header{}) validator, found := app.StakingKeeper.GetValidator(ctxCheck, addr) require.Equal(t, expFound, found) @@ -27,7 +27,7 @@ func checkDelegation( validatorAddr sdk.ValAddress, expFound bool, expShares sdk.Dec, ) { - ctxCheck := app.BaseApp.NewContext(true, ostproto.Header{}) + ctxCheck := app.BaseApp.NewContext(true, ocproto.Header{}) delegation, found := app.StakingKeeper.GetDelegation(ctxCheck, delegatorAddr, validatorAddr) if expFound { require.True(t, found) @@ -70,13 +70,13 @@ func TestStakingMsgs(t *testing.T) { ) require.NoError(t, err) - header := ostproto.Header{Height: app.LastBlockHeight() + 1} + header := ocproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{createValidatorMsg}, "", []uint64{0}, []uint64{0}, true, true, priv1) require.NoError(t, err) simapp.CheckBalance(t, app, addr1, sdk.Coins{genCoin.Sub(bondCoin)}) - header = ostproto.Header{Height: app.LastBlockHeight() + 1} + header = ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) validator := checkValidator(t, app, addr1.ToValAddress(), true) @@ -84,14 +84,14 @@ func TestStakingMsgs(t *testing.T) { require.Equal(t, types.Bonded, validator.Status) require.True(sdk.IntEq(t, bondTokens, validator.BondedTokens())) - header = ostproto.Header{Height: app.LastBlockHeight() + 1} + header = ocproto.Header{Height: app.LastBlockHeight() + 1} app.BeginBlock(abci.RequestBeginBlock{Header: header}) // edit the validator description = types.NewDescription("bar_moniker", "", "", "", "") editValidatorMsg := types.NewMsgEditValidator(addr1.ToValAddress(), description, nil, nil) - header = ostproto.Header{Height: app.LastBlockHeight() + 1} + header = ocproto.Header{Height: app.LastBlockHeight() + 1} _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{editValidatorMsg}, "", []uint64{0}, []uint64{1}, true, true, priv1) require.NoError(t, err) @@ -102,7 +102,7 @@ func TestStakingMsgs(t *testing.T) { simapp.CheckBalance(t, app, addr2, sdk.Coins{genCoin}) delegateMsg := types.NewMsgDelegate(addr2, addr1.ToValAddress(), bondCoin) - header = ostproto.Header{Height: app.LastBlockHeight() + 1} + header = ocproto.Header{Height: app.LastBlockHeight() + 1} _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{delegateMsg}, "", []uint64{1}, []uint64{0}, true, true, priv2) require.NoError(t, err) @@ -111,7 +111,7 @@ func TestStakingMsgs(t *testing.T) { // begin unbonding beginUnbondingMsg := types.NewMsgUndelegate(addr2, addr1.ToValAddress(), bondCoin) - header = ostproto.Header{Height: app.LastBlockHeight() + 1} + header = ocproto.Header{Height: app.LastBlockHeight() + 1} _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{beginUnbondingMsg}, "", []uint64{1}, []uint64{1}, true, true, priv2) require.NoError(t, err) diff --git a/x/staking/common_test.go b/x/staking/common_test.go index 0b0b1bbe6e..2d6e1bc7c6 100644 --- a/x/staking/common_test.go +++ b/x/staking/common_test.go @@ -3,7 +3,7 @@ package staking_test import ( "math/big" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/codec" "github.com/line/lfb-sdk/crypto/keys/ed25519" @@ -37,7 +37,7 @@ var ( // to avoid messing with the hooks. func getBaseSimappWithCustomKeeper() (*codec.LegacyAmino, *simapp.SimApp, sdk.Context) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) appCodec := app.AppCodec() diff --git a/x/staking/genesis.go b/x/staking/genesis.go index e035e73e7b..c2af7a5a94 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -5,7 +5,7 @@ import ( "log" abci "github.com/line/ostracon/abci/types" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" cryptocodec "github.com/line/lfb-sdk/crypto/codec" sdk "github.com/line/lfb-sdk/types" @@ -190,18 +190,18 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { } // WriteValidators returns a slice of bonded genesis validators. -func WriteValidators(ctx sdk.Context, keeper keeper.Keeper) (vals []osttypes.GenesisValidator, err error) { +func WriteValidators(ctx sdk.Context, keeper keeper.Keeper) (vals []octypes.GenesisValidator, err error) { keeper.IterateLastValidators(ctx, func(_ int64, validator types.ValidatorI) (stop bool) { pk, err := validator.ConsPubKey() if err != nil { return true } - tmPk, err := cryptocodec.ToTmPubKeyInterface(pk) + tmPk, err := cryptocodec.ToOcPubKeyInterface(pk) if err != nil { return true } - vals = append(vals, osttypes.GenesisValidator{ + vals = append(vals, octypes.GenesisValidator{ Address: tmPk.Address(), PubKey: tmPk, Power: validator.GetConsensusPower(), diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index 4dbb95274e..45539d53f5 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -6,8 +6,8 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -135,9 +135,9 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { validator := tstaking.CheckValidator(addr1, types.Bonded, false) assert.Equal(t, addr1.String(), validator.OperatorAddress) - consKey, err := validator.TmConsPublicKey() + consKey, err := validator.OcConsPublicKey() require.NoError(t, err) - tmPk1, err := cryptocodec.ToTmProtoPublicKey(pk1) + tmPk1, err := cryptocodec.ToOcProtoPublicKey(pk1) require.NoError(t, err) assert.Equal(t, tmPk1, consKey) assert.Equal(t, valTokens, validator.BondedTokens()) @@ -160,9 +160,9 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { validator = tstaking.CheckValidator(addr2, types.Bonded, false) assert.Equal(t, addr2.String(), validator.OperatorAddress) - consPk, err := validator.TmConsPublicKey() + consPk, err := validator.OcConsPublicKey() require.NoError(t, err) - tmPk2, err := cryptocodec.ToTmProtoPublicKey(pk2) + tmPk2, err := cryptocodec.ToOcProtoPublicKey(pk2) require.NoError(t, err) assert.Equal(t, tmPk2, consPk) assert.True(sdk.IntEq(t, valTokens, validator.Tokens)) @@ -174,7 +174,7 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { initPower := int64(1000) app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower)) ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ - Validator: &ostproto.ValidatorParams{PubKeyTypes: []string{osttypes.ABCIPubKeyTypeEd25519}}, + Validator: &ocproto.ValidatorParams{PubKeyTypes: []string{octypes.ABCIPubKeyTypeEd25519}}, }) addr := valAddrs[0] @@ -188,7 +188,7 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { func TestBothPubKeyTypesMsgCreateValidator(t *testing.T) { app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, sdk.NewInt(1000)) ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ - Validator: &ostproto.ValidatorParams{PubKeyTypes: []string{osttypes.ABCIPubKeyTypeEd25519, osttypes.ABCIPubKeyTypeSecp256k1}}, + Validator: &ocproto.ValidatorParams{PubKeyTypes: []string{octypes.ABCIPubKeyTypeEd25519, octypes.ABCIPubKeyTypeSecp256k1}}, }) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) @@ -1170,7 +1170,7 @@ func TestInvalidMsg(t *testing.T) { k := keeper.Keeper{} h := staking.NewHandler(k) - res, err := h(sdk.NewContext(nil, ostproto.Header{}, false, nil), testdata.NewTestMsg()) + res, err := h(sdk.NewContext(nil, ocproto.Header{}, false, nil), testdata.NewTestMsg()) require.Error(t, err) require.Nil(t, res) require.True(t, strings.Contains(err.Error(), "unrecognized staking message type")) diff --git a/x/staking/keeper/common_test.go b/x/staking/keeper/common_test.go index 17a782b3bf..c746eadead 100644 --- a/x/staking/keeper/common_test.go +++ b/x/staking/keeper/common_test.go @@ -4,7 +4,7 @@ import ( "math/big" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/codec" "github.com/line/lfb-sdk/simapp" @@ -25,7 +25,7 @@ func init() { // to avoid messing with the hooks. func createTestInput() (*codec.LegacyAmino, *simapp.SimApp, sdk.Context) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.StakingKeeper = keeper.NewKeeper( app.AppCodec(), diff --git a/x/staking/keeper/historical_info_test.go b/x/staking/keeper/historical_info_test.go index adb7ae2310..0c76c0ad20 100644 --- a/x/staking/keeper/historical_info_test.go +++ b/x/staking/keeper/historical_info_test.go @@ -4,7 +4,7 @@ import ( "sort" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -53,11 +53,11 @@ func TestTrackHistoricalInfo(t *testing.T) { // set historical info at 5, 4 which should be pruned // and check that it has been stored - h4 := ostproto.Header{ + h4 := ocproto.Header{ ChainID: "HelloChain", Height: 4, } - h5 := ostproto.Header{ + h5 := ocproto.Header{ ChainID: "HelloChain", Height: 5, } @@ -88,7 +88,7 @@ func TestTrackHistoricalInfo(t *testing.T) { sort.Sort(types.ValidatorsByVotingPower(vals)) // Set Header for BeginBlock context - header := ostproto.Header{ + header := ocproto.Header{ ChainID: "HelloChain", Height: 10, } @@ -125,9 +125,9 @@ func TestGetAllHistoricalInfo(t *testing.T) { teststaking.NewValidator(t, addrVals[1], PKs[1]), } - header1 := ostproto.Header{ChainID: "HelloChain", Height: 10} - header2 := ostproto.Header{ChainID: "HelloChain", Height: 11} - header3 := ostproto.Header{ChainID: "HelloChain", Height: 12} + header1 := ocproto.Header{ChainID: "HelloChain", Height: 10} + header2 := ocproto.Header{ChainID: "HelloChain", Height: 11} + header3 := ocproto.Header{ChainID: "HelloChain", Height: 12} hist1 := types.HistoricalInfo{Header: header1, Valset: valSet} hist2 := types.HistoricalInfo{Header: header2, Valset: valSet} diff --git a/x/staking/keeper/keeper_test.go b/x/staking/keeper/keeper_test.go index e5cb5935fd..25813b72e7 100644 --- a/x/staking/keeper/keeper_test.go +++ b/x/staking/keeper/keeper_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/baseapp" "github.com/line/lfb-sdk/simapp" @@ -27,7 +27,7 @@ type KeeperTestSuite struct { func (suite *KeeperTestSuite) SetupTest() { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) querier := keeper.Querier{Keeper: app.StakingKeeper} @@ -36,7 +36,7 @@ func (suite *KeeperTestSuite) SetupTest() { queryClient := types.NewQueryClient(queryHelper) addrs, _, validators := createValidators(suite.T(), ctx, app, []int64{9, 8, 7}) - header := ostproto.Header{ + header := ocproto.Header{ ChainID: "HelloChain", Height: 5, } @@ -52,7 +52,7 @@ func (suite *KeeperTestSuite) SetupTest() { } func TestParams(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) expParams := types.DefaultParams() diff --git a/x/staking/keeper/querier_test.go b/x/staking/keeper/querier_test.go index 5ae2d1bbf7..575ba62ef0 100644 --- a/x/staking/keeper/querier_test.go +++ b/x/staking/keeper/querier_test.go @@ -5,7 +5,7 @@ import ( "testing" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/codec" @@ -33,7 +33,7 @@ func TestNewQuerier(t *testing.T) { app.StakingKeeper.SetValidatorByPowerIndex(ctx, validators[i]) } - header := ostproto.Header{ + header := ocproto.Header{ ChainID: "HelloChain", Height: 5, } @@ -720,7 +720,7 @@ func TestQueryHistoricalInfo(t *testing.T) { app.StakingKeeper.SetValidator(ctx, val1) app.StakingKeeper.SetValidator(ctx, val2) - header := ostproto.Header{ + header := ocproto.Header{ ChainID: "HelloChain", Height: 5, } diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 1e6d9cb22b..bbbb27e8d7 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -93,7 +93,7 @@ func TestSlashUnbondingDelegation(t *testing.T) { require.True(t, slashAmount.Equal(sdk.NewInt(0))) // after the expiration time, no longer eligible for slashing - ctx = ctx.WithBlockHeader(ostproto.Header{Time: time.Unix(10, 0)}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: time.Unix(10, 0)}) app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) slashAmount = app.StakingKeeper.SlashUnbondingDelegation(ctx, ubd, 0, fraction) require.True(t, slashAmount.Equal(sdk.NewInt(0))) @@ -101,7 +101,7 @@ func TestSlashUnbondingDelegation(t *testing.T) { // test valid slash, before expiration timestamp and to which stake contributed notBondedPool := app.StakingKeeper.GetNotBondedPool(ctx) oldUnbondedPoolBalances := app.BankKeeper.GetAllBalances(ctx, notBondedPool.GetAddress()) - ctx = ctx.WithBlockHeader(ostproto.Header{Time: time.Unix(0, 0)}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: time.Unix(0, 0)}) app.StakingKeeper.SetUnbondingDelegation(ctx, ubd) slashAmount = app.StakingKeeper.SlashUnbondingDelegation(ctx, ubd, 0, fraction) require.True(t, slashAmount.Equal(sdk.NewInt(5))) @@ -150,7 +150,7 @@ func TestSlashRedelegation(t *testing.T) { require.True(t, slashAmount.Equal(sdk.NewInt(0))) // after the expiration time, no longer eligible for slashing - ctx = ctx.WithBlockHeader(ostproto.Header{Time: time.Unix(10, 0)}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: time.Unix(10, 0)}) app.StakingKeeper.SetRedelegation(ctx, rd) validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[1]) require.True(t, found) @@ -160,7 +160,7 @@ func TestSlashRedelegation(t *testing.T) { balances = app.BankKeeper.GetAllBalances(ctx, bondedPool.GetAddress()) // test valid slash, before expiration timestamp and to which stake contributed - ctx = ctx.WithBlockHeader(ostproto.Header{Time: time.Unix(0, 0)}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: time.Unix(0, 0)}) app.StakingKeeper.SetRedelegation(ctx, rd) validator, found = app.StakingKeeper.GetValidator(ctx, addrVals[1]) require.True(t, found) diff --git a/x/staking/keeper/validator_test.go b/x/staking/keeper/validator_test.go index 0fd9f25292..9140dddb90 100644 --- a/x/staking/keeper/validator_test.go +++ b/x/staking/keeper/validator_test.go @@ -6,7 +6,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -1057,7 +1057,7 @@ func TestApplyAndReturnValidatorSetUpdatesBondTransition(t *testing.T) { func TestUpdateValidatorCommission(t *testing.T) { app, ctx, _, addrVals := bootstrapValidatorTest(t, 1000, 20) - ctx = ctx.WithBlockHeader(ostproto.Header{Time: time.Now().UTC()}) + ctx = ctx.WithBlockHeader(ocproto.Header{Time: time.Now().UTC()}) commission1 := types.NewCommissionWithTime( sdk.NewDecWithPrec(1, 1), sdk.NewDecWithPrec(3, 1), diff --git a/x/staking/module_test.go b/x/staking/module_test.go index cea6f672b9..f4956cc5b3 100644 --- a/x/staking/module_test.go +++ b/x/staking/module_test.go @@ -4,7 +4,7 @@ import ( "testing" abcitypes "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -14,7 +14,7 @@ import ( func TestItCreatesModuleAccountOnInitBlock(t *testing.T) { app := simapp.Setup(false) - ctx := app.BaseApp.NewContext(false, ostproto.Header{}) + ctx := app.BaseApp.NewContext(false, ocproto.Header{}) app.InitChain( abcitypes.RequestInitChain{ diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index e4197dffc9..ae97f67886 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -6,7 +6,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/simapp" @@ -71,7 +71,7 @@ func TestSimulateMsgCreateValidator(t *testing.T) { accounts := getTestingAccounts(t, r, app, ctx, 3) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgCreateValidator(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -108,7 +108,7 @@ func TestSimulateMsgEditValidator(t *testing.T) { _ = getTestingValidator0(t, app, ctx, accounts) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgEditValidator(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -146,7 +146,7 @@ func TestSimulateMsgDelegate(t *testing.T) { setupValidatorRewards(app, ctx, validator0.GetOperator()) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgDelegate(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -191,7 +191,7 @@ func TestSimulateMsgUndelegate(t *testing.T) { setupValidatorRewards(app, ctx, validator0.GetOperator()) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgUndelegate(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -240,7 +240,7 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { setupValidatorRewards(app, ctx, validator1.GetOperator()) // begin a new block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation // SimulateMsgBeginRedelegate selects a validator randomly, so this test code was modified such that @@ -267,7 +267,7 @@ func createTestApp(isCheckTx bool) (*simapp.SimApp, sdk.Context) { // sdk.PowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) app := simapp.Setup(isCheckTx) - ctx := app.BaseApp.NewContext(isCheckTx, ostproto.Header{}) + ctx := app.BaseApp.NewContext(isCheckTx, ocproto.Header{}) app.MintKeeper.SetParams(ctx, minttypes.DefaultParams()) app.MintKeeper.SetMinter(ctx, minttypes.DefaultInitialMinter()) diff --git a/x/staking/teststaking/tm.go b/x/staking/teststaking/tm.go index 645b78ea35..b2ea6a8e4f 100644 --- a/x/staking/teststaking/tm.go +++ b/x/staking/teststaking/tm.go @@ -1,39 +1,39 @@ package teststaking import ( - ostcrypto "github.com/line/ostracon/crypto" - osttypes "github.com/line/ostracon/types" + occrypto "github.com/line/ostracon/crypto" + octypes "github.com/line/ostracon/types" cryptocodec "github.com/line/lfb-sdk/crypto/codec" "github.com/line/lfb-sdk/x/staking/types" ) -// GetTmConsPubKey gets the validator's public key as a ostcrypto.PubKey. -func GetTmConsPubKey(v types.Validator) (ostcrypto.PubKey, error) { +// GetOcConsPubKey gets the validator's public key as an occrypto.PubKey. +func GetOcConsPubKey(v types.Validator) (occrypto.PubKey, error) { pk, err := v.ConsPubKey() if err != nil { return nil, err } - return cryptocodec.ToTmPubKeyInterface(pk) + return cryptocodec.ToOcPubKeyInterface(pk) } -// ToTmValidator casts an SDK validator to a tendermint type Validator. -func ToTmValidator(v types.Validator) (*osttypes.Validator, error) { - tmPk, err := GetTmConsPubKey(v) +// ToOcValidator casts an SDK validator to an ostracon type Validator. +func ToOcValidator(v types.Validator) (*octypes.Validator, error) { + tmPk, err := GetOcConsPubKey(v) if err != nil { return nil, err } - return osttypes.NewValidator(tmPk, v.ConsensusPower()), nil + return octypes.NewValidator(tmPk, v.ConsensusPower()), nil } -// ToTmValidators casts all validators to the corresponding tendermint type. -func ToTmValidators(v types.Validators) ([]*osttypes.Validator, error) { - validators := make([]*osttypes.Validator, len(v)) +// ToOcValidators casts all validators to the corresponding tendermint type. +func ToOcValidators(v types.Validators) ([]*octypes.Validator, error) { + validators := make([]*octypes.Validator, len(v)) var err error for i, val := range v { - validators[i], err = ToTmValidator(val) + validators[i], err = ToOcValidator(val) if err != nil { return nil, err } diff --git a/x/staking/types/exported.go b/x/staking/types/exported.go index bb9b5193ab..2214d9a93b 100644 --- a/x/staking/types/exported.go +++ b/x/staking/types/exported.go @@ -1,7 +1,7 @@ package types import ( - ostprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" + ocprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" cryptotypes "github.com/line/lfb-sdk/crypto/types" sdk "github.com/line/lfb-sdk/types" @@ -24,7 +24,7 @@ type ValidatorI interface { IsUnbonding() bool // check if has status unbonding GetOperator() sdk.ValAddress // operator address to receive/return validators coins ConsPubKey() (cryptotypes.PubKey, error) // validation consensus pubkey (cryptotypes.PubKey) - TmConsPublicKey() (ostprotocrypto.PublicKey, error) // validation consensus pubkey (Tendermint) + OcConsPublicKey() (ocprotocrypto.PublicKey, error) // validation consensus pubkey (Ostracon) GetConsAddr() (sdk.ConsAddress, error) // validation consensus address GetTokens() sdk.Int // validation tokens GetBondedTokens() sdk.Int // validator bonded tokens diff --git a/x/staking/types/historical_info.go b/x/staking/types/historical_info.go index 15d4ebf98e..a2b5577fcf 100644 --- a/x/staking/types/historical_info.go +++ b/x/staking/types/historical_info.go @@ -4,7 +4,7 @@ import ( "sort" "github.com/gogo/protobuf/proto" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/lfb-sdk/codec" codectypes "github.com/line/lfb-sdk/codec/types" @@ -13,8 +13,8 @@ import ( // NewHistoricalInfo will create a historical information struct from header and valset // it will first sort valset before inclusion into historical info -func NewHistoricalInfo(header ostproto.Header, valSet Validators) HistoricalInfo { - // Must sort in the same way that tendermint does +func NewHistoricalInfo(header ocproto.Header, valSet Validators) HistoricalInfo { + // Must sort in the same way that ostracon does sort.Sort(ValidatorsByVotingPower(valSet)) return HistoricalInfo{ diff --git a/x/staking/types/historical_info_test.go b/x/staking/types/historical_info_test.go index 5ecaef1e14..586f1debd4 100644 --- a/x/staking/types/historical_info_test.go +++ b/x/staking/types/historical_info_test.go @@ -5,13 +5,13 @@ import ( "sort" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/x/staking/types" ) -var header = ostproto.Header{ +var header = ocproto.Header{ ChainID: "hello", Height: 5, } diff --git a/x/staking/types/staking.pb.go b/x/staking/types/staking.pb.go index 2851338566..6d65d53594 100644 --- a/x/staking/types/staking.pb.go +++ b/x/staking/types/staking.pb.go @@ -76,7 +76,7 @@ func (BondStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_7e7ccde09813ae51, []int{0} } -// HistoricalInfo contains header and validator information for a given block. +// HistoricalInfo contains header and validator, voter information for a given block. // It is stored as part of staking module's state, which persists the `n` most // recent HistoricalInfo // (`n` is set by the staking module's `historical_entries` parameter). diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 42fba7ab00..762084a7d9 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -8,7 +8,7 @@ import ( "time" abci "github.com/line/ostracon/abci/types" - ostprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" + ocprotocrypto "github.com/line/ostracon/proto/ostracon/crypto" "gopkg.in/yaml.v2" "github.com/line/lfb-sdk/codec" @@ -262,7 +262,7 @@ func (d Description) EnsureLength() (Description, error) { // ABCIValidatorUpdate returns an abci.ValidatorUpdate from a staking validator type // with the full validator power func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate { - tmProtoPk, err := v.TmConsPublicKey() + tmProtoPk, err := v.OcConsPublicKey() if err != nil { panic(err) } @@ -276,7 +276,7 @@ func (v Validator) ABCIValidatorUpdate() abci.ValidatorUpdate { // ABCIValidatorUpdateZero returns an abci.ValidatorUpdate from a staking validator type // with zero power used for validator updates. func (v Validator) ABCIValidatorUpdateZero() abci.ValidatorUpdate { - tmProtoPk, err := v.TmConsPublicKey() + tmProtoPk, err := v.OcConsPublicKey() if err != nil { panic(err) } @@ -480,16 +480,16 @@ func (v Validator) ConsPubKey() (cryptotypes.PubKey, error) { } -// TmConsPublicKey casts Validator.ConsensusPubkey to ostprotocrypto.PubKey. -func (v Validator) TmConsPublicKey() (ostprotocrypto.PublicKey, error) { +// OcConsPublicKey casts Validator.ConsensusPubkey to ocprotocrypto.PubKey. +func (v Validator) OcConsPublicKey() (ocprotocrypto.PublicKey, error) { pk, err := v.ConsPubKey() if err != nil { - return ostprotocrypto.PublicKey{}, err + return ocprotocrypto.PublicKey{}, err } - tmPk, err := cryptocodec.ToTmProtoPublicKey(pk) + tmPk, err := cryptocodec.ToOcProtoPublicKey(pk) if err != nil { - return ostprotocrypto.PublicKey{}, err + return ocprotocrypto.PublicKey{}, err } return tmPk, nil diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 2f09a7a2a4..0e1469e47b 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -5,7 +5,7 @@ import ( "sort" "testing" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -59,7 +59,7 @@ func TestUpdateDescription(t *testing.T) { func TestABCIValidatorUpdate(t *testing.T) { validator := newValidator(t, valAddr1, pk1) abciVal := validator.ABCIValidatorUpdate() - pk, err := validator.TmConsPublicKey() + pk, err := validator.OcConsPublicKey() require.NoError(t, err) require.Equal(t, pk, abciVal.PubKey) require.Equal(t, validator.BondedTokens().Int64(), abciVal.Power) @@ -68,7 +68,7 @@ func TestABCIValidatorUpdate(t *testing.T) { func TestABCIValidatorUpdateZero(t *testing.T) { validator := newValidator(t, valAddr1, pk1) abciVal := validator.ABCIValidatorUpdateZero() - pk, err := validator.TmConsPublicKey() + pk, err := validator.OcConsPublicKey() require.NoError(t, err) require.Equal(t, pk, abciVal.PubKey) require.Equal(t, int64(0), abciVal.Power) @@ -290,13 +290,13 @@ func TestValidatorsSortTendermint(t *testing.T) { valz := types.Validators(vals) // create expected ostracon validators by converting to ostracon then sorting - expectedVals, err := teststaking.ToTmValidators(valz) + expectedVals, err := teststaking.ToOcValidators(valz) require.NoError(t, err) - sort.Sort(osttypes.ValidatorsByVotingPower(expectedVals)) + sort.Sort(octypes.ValidatorsByVotingPower(expectedVals)) // sort in SDK and then convert to ostracon sort.Sort(types.ValidatorsByVotingPower(valz)) - actualVals, err := teststaking.ToTmValidators(valz) + actualVals, err := teststaking.ToOcValidators(valz) require.NoError(t, err) require.Equal(t, expectedVals, actualVals, "sorting in SDK is not the same as sorting in Tendermint") @@ -304,7 +304,7 @@ func TestValidatorsSortTendermint(t *testing.T) { func TestValidatorToTm(t *testing.T) { vals := make(types.Validators, 10) - expected := make([]*osttypes.Validator, 10) + expected := make([]*octypes.Validator, 10) for i := range vals { pk := ed25519.GenPrivKey().PubKey() @@ -312,11 +312,11 @@ func TestValidatorToTm(t *testing.T) { val.Status = types.Bonded val.Tokens = sdk.NewInt(rand.Int63()) vals[i] = val - tmPk, err := cryptocodec.ToTmPubKeyInterface(pk) + tmPk, err := cryptocodec.ToOcPubKeyInterface(pk) require.NoError(t, err) - expected[i] = osttypes.NewValidator(tmPk, val.ConsensusPower()) + expected[i] = octypes.NewValidator(tmPk, val.ConsensusPower()) } - vs, err := teststaking.ToTmValidators(vals) + vs, err := teststaking.ToOcValidators(vals) require.NoError(t, err) require.Equal(t, expected, vs) } diff --git a/x/upgrade/abci.go b/x/upgrade/abci.go index 1334035465..09bb4cdf44 100644 --- a/x/upgrade/abci.go +++ b/x/upgrade/abci.go @@ -11,7 +11,7 @@ import ( "github.com/line/lfb-sdk/x/upgrade/keeper" "github.com/line/lfb-sdk/x/upgrade/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" ) // BeginBlock will check if there is a scheduled plan and if it is ready to be executed. diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index 8c457dd768..1a8c2a673d 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -11,7 +11,7 @@ import ( abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -22,7 +22,7 @@ import ( "github.com/line/lfb-sdk/types/module" govtypes "github.com/line/lfb-sdk/x/gov/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" "github.com/line/lfb-sdk/x/upgrade" "github.com/line/lfb-sdk/x/upgrade/keeper" "github.com/line/lfb-sdk/x/upgrade/types" @@ -54,7 +54,7 @@ func setupTest(height int64, skip map[int64]bool) TestSuite { ) s.keeper = app.UpgradeKeeper - s.ctx = app.BaseApp.NewContext(false, ostproto.Header{Height: height, Time: time.Now()}) + s.ctx = app.BaseApp.NewContext(false, ocproto.Header{Height: height, Time: time.Now()}) s.module = upgrade.NewAppModule(s.keeper) s.querier = s.module.LegacyQuerierHandler(app.LegacyAmino()) @@ -123,7 +123,7 @@ func TestCanOverwriteScheduleUpgrade(t *testing.T) { func VerifyDoIBCLastBlock(t *testing.T) { t.Log("Verify that chain committed to consensus state on the last height it will commit") nextValsHash := []byte("nextValsHash") - newCtx := s.ctx.WithBlockHeader(ostproto.Header{ + newCtx := s.ctx.WithBlockHeader(ocproto.Header{ Height: s.ctx.BlockHeight(), NextValidatorsHash: nextValsHash, }) diff --git a/x/upgrade/keeper/grpc_query_test.go b/x/upgrade/keeper/grpc_query_test.go index cc7ec7cd64..da811d9eef 100644 --- a/x/upgrade/keeper/grpc_query_test.go +++ b/x/upgrade/keeper/grpc_query_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/baseapp" @@ -24,7 +24,7 @@ type UpgradeTestSuite struct { func (suite *UpgradeTestSuite) SetupTest() { suite.app = simapp.Setup(false) - suite.ctx = suite.app.BaseApp.NewContext(false, ostproto.Header{}) + suite.ctx = suite.app.BaseApp.NewContext(false, ocproto.Header{}) queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, suite.app.InterfaceRegistry()) types.RegisterQueryServer(queryHelper, suite.app.UpgradeKeeper) diff --git a/x/upgrade/keeper/keeper_test.go b/x/upgrade/keeper/keeper_test.go index 8e42b61527..8cc5fe52f6 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/suite" "github.com/line/lfb-sdk/simapp" @@ -14,7 +14,7 @@ import ( clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" commitmenttypes "github.com/line/lfb-sdk/x/ibc/core/23-commitment/types" ibcexported "github.com/line/lfb-sdk/x/ibc/core/exported" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" "github.com/line/lfb-sdk/x/upgrade/keeper" "github.com/line/lfb-sdk/x/upgrade/types" ) @@ -36,7 +36,7 @@ func (s *KeeperTestSuite) SetupTest() { s.T().Log("home dir:", homeDir) s.homeDir = homeDir s.app = app - s.ctx = app.BaseApp.NewContext(false, ostproto.Header{ + s.ctx = app.BaseApp.NewContext(false, ocproto.Header{ Time: time.Now(), Height: 10, }) diff --git a/x/upgrade/types/plan_test.go b/x/upgrade/types/plan_test.go index 658faa3185..c5ea17135c 100644 --- a/x/upgrade/types/plan_test.go +++ b/x/upgrade/types/plan_test.go @@ -6,12 +6,12 @@ import ( "time" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" "github.com/line/lfb-sdk/x/upgrade/types" sdk "github.com/line/lfb-sdk/types" @@ -217,7 +217,7 @@ func TestShouldExecute(t *testing.T) { for name, tc := range cases { tc := tc // copy to local variable for scopelint t.Run(name, func(t *testing.T) { - ctx := sdk.NewContext(nil, ostproto.Header{Height: tc.ctxHeight, Time: tc.ctxTime}, false, log.NewNopLogger()) + ctx := sdk.NewContext(nil, ocproto.Header{Height: tc.ctxHeight, Time: tc.ctxTime}, false, log.NewNopLogger()) should := tc.p.ShouldExecute(ctx) assert.Equal(t, tc.expected, should) }) diff --git a/x/upgrade/types/proposal_test.go b/x/upgrade/types/proposal_test.go index e212e64d64..ba323cebc2 100644 --- a/x/upgrade/types/proposal_test.go +++ b/x/upgrade/types/proposal_test.go @@ -10,7 +10,7 @@ import ( codectypes "github.com/line/lfb-sdk/codec/types" gov "github.com/line/lfb-sdk/x/gov/types" clienttypes "github.com/line/lfb-sdk/x/ibc/core/02-client/types" - ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/07-tendermint/types" + ibctmtypes "github.com/line/lfb-sdk/x/ibc/light-clients/99-ostracon/types" "github.com/line/lfb-sdk/x/upgrade/types" ) diff --git a/x/upgrade/types/storeloader_test.go b/x/upgrade/types/storeloader_test.go index 3c66217575..c008214ada 100644 --- a/x/upgrade/types/storeloader_test.go +++ b/x/upgrade/types/storeloader_test.go @@ -9,7 +9,7 @@ import ( abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" tmdb "github.com/line/tm-db/v2" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -27,7 +27,7 @@ func useUpgradeLoader(height int64, upgrades *store.StoreUpgrades) func(*baseapp } func defaultLogger() log.Logger { - return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") + return log.NewOCLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") } func initStore(t *testing.T, db tmdb.DB, storeKey string, k, v []byte) { @@ -126,7 +126,7 @@ func TestSetLoader(t *testing.T) { require.Nil(t, err) for i := int64(2); i <= upgradeHeight-1; i++ { - origapp.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: i}}) + origapp.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: i}}) res := origapp.Commit() require.NotNil(t, res.Data) } @@ -142,7 +142,7 @@ func TestSetLoader(t *testing.T) { require.Nil(t, err) // "execute" one block - app.BeginBlock(abci.RequestBeginBlock{Header: ostproto.Header{Height: upgradeHeight}}) + app.BeginBlock(abci.RequestBeginBlock{Header: ocproto.Header{Height: upgradeHeight}}) res := app.Commit() require.NotNil(t, res.Data) diff --git a/x/wasm/client/cli/genesis_msg.go b/x/wasm/client/cli/genesis_msg.go index cd2a2dfe20..5d288b8e1b 100644 --- a/x/wasm/client/cli/genesis_msg.go +++ b/x/wasm/client/cli/genesis_msg.go @@ -20,7 +20,7 @@ import ( genutiltypes "github.com/line/lfb-sdk/x/genutil/types" "github.com/line/lfb-sdk/x/wasm/types" "github.com/line/ostracon/crypto" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/spf13/cobra" ) @@ -370,12 +370,12 @@ func hasContract(state *types.GenesisState, contractAddr string) bool { // GenesisData contains raw and unmarshalled data from the genesis file type GenesisData struct { GenesisFile string - GenDoc *osttypes.GenesisDoc + GenDoc *octypes.GenesisDoc AppState map[string]json.RawMessage WasmModuleState *types.GenesisState } -func NewGenesisData(genesisFile string, genDoc *osttypes.GenesisDoc, appState map[string]json.RawMessage, wasmModuleState *types.GenesisState) *GenesisData { +func NewGenesisData(genesisFile string, genDoc *octypes.GenesisDoc, appState map[string]json.RawMessage, wasmModuleState *types.GenesisState) *GenesisData { return &GenesisData{GenesisFile: genesisFile, GenDoc: genDoc, AppState: appState, WasmModuleState: wasmModuleState} } diff --git a/x/wasm/client/cli/genesis_msg_test.go b/x/wasm/client/cli/genesis_msg_test.go index 58284b4a20..b5efafaaec 100644 --- a/x/wasm/client/cli/genesis_msg_test.go +++ b/x/wasm/client/cli/genesis_msg_test.go @@ -23,7 +23,7 @@ import ( "github.com/line/lfb-sdk/x/wasm/keeper" "github.com/line/lfb-sdk/x/wasm/types" "github.com/line/ostracon/libs/log" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/stretchr/testify/assert" @@ -633,7 +633,7 @@ func setupGenesis(t *testing.T, wasmGenesis types.GenesisState) string { appStateBz, err := json.Marshal(appState) require.NoError(t, err) - genDoc := osttypes.GenesisDoc{ + genDoc := octypes.GenesisDoc{ ChainID: "testing", AppState: appStateBz, } diff --git a/x/wasm/keeper/querier.go b/x/wasm/keeper/querier.go index 08c231dcfa..1104d9bbfa 100644 --- a/x/wasm/keeper/querier.go +++ b/x/wasm/keeper/querier.go @@ -94,7 +94,7 @@ func (q GrpcQuerier) ContractsByCode(c context.Context, req *types.QueryContract prefixStore := prefix.NewStore(ctx.KVStore(q.storeKey), types.GetContractByCodeIDSecondaryIndexPrefix(req.CodeId)) pageRes, err := query.FilteredPaginate(prefixStore, req.Pagination, func(key []byte, value []byte, accumulate bool) (bool, error) { if accumulate { - var contractAddr sdk.AccAddress = sdk.AccAddress(string(key[types.AbsoluteTxPositionLen:])) + var contractAddr = sdk.AccAddress(string(key[types.AbsoluteTxPositionLen:])) r = append(r, contractAddr.String()) } return true, nil diff --git a/x/wasm/linkwasmd/app/app.go b/x/wasm/linkwasmd/app/app.go index 0eb32f848b..70ca0974c0 100644 --- a/x/wasm/linkwasmd/app/app.go +++ b/x/wasm/linkwasmd/app/app.go @@ -15,7 +15,7 @@ import ( ostjson "github.com/line/ostracon/libs/json" "github.com/line/ostracon/libs/log" ostos "github.com/line/ostracon/libs/os" - ostproto "github.com/line/ostracon/proto/ostracon/types" + ocproto "github.com/line/ostracon/proto/ostracon/types" dbm "github.com/line/tm-db/v2" "github.com/line/lfb-sdk/baseapp" @@ -498,7 +498,7 @@ func NewLinkApp( // that in-memory capabilities get regenerated on app restart. // Note that since this reads from the store, we can only perform it when // `loadLatest` is set to true. - ctx := app.BaseApp.NewUncachedContext(true, ostproto.Header{}) + ctx := app.BaseApp.NewUncachedContext(true, ocproto.Header{}) app.CapabilityKeeper.InitializeAndSeal(ctx) // Initialize pinned codes in wasmvm as they are not persisted there diff --git a/x/wasm/linkwasmd/app/app_test.go b/x/wasm/linkwasmd/app/app_test.go index 586c5cb5ba..2309c40253 100644 --- a/x/wasm/linkwasmd/app/app_test.go +++ b/x/wasm/linkwasmd/app/app_test.go @@ -17,7 +17,7 @@ import ( func TestLinkdExport(t *testing.T) { db := memdb.NewDB() var emptyWasmOpts []wasm.Option - gapp := NewLinkApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, emptyWasmOpts) + gapp := NewLinkApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, emptyWasmOpts) genesisState := NewDefaultGenesisState() stateBytes, err := json.MarshalIndent(genesisState, "", " ") @@ -33,7 +33,7 @@ func TestLinkdExport(t *testing.T) { gapp.Commit() // Making a new app object with the db, so that initchain hasn't been called - newGapp := NewLinkApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, emptyWasmOpts) + newGapp := NewLinkApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, emptyWasmOpts) _, err = newGapp.ExportAppStateAndValidators(false, []string{}) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } @@ -42,7 +42,7 @@ func TestLinkdExport(t *testing.T) { func TestBlacklistedAddrs(t *testing.T) { db := memdb.NewDB() var emptyWasmOpts []wasm.Option - gapp := NewLinkApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, emptyWasmOpts) + gapp := NewLinkApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, MakeEncodingConfig(), wasm.EnableAllProposals, EmptyBaseAppOptions{}, emptyWasmOpts) for acc := range maccPerms { t.Run(acc, func(t *testing.T) { diff --git a/x/wasm/linkwasmd/app/pubkey_replacement.go b/x/wasm/linkwasmd/app/pubkey_replacement.go index 9f8a393126..3bc89741fb 100644 --- a/x/wasm/linkwasmd/app/pubkey_replacement.go +++ b/x/wasm/linkwasmd/app/pubkey_replacement.go @@ -13,7 +13,7 @@ import ( slashing "github.com/line/lfb-sdk/x/slashing/types" staking "github.com/line/lfb-sdk/x/staking/types" cryptocodec "github.com/line/ostracon/crypto/encoding" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/pkg/errors" ) @@ -35,7 +35,7 @@ type replacementConfig struct { ConsensusPubkey string `json:"stargate_consensus_public_key"` } -func loadKeydataFromFile(clientCtx client.Context, replacementrJSON string, genDoc *osttypes.GenesisDoc) *osttypes.GenesisDoc { +func loadKeydataFromFile(clientCtx client.Context, replacementrJSON string, genDoc *octypes.GenesisDoc) *octypes.GenesisDoc { jsonReplacementBlob, err := ioutil.ReadFile(replacementrJSON) if err != nil { log.Fatal(errors.Wrapf(err, "failed to read replacement keys from file %s", replacementrJSON)) diff --git a/x/wasm/linkwasmd/app/test_helpers.go b/x/wasm/linkwasmd/app/test_helpers.go index c92945441f..955e40e011 100644 --- a/x/wasm/linkwasmd/app/test_helpers.go +++ b/x/wasm/linkwasmd/app/test_helpers.go @@ -13,7 +13,7 @@ import ( abci "github.com/line/ostracon/abci/types" "github.com/line/ostracon/libs/log" tmproto "github.com/line/ostracon/proto/ostracon/types" - osttypes "github.com/line/ostracon/types" + octypes "github.com/line/ostracon/types" "github.com/line/tm-db/v2/memdb" "github.com/stretchr/testify/require" @@ -45,7 +45,7 @@ var DefaultConsensusParams = &abci.ConsensusParams{ }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ - osttypes.ABCIPubKeyTypeEd25519, + octypes.ABCIPubKeyTypeEd25519, }, }, } @@ -86,7 +86,7 @@ func Setup(isCheckTx bool) *LinkApp { // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit (10^6) in the default token of the LinkApp from first genesis // account. A Nop logger is set in LinkApp. -func SetupWithGenesisValSet(t *testing.T, valSet *osttypes.ValidatorSet, genAccs []authtypes.GenesisAccount, opts []wasm.Option, balances ...banktypes.Balance) *LinkApp { +func SetupWithGenesisValSet(t *testing.T, valSet *octypes.ValidatorSet, genAccs []authtypes.GenesisAccount, opts []wasm.Option, balances ...banktypes.Balance) *LinkApp { app, genesisState := setup(true, 5, opts...) // set genesis accounts authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) diff --git a/x/wasm/types/genesis.pb.go b/x/wasm/types/genesis.pb.go index 2e5e223be9..7f24b14e0b 100644 --- a/x/wasm/types/genesis.pb.go +++ b/x/wasm/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: genesis.proto +// source: cosmwasm/wasm/v1beta1/genesis.proto package types @@ -36,7 +36,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_14205810582f3203, []int{0} + return fileDescriptor_931ba204ce53afe0, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -116,7 +116,7 @@ func (m *GenesisState_GenMsgs) Reset() { *m = GenesisState_GenMsgs{} } func (m *GenesisState_GenMsgs) String() string { return proto.CompactTextString(m) } func (*GenesisState_GenMsgs) ProtoMessage() {} func (*GenesisState_GenMsgs) Descriptor() ([]byte, []int) { - return fileDescriptor_14205810582f3203, []int{0, 0} + return fileDescriptor_931ba204ce53afe0, []int{0, 0} } func (m *GenesisState_GenMsgs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ func (m *Code) Reset() { *m = Code{} } func (m *Code) String() string { return proto.CompactTextString(m) } func (*Code) ProtoMessage() {} func (*Code) Descriptor() ([]byte, []int) { - return fileDescriptor_14205810582f3203, []int{1} + return fileDescriptor_931ba204ce53afe0, []int{1} } func (m *Code) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -283,7 +283,7 @@ func (m *Contract) Reset() { *m = Contract{} } func (m *Contract) String() string { return proto.CompactTextString(m) } func (*Contract) ProtoMessage() {} func (*Contract) Descriptor() ([]byte, []int) { - return fileDescriptor_14205810582f3203, []int{2} + return fileDescriptor_931ba204ce53afe0, []int{2} } func (m *Contract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -343,7 +343,7 @@ func (m *Sequence) Reset() { *m = Sequence{} } func (m *Sequence) String() string { return proto.CompactTextString(m) } func (*Sequence) ProtoMessage() {} func (*Sequence) Descriptor() ([]byte, []int) { - return fileDescriptor_14205810582f3203, []int{3} + return fileDescriptor_931ba204ce53afe0, []int{3} } func (m *Sequence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -394,51 +394,53 @@ func init() { proto.RegisterType((*Sequence)(nil), "cosmwasm.wasm.v1beta1.Sequence") } -func init() { proto.RegisterFile("genesis.proto", fileDescriptor_14205810582f3203) } - -var fileDescriptor_14205810582f3203 = []byte{ - // 643 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xc7, 0xe3, 0x26, 0x4e, 0x93, 0x69, 0xfa, 0x6b, 0xb5, 0xed, 0x0f, 0xac, 0x94, 0x26, 0x51, - 0xca, 0xa1, 0x15, 0x34, 0x51, 0xcb, 0x11, 0x09, 0x09, 0x53, 0x44, 0x43, 0x55, 0x84, 0x5c, 0x89, - 0x43, 0x2f, 0x91, 0xff, 0x4c, 0x8d, 0xd5, 0xd8, 0x1b, 0xb2, 0x9b, 0x52, 0xbf, 0x05, 0xe2, 0x21, - 0x78, 0x96, 0x1e, 0x7b, 0xe4, 0x14, 0xa1, 0xf4, 0xc6, 0x53, 0xa0, 0x5d, 0xaf, 0x1d, 0x23, 0x70, - 0xb9, 0x58, 0x9e, 0xf1, 0xf7, 0xfb, 0xd9, 0x9d, 0xd9, 0x59, 0xc3, 0xaa, 0x8f, 0x11, 0xb2, 0x80, - 0xf5, 0xc6, 0x13, 0xca, 0x29, 0xf9, 0xdf, 0xa5, 0x2c, 0xfc, 0x6c, 0xb3, 0xb0, 0x27, 0x1f, 0x57, - 0x07, 0x0e, 0x72, 0xfb, 0xa0, 0xb9, 0xe9, 0x53, 0x9f, 0x4a, 0x45, 0x5f, 0xbc, 0x25, 0xe2, 0xe6, - 0x0a, 0x8f, 0xc7, 0xa8, 0x9c, 0xcd, 0x1a, 0xbf, 0x4e, 0xde, 0xba, 0x37, 0x3a, 0x34, 0xde, 0x24, - 0xd4, 0x33, 0x6e, 0x73, 0x24, 0xcf, 0xa1, 0x3a, 0xb6, 0x27, 0x76, 0xc8, 0x0c, 0xad, 0xa3, 0xed, - 0xae, 0x1c, 0x6e, 0xf7, 0xfe, 0xba, 0x4a, 0xef, 0xbd, 0x14, 0x99, 0x95, 0x9b, 0x59, 0xbb, 0x64, - 0x29, 0x0b, 0x79, 0x0b, 0xba, 0x4b, 0x3d, 0x64, 0xc6, 0x52, 0xa7, 0xbc, 0xbb, 0x72, 0xb8, 0x55, - 0xe0, 0x7d, 0x45, 0x3d, 0x34, 0x1f, 0x0a, 0xe7, 0xcf, 0x59, 0x7b, 0x4d, 0x3a, 0x9e, 0xd2, 0x30, - 0xe0, 0x18, 0x8e, 0x79, 0x6c, 0x25, 0x08, 0x72, 0x0e, 0x75, 0x97, 0x46, 0x7c, 0x62, 0xbb, 0x9c, - 0x19, 0x65, 0xc9, 0x6b, 0x17, 0xf2, 0x12, 0x9d, 0xb9, 0xa5, 0x98, 0x1b, 0x99, 0x33, 0xc7, 0x5d, - 0xe0, 0x04, 0x9b, 0xe1, 0xa7, 0x29, 0x46, 0x2e, 0x32, 0xa3, 0x72, 0x2f, 0xfb, 0x4c, 0xe9, 0x16, - 0xec, 0xcc, 0x99, 0x67, 0x67, 0x49, 0xe2, 0x40, 0xcd, 0xc7, 0x68, 0x18, 0x32, 0x9f, 0x19, 0xba, - 0x44, 0x3f, 0x29, 0x40, 0xe7, 0xfb, 0x2e, 0x82, 0x53, 0xe6, 0x33, 0xb3, 0xa9, 0x96, 0x21, 0x29, - 0x24, 0xb7, 0xca, 0xb2, 0x9f, 0x88, 0x9a, 0x5f, 0x97, 0x60, 0x59, 0x19, 0xc8, 0x11, 0x00, 0xe3, - 0x74, 0x82, 0x43, 0xd1, 0x36, 0x75, 0x68, 0x3b, 0x05, 0x2b, 0x9e, 0x32, 0xff, 0x4c, 0x68, 0xc5, - 0x01, 0x1c, 0x97, 0xac, 0x3a, 0x4b, 0x03, 0xe2, 0xc0, 0x66, 0x10, 0x31, 0x6e, 0x47, 0x3c, 0xb0, - 0xb9, 0x60, 0x25, 0xad, 0x32, 0x96, 0x24, 0x6f, 0xbf, 0x98, 0x37, 0x58, 0xb8, 0xd2, 0x63, 0x38, - 0x2e, 0x59, 0x1b, 0xc1, 0x9f, 0x69, 0xf2, 0x01, 0xd6, 0xf1, 0x1a, 0xdd, 0x69, 0x9e, 0x5f, 0x96, - 0xfc, 0xbd, 0x62, 0xfe, 0xeb, 0xc4, 0x91, 0x63, 0xaf, 0xe1, 0xef, 0x29, 0x53, 0x87, 0x32, 0x9b, - 0x86, 0xdd, 0x6f, 0x1a, 0x54, 0x64, 0x2d, 0x3b, 0xb0, 0x2c, 0x7a, 0x31, 0x0c, 0x3c, 0xd9, 0x8e, - 0x8a, 0x09, 0xf3, 0x59, 0xbb, 0x2a, 0x3e, 0x0d, 0x8e, 0xac, 0xaa, 0xf8, 0x34, 0xf0, 0x88, 0x29, - 0xc6, 0x4b, 0x88, 0xa2, 0x0b, 0xaa, 0xaa, 0x6c, 0xdf, 0x33, 0xae, 0x83, 0xe8, 0x82, 0xaa, 0x61, - 0xaf, 0xb9, 0x2a, 0x26, 0xdb, 0x00, 0x92, 0xe1, 0xc4, 0x1c, 0x99, 0x2c, 0xa5, 0x61, 0x49, 0xaa, - 0x29, 0x12, 0xe4, 0x01, 0x54, 0xc7, 0x41, 0x14, 0xa1, 0x67, 0x54, 0x3a, 0xda, 0x6e, 0xcd, 0x52, - 0x51, 0xf7, 0x56, 0x83, 0x5a, 0xd6, 0x94, 0x3d, 0x58, 0x4f, 0x9b, 0x31, 0xb4, 0x3d, 0x6f, 0x82, - 0x2c, 0xb9, 0x79, 0x75, 0x6b, 0x2d, 0xcd, 0xbf, 0x4c, 0xd2, 0xe4, 0x1d, 0xac, 0x66, 0xd2, 0xdc, - 0xb6, 0x77, 0xfe, 0x71, 0x2b, 0x72, 0x5b, 0x6f, 0xb8, 0xb9, 0x1c, 0x19, 0xc0, 0x7f, 0x19, 0x8f, - 0x89, 0x21, 0x54, 0xd7, 0xec, 0x51, 0xd1, 0x69, 0x50, 0x0f, 0x47, 0x8a, 0x94, 0xed, 0x44, 0x4e, - 0x6f, 0xd7, 0x84, 0x5a, 0x7a, 0x51, 0x48, 0x07, 0xaa, 0x81, 0x37, 0xbc, 0xc4, 0x58, 0xd6, 0xd1, - 0x30, 0xeb, 0xf3, 0x59, 0x5b, 0x1f, 0x1c, 0x9d, 0x60, 0x6c, 0xe9, 0x81, 0x77, 0x82, 0x31, 0xd9, - 0x04, 0xfd, 0xca, 0x1e, 0x4d, 0x51, 0x16, 0x50, 0xb1, 0x92, 0xc0, 0x7c, 0x71, 0x33, 0x6f, 0x69, - 0xb7, 0xf3, 0x96, 0xf6, 0x63, 0xde, 0xd2, 0xbe, 0xdc, 0xb5, 0x4a, 0xb7, 0x77, 0xad, 0xd2, 0xf7, - 0xbb, 0x56, 0xe9, 0xfc, 0xb1, 0x1f, 0xf0, 0x8f, 0x53, 0xa7, 0xe7, 0xd2, 0xb0, 0x3f, 0x0a, 0x22, - 0xec, 0x8f, 0x2e, 0x9c, 0x7d, 0xe6, 0x5d, 0xf6, 0xaf, 0xfb, 0x62, 0x83, 0x7d, 0xf9, 0x6b, 0x73, - 0xaa, 0xf2, 0x8f, 0xf6, 0xec, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8a, 0xc3, 0x78, 0x56, 0x26, - 0x05, 0x00, 0x00, +func init() { + proto.RegisterFile("cosmwasm/wasm/v1beta1/genesis.proto", fileDescriptor_931ba204ce53afe0) +} + +var fileDescriptor_931ba204ce53afe0 = []byte{ + // 653 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4d, 0x6f, 0xd3, 0x4c, + 0x10, 0xc7, 0xe3, 0x26, 0x4e, 0x93, 0x69, 0x9e, 0xa7, 0xd5, 0xb6, 0xcf, 0x83, 0x95, 0x52, 0x27, + 0x24, 0x1c, 0x5a, 0x41, 0x13, 0xb5, 0x1c, 0x91, 0x90, 0x30, 0x45, 0x34, 0x54, 0x45, 0xc8, 0x95, + 0x38, 0xf4, 0x12, 0xf9, 0x65, 0x6a, 0xac, 0xc6, 0xde, 0x90, 0xdd, 0x94, 0xe6, 0x5b, 0x20, 0x3e, + 0x04, 0x9f, 0xa5, 0xc7, 0x1e, 0x39, 0x45, 0x28, 0xbd, 0xf1, 0x29, 0xd0, 0xae, 0xd7, 0xae, 0x11, + 0x75, 0xb9, 0x58, 0x9e, 0xd9, 0xff, 0xfc, 0x76, 0x66, 0x76, 0x76, 0xa1, 0xeb, 0x51, 0x16, 0x7d, + 0x76, 0x58, 0xd4, 0x97, 0x9f, 0x8b, 0x3d, 0x17, 0xb9, 0xb3, 0xd7, 0x0f, 0x30, 0x46, 0x16, 0xb2, + 0xde, 0x78, 0x42, 0x39, 0x25, 0xff, 0xa5, 0xa2, 0x9e, 0xfc, 0x28, 0x51, 0x73, 0x23, 0xa0, 0x01, + 0x95, 0x8a, 0xbe, 0xf8, 0x4b, 0xc4, 0xcd, 0x47, 0x77, 0x13, 0xf9, 0x6c, 0x8c, 0x8a, 0xd7, 0x34, + 0x0b, 0x24, 0x97, 0xc9, 0x7a, 0xe7, 0x4a, 0x87, 0xc6, 0x9b, 0x24, 0x83, 0x13, 0xee, 0x70, 0x24, + 0xcf, 0xa1, 0x3a, 0x76, 0x26, 0x4e, 0xc4, 0x0c, 0xad, 0xad, 0x6d, 0xaf, 0xec, 0x6f, 0xf5, 0xee, + 0xcc, 0xa8, 0xf7, 0x5e, 0x8a, 0xac, 0xca, 0xd5, 0xbc, 0x55, 0xb2, 0x55, 0x08, 0x79, 0x0b, 0xba, + 0x47, 0x7d, 0x64, 0xc6, 0x52, 0xbb, 0xbc, 0xbd, 0xb2, 0xbf, 0x59, 0x10, 0xfb, 0x8a, 0xfa, 0x68, + 0x3d, 0x10, 0x91, 0x3f, 0xe7, 0xad, 0x55, 0x19, 0xf1, 0x94, 0x46, 0x21, 0xc7, 0x68, 0xcc, 0x67, + 0x76, 0x82, 0x20, 0xa7, 0x50, 0xf7, 0x68, 0xcc, 0x27, 0x8e, 0xc7, 0x99, 0x51, 0x96, 0xbc, 0x56, + 0x21, 0x2f, 0xd1, 0x59, 0x9b, 0x8a, 0xb9, 0x9e, 0x45, 0xe6, 0xb8, 0xb7, 0x38, 0xc1, 0x66, 0xf8, + 0x69, 0x8a, 0xb1, 0x87, 0xcc, 0xa8, 0xdc, 0xcb, 0x3e, 0x51, 0xba, 0x5b, 0x76, 0x16, 0x99, 0x67, + 0x67, 0x4e, 0xe2, 0x42, 0x2d, 0xc0, 0x78, 0x18, 0xb1, 0x80, 0x19, 0xba, 0x44, 0x3f, 0x29, 0x40, + 0xe7, 0xfb, 0x2e, 0x8c, 0x63, 0x16, 0x30, 0xab, 0xa9, 0xb6, 0x21, 0x29, 0x24, 0xb7, 0xcb, 0x72, + 0x90, 0x88, 0x9a, 0x5f, 0x97, 0x60, 0x59, 0x05, 0x90, 0x03, 0x00, 0xc6, 0xe9, 0x04, 0x87, 0xa2, + 0x6d, 0xea, 0xd0, 0xba, 0x05, 0x3b, 0x1e, 0xb3, 0xe0, 0x44, 0x68, 0xc5, 0x01, 0x1c, 0x96, 0xec, + 0x3a, 0x4b, 0x0d, 0xe2, 0xc2, 0x46, 0x18, 0x33, 0xee, 0xc4, 0x3c, 0x74, 0xb8, 0x60, 0x25, 0xad, + 0x32, 0x96, 0x24, 0x6f, 0xb7, 0x98, 0x37, 0xb8, 0x8d, 0x4a, 0x8f, 0xe1, 0xb0, 0x64, 0xaf, 0x87, + 0x7f, 0xba, 0xc9, 0x07, 0x58, 0xc3, 0x4b, 0xf4, 0xa6, 0x79, 0x7e, 0x59, 0xf2, 0x77, 0x8a, 0xf9, + 0xaf, 0x93, 0x88, 0x1c, 0x7b, 0x15, 0x7f, 0x77, 0x59, 0x3a, 0x94, 0xd9, 0x34, 0xea, 0x7c, 0xd3, + 0xa0, 0x22, 0x6b, 0xe9, 0xc2, 0xb2, 0xe8, 0xc5, 0x30, 0xf4, 0x65, 0x3b, 0x2a, 0x16, 0x2c, 0xe6, + 0xad, 0xaa, 0x58, 0x1a, 0x1c, 0xd8, 0x55, 0xb1, 0x34, 0xf0, 0x89, 0x25, 0xc6, 0x4b, 0x88, 0xe2, + 0x33, 0xaa, 0xaa, 0x6c, 0xdd, 0x33, 0xae, 0x83, 0xf8, 0x8c, 0xaa, 0x61, 0xaf, 0x79, 0xca, 0x26, + 0x5b, 0x00, 0x92, 0xe1, 0xce, 0x38, 0x32, 0x59, 0x4a, 0xc3, 0x96, 0x54, 0x4b, 0x38, 0xc8, 0xff, + 0x50, 0x1d, 0x87, 0x71, 0x8c, 0xbe, 0x51, 0x69, 0x6b, 0xdb, 0x35, 0x5b, 0x59, 0x9d, 0x6b, 0x0d, + 0x6a, 0x59, 0x53, 0x76, 0x60, 0x2d, 0x6d, 0xc6, 0xd0, 0xf1, 0xfd, 0x09, 0xb2, 0xe4, 0xe6, 0xd5, + 0xed, 0xd5, 0xd4, 0xff, 0x32, 0x71, 0x93, 0x77, 0xf0, 0x4f, 0x26, 0xcd, 0xa5, 0xdd, 0xfd, 0xcb, + 0xad, 0xc8, 0xa5, 0xde, 0xf0, 0x72, 0x3e, 0x32, 0x80, 0x7f, 0x33, 0x1e, 0x13, 0x43, 0xa8, 0xae, + 0xd9, 0xc3, 0xa2, 0xd3, 0xa0, 0x3e, 0x8e, 0x14, 0x29, 0xcb, 0x44, 0x4e, 0x6f, 0xc7, 0x82, 0x5a, + 0x7a, 0x51, 0x48, 0x1b, 0xaa, 0xa1, 0x3f, 0x3c, 0xc7, 0x99, 0xac, 0xa3, 0x61, 0xd5, 0x17, 0xf3, + 0x96, 0x3e, 0x38, 0x38, 0xc2, 0x99, 0xad, 0x87, 0xfe, 0x11, 0xce, 0xc8, 0x06, 0xe8, 0x17, 0xce, + 0x68, 0x8a, 0xb2, 0x80, 0x8a, 0x9d, 0x18, 0xd6, 0x8b, 0xab, 0x85, 0xa9, 0x5d, 0x2f, 0x4c, 0xed, + 0xc7, 0xc2, 0xd4, 0xbe, 0xdc, 0x98, 0xa5, 0xeb, 0x1b, 0xb3, 0xf4, 0xfd, 0xc6, 0x2c, 0x9d, 0x3e, + 0x0e, 0x42, 0xfe, 0x71, 0xea, 0xf6, 0x3c, 0x1a, 0xf5, 0x47, 0x61, 0x8c, 0xfd, 0xd1, 0x99, 0xbb, + 0xcb, 0xfc, 0xf3, 0xfe, 0x65, 0xf2, 0xaa, 0xc9, 0x07, 0xcf, 0xad, 0xca, 0x17, 0xed, 0xd9, 0xaf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xff, 0x86, 0xe2, 0x68, 0x05, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/wasm/types/ibc.pb.go b/x/wasm/types/ibc.pb.go index f3e44edd33..e59d7b233e 100644 --- a/x/wasm/types/ibc.pb.go +++ b/x/wasm/types/ibc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ibc.proto +// source: cosmwasm/wasm/v1beta1/ibc.proto package types @@ -42,7 +42,7 @@ func (m *MsgIBCSend) Reset() { *m = MsgIBCSend{} } func (m *MsgIBCSend) String() string { return proto.CompactTextString(m) } func (*MsgIBCSend) ProtoMessage() {} func (*MsgIBCSend) Descriptor() ([]byte, []int) { - return fileDescriptor_a85b3c622f5831ad, []int{0} + return fileDescriptor_62898492b0dd5f88, []int{0} } func (m *MsgIBCSend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -80,7 +80,7 @@ func (m *MsgIBCCloseChannel) Reset() { *m = MsgIBCCloseChannel{} } func (m *MsgIBCCloseChannel) String() string { return proto.CompactTextString(m) } func (*MsgIBCCloseChannel) ProtoMessage() {} func (*MsgIBCCloseChannel) Descriptor() ([]byte, []int) { - return fileDescriptor_a85b3c622f5831ad, []int{1} + return fileDescriptor_62898492b0dd5f88, []int{1} } func (m *MsgIBCCloseChannel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -114,31 +114,31 @@ func init() { proto.RegisterType((*MsgIBCCloseChannel)(nil), "cosmwasm.wasm.v1beta1.MsgIBCCloseChannel") } -func init() { proto.RegisterFile("ibc.proto", fileDescriptor_a85b3c622f5831ad) } +func init() { proto.RegisterFile("cosmwasm/wasm/v1beta1/ibc.proto", fileDescriptor_62898492b0dd5f88) } -var fileDescriptor_a85b3c622f5831ad = []byte{ - // 329 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0x3f, 0x4f, 0xc2, 0x40, - 0x18, 0xc6, 0x5b, 0x82, 0x18, 0x2e, 0x6a, 0xb4, 0x91, 0xa4, 0x1a, 0x72, 0x90, 0xc6, 0x81, 0xc5, - 0x9e, 0x84, 0xcd, 0xc9, 0x94, 0x45, 0x06, 0x96, 0xea, 0xe4, 0x42, 0xae, 0xed, 0xeb, 0xb5, 0xda, - 0xde, 0x11, 0xee, 0x10, 0xd9, 0xfc, 0x08, 0x7e, 0x2c, 0x46, 0x46, 0x27, 0xa2, 0xf0, 0x0d, 0x18, - 0x9d, 0x0c, 0x47, 0x6b, 0x64, 0x75, 0xb9, 0x3f, 0xcf, 0xfb, 0xbb, 0x27, 0xb9, 0xe7, 0x41, 0xd5, - 0x24, 0x08, 0xdd, 0xe1, 0x48, 0x28, 0x61, 0xd5, 0x42, 0x21, 0xb3, 0x09, 0x95, 0x99, 0xab, 0x97, - 0x97, 0x76, 0x00, 0x8a, 0xb6, 0xcf, 0x4f, 0x99, 0x60, 0x42, 0x13, 0x64, 0x73, 0xda, 0xc2, 0xce, - 0x5b, 0x09, 0xa1, 0xbe, 0x64, 0x3d, 0xaf, 0x7b, 0x07, 0x3c, 0xb2, 0x3a, 0x68, 0x3f, 0x8c, 0x29, - 0xe7, 0x90, 0xda, 0xa5, 0xa6, 0xd9, 0xaa, 0x7a, 0x67, 0xeb, 0x45, 0xa3, 0x36, 0xa5, 0x59, 0x7a, - 0xed, 0x48, 0x31, 0x1e, 0x85, 0x30, 0xc8, 0xe7, 0x8e, 0x5f, 0x90, 0xd6, 0x0d, 0x3a, 0x52, 0x49, - 0x06, 0x62, 0xac, 0x06, 0x31, 0x24, 0x2c, 0x56, 0x76, 0xb9, 0x69, 0xb6, 0xca, 0x7f, 0xdf, 0xee, - 0xce, 0x1d, 0xff, 0x30, 0x17, 0x6e, 0xf5, 0xdd, 0xea, 0xa1, 0x93, 0x82, 0xd8, 0xec, 0x52, 0xd1, - 0x6c, 0x68, 0xef, 0x69, 0x93, 0xfa, 0x7a, 0xd1, 0xb0, 0x77, 0x4d, 0x7e, 0x11, 0xc7, 0x3f, 0xce, - 0xb5, 0xfb, 0x42, 0xb2, 0xae, 0x50, 0x39, 0xa2, 0x8a, 0xda, 0x95, 0xa6, 0xd9, 0x3a, 0xf0, 0xea, - 0xdf, 0x8b, 0x86, 0x0d, 0x3c, 0x14, 0x51, 0xc2, 0x19, 0x79, 0x92, 0x82, 0xbb, 0x3e, 0x9d, 0xf4, - 0x41, 0x4a, 0xca, 0xc0, 0xd7, 0xa4, 0xd3, 0x43, 0xd6, 0x36, 0x81, 0x6e, 0x2a, 0x24, 0x74, 0xf3, - 0x4f, 0xfd, 0x27, 0x09, 0xcf, 0x9b, 0x7d, 0x61, 0x63, 0xb6, 0xc4, 0xe6, 0x7c, 0x89, 0xcd, 0xcf, - 0x25, 0x36, 0xdf, 0x57, 0xd8, 0x98, 0xaf, 0xb0, 0xf1, 0xb1, 0xc2, 0xc6, 0xc3, 0x05, 0x4b, 0x54, - 0x3c, 0x0e, 0xdc, 0x50, 0x64, 0x24, 0x4d, 0x38, 0x90, 0xf4, 0x31, 0xb8, 0x94, 0xd1, 0x33, 0x79, - 0x25, 0x9b, 0xa6, 0x88, 0x9a, 0x0e, 0x41, 0x06, 0x15, 0x5d, 0x4c, 0xe7, 0x27, 0x00, 0x00, 0xff, - 0xff, 0xa8, 0xb3, 0xb0, 0xdf, 0xd2, 0x01, 0x00, 0x00, +var fileDescriptor_62898492b0dd5f88 = []byte{ + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x91, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0x93, 0xaa, 0x7f, 0x7f, 0x61, 0x01, 0x82, 0x88, 0x4a, 0x01, 0x55, 0x4e, 0x15, 0x31, + 0x74, 0x21, 0xa6, 0xea, 0xc6, 0x84, 0xd2, 0x85, 0x0e, 0x5d, 0x02, 0x13, 0x4b, 0xe5, 0x24, 0x17, + 0x27, 0x90, 0xd8, 0x55, 0xed, 0x52, 0xba, 0xf1, 0x08, 0x3c, 0x56, 0xc7, 0x8e, 0x4c, 0x15, 0xb4, + 0x6f, 0xd0, 0x91, 0x09, 0xd5, 0x4d, 0x10, 0x5d, 0x59, 0xae, 0xed, 0x73, 0x3f, 0x5f, 0xe9, 0x9e, + 0x83, 0x9c, 0x48, 0xc8, 0x7c, 0x42, 0x65, 0x4e, 0x74, 0x79, 0x6e, 0x87, 0xa0, 0x68, 0x9b, 0xa4, + 0x61, 0xe4, 0x0d, 0x47, 0x42, 0x09, 0xab, 0x5e, 0x02, 0x9e, 0x2e, 0x05, 0x70, 0x76, 0xc2, 0x04, + 0x13, 0x9a, 0x20, 0x9b, 0xdb, 0x16, 0x76, 0x5f, 0x2b, 0x08, 0xf5, 0x25, 0xeb, 0xf9, 0xdd, 0x5b, + 0xe0, 0xb1, 0xd5, 0x41, 0xff, 0xa3, 0x84, 0x72, 0x0e, 0x99, 0x5d, 0x69, 0x9a, 0xad, 0x3d, 0xff, + 0x74, 0xbd, 0x70, 0xea, 0x53, 0x9a, 0x67, 0x57, 0xae, 0x14, 0xe3, 0x51, 0x04, 0x83, 0xa2, 0xef, + 0x06, 0x25, 0x69, 0x5d, 0xa3, 0x43, 0x95, 0xe6, 0x20, 0xc6, 0x6a, 0x90, 0x40, 0xca, 0x12, 0x65, + 0x57, 0x9b, 0x66, 0xab, 0xfa, 0xfb, 0xef, 0x6e, 0xdf, 0x0d, 0x0e, 0x0a, 0xe1, 0x46, 0xbf, 0xad, + 0x1e, 0x3a, 0x2e, 0x89, 0xcd, 0x29, 0x15, 0xcd, 0x87, 0xf6, 0x3f, 0x3d, 0xa4, 0xb1, 0x5e, 0x38, + 0xf6, 0xee, 0x90, 0x1f, 0xc4, 0x0d, 0x8e, 0x0a, 0xed, 0xae, 0x94, 0xac, 0x4b, 0x54, 0x8d, 0xa9, + 0xa2, 0x76, 0xad, 0x69, 0xb6, 0xf6, 0xfd, 0xc6, 0xd7, 0xc2, 0xb1, 0x81, 0x47, 0x22, 0x4e, 0x39, + 0x23, 0x8f, 0x52, 0x70, 0x2f, 0xa0, 0x93, 0x3e, 0x48, 0x49, 0x19, 0x04, 0x9a, 0x74, 0x7b, 0xc8, + 0xda, 0x3a, 0xd0, 0xcd, 0x84, 0x84, 0x6e, 0xb1, 0xd4, 0x5f, 0x9c, 0xf0, 0xfd, 0xd9, 0x27, 0x36, + 0x66, 0x4b, 0x6c, 0xce, 0x97, 0xd8, 0xfc, 0x58, 0x62, 0xf3, 0x6d, 0x85, 0x8d, 0xf9, 0x0a, 0x1b, + 0xef, 0x2b, 0x6c, 0xdc, 0x9f, 0xb3, 0x54, 0x25, 0xe3, 0xd0, 0x8b, 0x44, 0x4e, 0xb2, 0x94, 0x03, + 0xc9, 0x1e, 0xc2, 0x0b, 0x19, 0x3f, 0x91, 0x97, 0x6d, 0x94, 0x6a, 0x3a, 0x04, 0x19, 0xd6, 0x74, + 0x30, 0x9d, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x75, 0x04, 0x35, 0x08, 0xe8, 0x01, 0x00, 0x00, } func (m *MsgIBCSend) Marshal() (dAtA []byte, err error) { diff --git a/x/wasm/types/proposal.pb.go b/x/wasm/types/proposal.pb.go index b6a983bd27..9893f4b5c2 100644 --- a/x/wasm/types/proposal.pb.go +++ b/x/wasm/types/proposal.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proposal.proto +// source: cosmwasm/wasm/v1beta1/proposal.proto package types @@ -47,7 +47,7 @@ type StoreCodeProposal struct { func (m *StoreCodeProposal) Reset() { *m = StoreCodeProposal{} } func (*StoreCodeProposal) ProtoMessage() {} func (*StoreCodeProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{0} + return fileDescriptor_6428c760f8f86eed, []int{0} } func (m *StoreCodeProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -99,7 +99,7 @@ type InstantiateContractProposal struct { func (m *InstantiateContractProposal) Reset() { *m = InstantiateContractProposal{} } func (*InstantiateContractProposal) ProtoMessage() {} func (*InstantiateContractProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{1} + return fileDescriptor_6428c760f8f86eed, []int{1} } func (m *InstantiateContractProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -147,7 +147,7 @@ type MigrateContractProposal struct { func (m *MigrateContractProposal) Reset() { *m = MigrateContractProposal{} } func (*MigrateContractProposal) ProtoMessage() {} func (*MigrateContractProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{2} + return fileDescriptor_6428c760f8f86eed, []int{2} } func (m *MigrateContractProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,7 +191,7 @@ type UpdateAdminProposal struct { func (m *UpdateAdminProposal) Reset() { *m = UpdateAdminProposal{} } func (*UpdateAdminProposal) ProtoMessage() {} func (*UpdateAdminProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{3} + return fileDescriptor_6428c760f8f86eed, []int{3} } func (m *UpdateAdminProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -233,7 +233,7 @@ type ClearAdminProposal struct { func (m *ClearAdminProposal) Reset() { *m = ClearAdminProposal{} } func (*ClearAdminProposal) ProtoMessage() {} func (*ClearAdminProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{4} + return fileDescriptor_6428c760f8f86eed, []int{4} } func (m *ClearAdminProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -275,7 +275,7 @@ type PinCodesProposal struct { func (m *PinCodesProposal) Reset() { *m = PinCodesProposal{} } func (*PinCodesProposal) ProtoMessage() {} func (*PinCodesProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{5} + return fileDescriptor_6428c760f8f86eed, []int{5} } func (m *PinCodesProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -317,7 +317,7 @@ type UnpinCodesProposal struct { func (m *UnpinCodesProposal) Reset() { *m = UnpinCodesProposal{} } func (*UnpinCodesProposal) ProtoMessage() {} func (*UnpinCodesProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{6} + return fileDescriptor_6428c760f8f86eed, []int{6} } func (m *UnpinCodesProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -361,7 +361,7 @@ type UpdateContractStatusProposal struct { func (m *UpdateContractStatusProposal) Reset() { *m = UpdateContractStatusProposal{} } func (*UpdateContractStatusProposal) ProtoMessage() {} func (*UpdateContractStatusProposal) Descriptor() ([]byte, []int) { - return fileDescriptor_c3ac5ce23bf32d05, []int{7} + return fileDescriptor_6428c760f8f86eed, []int{7} } func (m *UpdateContractStatusProposal) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -401,56 +401,58 @@ func init() { proto.RegisterType((*UpdateContractStatusProposal)(nil), "cosmwasm.wasm.v1beta1.UpdateContractStatusProposal") } -func init() { proto.RegisterFile("proposal.proto", fileDescriptor_c3ac5ce23bf32d05) } - -var fileDescriptor_c3ac5ce23bf32d05 = []byte{ - // 730 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xdd, 0x6a, 0x1b, 0x47, - 0x14, 0xd6, 0x5a, 0xd6, 0x4a, 0x1e, 0x09, 0x57, 0xdd, 0xca, 0xea, 0xd6, 0x2e, 0xbb, 0x62, 0xdd, - 0x16, 0x41, 0xa9, 0x16, 0xbb, 0x50, 0xda, 0x42, 0x2f, 0xb4, 0xea, 0x8d, 0x0b, 0x02, 0xb3, 0xc6, - 0x94, 0xfa, 0x46, 0xec, 0xcf, 0x68, 0x3d, 0x74, 0x77, 0x66, 0xd9, 0x19, 0xd5, 0xd5, 0x5b, 0xe4, - 0x01, 0xf2, 0x00, 0x26, 0x37, 0x21, 0xe4, 0x25, 0x4c, 0xae, 0x7c, 0xe9, 0xab, 0x4d, 0x2c, 0xbf, - 0x81, 0x9e, 0x20, 0xcc, 0xcc, 0x4a, 0x91, 0x83, 0x1d, 0x02, 0x89, 0x03, 0xb9, 0x11, 0xfa, 0xe6, - 0x9c, 0x39, 0xdf, 0x77, 0xbe, 0x73, 0x34, 0x02, 0x9b, 0x69, 0x46, 0x52, 0x42, 0xbd, 0xb8, 0x97, - 0x66, 0x84, 0x11, 0x6d, 0x2b, 0x20, 0x34, 0x39, 0xf3, 0x68, 0xd2, 0x13, 0x1f, 0xff, 0xed, 0xf9, - 0x90, 0x79, 0x7b, 0xdb, 0xad, 0x88, 0x44, 0x44, 0x64, 0xd8, 0xfc, 0x9b, 0x4c, 0xde, 0xde, 0x89, - 0xc7, 0xbe, 0xed, 0x7b, 0x14, 0xda, 0x45, 0x9e, 0x1d, 0x10, 0x84, 0x8b, 0x60, 0x9d, 0x4d, 0x53, - 0x48, 0x25, 0xb0, 0xce, 0xd7, 0xc0, 0x97, 0x47, 0x8c, 0x64, 0x70, 0x40, 0x42, 0x78, 0x58, 0x50, - 0x6a, 0x2d, 0x50, 0x61, 0x88, 0xc5, 0x50, 0x57, 0x3a, 0x4a, 0x77, 0xc3, 0x95, 0x40, 0xeb, 0x80, - 0x7a, 0x08, 0x69, 0x90, 0xa1, 0x94, 0x21, 0x82, 0xf5, 0x35, 0x11, 0x5b, 0x3d, 0xd2, 0xb6, 0x80, - 0x9a, 0x4d, 0xf0, 0xc8, 0xa3, 0x7a, 0x59, 0x5e, 0xcc, 0x26, 0xb8, 0x4f, 0xb5, 0x5f, 0xc0, 0x26, - 0x17, 0x3d, 0xf2, 0xa7, 0x0c, 0x8e, 0x02, 0x12, 0x42, 0x7d, 0xbd, 0xa3, 0x74, 0x1b, 0x4e, 0x73, - 0x96, 0x9b, 0x8d, 0xbf, 0xfb, 0x47, 0x43, 0x67, 0xca, 0x84, 0x00, 0xb7, 0xc1, 0xf3, 0x16, 0x48, - 0x6b, 0x03, 0x95, 0x92, 0x49, 0x16, 0x40, 0xbd, 0x22, 0xca, 0x15, 0x48, 0xd3, 0x41, 0xd5, 0x9f, - 0xa0, 0x38, 0x84, 0x99, 0xae, 0x8a, 0xc0, 0x02, 0x6a, 0x27, 0xa0, 0x8d, 0x30, 0x65, 0x1e, 0x66, - 0xc8, 0x63, 0x70, 0x94, 0xc2, 0x2c, 0x41, 0x94, 0x72, 0xb5, 0xd5, 0x8e, 0xd2, 0xad, 0xef, 0xef, - 0xf6, 0xee, 0xb4, 0xb1, 0xd7, 0x0f, 0x02, 0x48, 0xe9, 0x80, 0xe0, 0x31, 0x8a, 0xdc, 0xad, 0x95, - 0x12, 0x87, 0xcb, 0x0a, 0xd6, 0xf3, 0x35, 0xb0, 0x73, 0xf0, 0x26, 0x32, 0x20, 0x98, 0x65, 0x5e, - 0xc0, 0x1e, 0xca, 0xb4, 0x16, 0xa8, 0x78, 0x61, 0x82, 0xb0, 0xf0, 0x6a, 0xc3, 0x95, 0x40, 0xdb, - 0x05, 0x55, 0x6e, 0xe0, 0x08, 0x85, 0xc2, 0x93, 0x75, 0x07, 0xcc, 0x72, 0x53, 0xe5, 0x6e, 0x1d, - 0xfc, 0xe9, 0xaa, 0x3c, 0x74, 0x10, 0xf2, 0xab, 0xb1, 0xe7, 0xc3, 0xb8, 0x70, 0x47, 0x02, 0xed, - 0x1b, 0x50, 0x43, 0x18, 0xb1, 0x51, 0x42, 0x23, 0xe1, 0x46, 0xc3, 0xad, 0x72, 0x3c, 0xa4, 0x91, - 0xf6, 0x0f, 0xa8, 0x8c, 0x27, 0x38, 0xa4, 0x7a, 0xad, 0x53, 0xee, 0xd6, 0xf7, 0xdb, 0xbd, 0x78, - 0xec, 0xf7, 0xf8, 0xfe, 0x2c, 0x0d, 0x1a, 0x10, 0x84, 0x9d, 0x1f, 0x2f, 0x72, 0xb3, 0xf4, 0xe4, - 0xa5, 0xb9, 0x1b, 0x21, 0x76, 0x3a, 0xf1, 0x7b, 0x01, 0x49, 0xec, 0x18, 0x61, 0x68, 0xc7, 0x63, - 0xff, 0x27, 0x1a, 0xfe, 0x6b, 0xcb, 0xcd, 0xe2, 0xb9, 0xd4, 0x95, 0x15, 0xad, 0x17, 0x0a, 0xf8, - 0x7a, 0x88, 0xa2, 0xec, 0x13, 0x38, 0xb6, 0x0d, 0x6a, 0x41, 0x41, 0x51, 0x98, 0xb6, 0xc4, 0xef, - 0xe7, 0x9b, 0x09, 0xea, 0x89, 0x94, 0x2a, 0x4c, 0x52, 0x85, 0x49, 0xa0, 0x38, 0x1a, 0xd2, 0xc8, - 0x7a, 0xac, 0x80, 0xaf, 0x8e, 0xd3, 0xd0, 0x63, 0xb0, 0xcf, 0xa7, 0xf1, 0xc1, 0x8d, 0xec, 0x81, - 0x0d, 0x0c, 0xcf, 0x46, 0x72, 0xce, 0xa2, 0x17, 0xa7, 0x35, 0xcf, 0xcd, 0xe6, 0xd4, 0x4b, 0xe2, - 0xdf, 0xad, 0x65, 0xc8, 0x72, 0x6b, 0x18, 0x9e, 0x09, 0xca, 0x77, 0x35, 0x69, 0x9d, 0x02, 0x6d, - 0x10, 0x43, 0x2f, 0xfb, 0x38, 0xe2, 0x56, 0x99, 0xca, 0x6f, 0x31, 0x3d, 0x55, 0x40, 0xf3, 0x10, - 0x61, 0xee, 0x1f, 0x5d, 0x12, 0xfd, 0x70, 0x8b, 0xc8, 0x69, 0xce, 0x73, 0xb3, 0x21, 0x3b, 0x11, - 0xc7, 0xd6, 0x82, 0xfa, 0xd7, 0x3b, 0xa8, 0x9d, 0xf6, 0x3c, 0x37, 0x35, 0x99, 0xbd, 0x12, 0xb4, - 0x6e, 0x4b, 0xfa, 0x8d, 0x4b, 0x12, 0x53, 0xe4, 0xa3, 0x2f, 0x77, 0xd7, 0x1d, 0x63, 0x96, 0x9b, - 0x55, 0x39, 0x46, 0x3a, 0xcf, 0xcd, 0x2f, 0x64, 0x85, 0x45, 0x92, 0xe5, 0x56, 0xe5, 0x68, 0xa9, - 0xf5, 0x4c, 0x01, 0xda, 0x31, 0x4e, 0x3f, 0x37, 0xcd, 0xdf, 0xca, 0x75, 0x5b, 0xfc, 0x74, 0x8e, - 0x98, 0xc7, 0x26, 0xf4, 0x21, 0x47, 0xab, 0xfd, 0x01, 0x54, 0x2a, 0x58, 0xc4, 0x7a, 0x6d, 0xee, - 0x7f, 0x7f, 0xcf, 0x93, 0x79, 0x5b, 0x92, 0x5b, 0x5c, 0x72, 0xfe, 0xba, 0xb8, 0x36, 0x4a, 0x57, - 0xd7, 0x46, 0xe9, 0x7c, 0x66, 0x28, 0x17, 0x33, 0x43, 0xb9, 0x9c, 0x19, 0xca, 0xab, 0x99, 0xa1, - 0x3c, 0xba, 0x31, 0x4a, 0x97, 0x37, 0x46, 0xe9, 0xea, 0xc6, 0x28, 0x9d, 0x7c, 0x77, 0xdf, 0x0b, - 0xf2, 0xbf, 0xcd, 0x49, 0xe4, 0x43, 0xe2, 0xab, 0xe2, 0x3f, 0xea, 0xe7, 0xd7, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x51, 0x2c, 0x3e, 0xdd, 0x0c, 0x07, 0x00, 0x00, +func init() { + proto.RegisterFile("cosmwasm/wasm/v1beta1/proposal.proto", fileDescriptor_6428c760f8f86eed) +} + +var fileDescriptor_6428c760f8f86eed = []byte{ + // 735 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, + 0x14, 0x8e, 0x9b, 0xc6, 0x49, 0x27, 0x51, 0x6f, 0xae, 0x6f, 0x9a, 0x6b, 0x5a, 0x64, 0x07, 0xb7, + 0xa0, 0x48, 0x88, 0x44, 0x2d, 0x12, 0x02, 0x24, 0x16, 0x71, 0xd8, 0x14, 0x29, 0x52, 0xe5, 0xaa, + 0x42, 0x74, 0x13, 0xf9, 0x67, 0xe2, 0x8e, 0xb0, 0x67, 0x2c, 0xcf, 0x84, 0x92, 0xb7, 0xe0, 0x01, + 0x78, 0x80, 0x8a, 0x0d, 0x42, 0xbc, 0x44, 0xc5, 0xaa, 0xcb, 0xae, 0x0c, 0x4d, 0xdf, 0x20, 0x4f, + 0x80, 0x3c, 0xe3, 0x84, 0x14, 0xb5, 0x08, 0x09, 0x8a, 0xc4, 0xc6, 0xca, 0x99, 0xf3, 0xcd, 0xf9, + 0xbe, 0xf9, 0xce, 0xc9, 0x0c, 0xd8, 0x70, 0x09, 0x0d, 0x0f, 0x6d, 0x1a, 0xb6, 0xf9, 0xe7, 0xd5, + 0xa6, 0x03, 0x99, 0xbd, 0xd9, 0x8e, 0x62, 0x12, 0x11, 0x6a, 0x07, 0xad, 0x28, 0x26, 0x8c, 0x28, + 0x2b, 0x53, 0x54, 0x8b, 0x7f, 0x32, 0xd4, 0x6a, 0xcd, 0x27, 0x3e, 0xe1, 0x88, 0x76, 0xfa, 0x4b, + 0x80, 0x57, 0xd7, 0x82, 0x81, 0xd3, 0x76, 0x6c, 0x0a, 0x67, 0xd5, 0x5c, 0x82, 0x70, 0x96, 0xbc, + 0x75, 0x39, 0x1f, 0x1b, 0x45, 0x90, 0x0a, 0x88, 0x71, 0xb4, 0x00, 0xfe, 0xdd, 0x65, 0x24, 0x86, + 0x5d, 0xe2, 0xc1, 0x9d, 0x4c, 0x88, 0x52, 0x03, 0x05, 0x86, 0x58, 0x00, 0x55, 0xa9, 0x21, 0x35, + 0x97, 0x2c, 0x11, 0x28, 0x0d, 0x50, 0xf6, 0x20, 0x75, 0x63, 0x14, 0x31, 0x44, 0xb0, 0xba, 0xc0, + 0x73, 0xf3, 0x4b, 0xca, 0x0a, 0x90, 0xe3, 0x21, 0xee, 0xdb, 0x54, 0xcd, 0x8b, 0x8d, 0xf1, 0x10, + 0x77, 0xa8, 0xf2, 0x00, 0x2c, 0xa7, 0x02, 0xfa, 0xce, 0x88, 0xc1, 0xbe, 0x4b, 0x3c, 0xa8, 0x2e, + 0x36, 0xa4, 0x66, 0xc5, 0xac, 0x8e, 0x13, 0xbd, 0xf2, 0xbc, 0xb3, 0xdb, 0x33, 0x47, 0x8c, 0x0b, + 0xb0, 0x2a, 0x29, 0x6e, 0x1a, 0x29, 0x75, 0x20, 0x53, 0x32, 0x8c, 0x5d, 0xa8, 0x16, 0x78, 0xb9, + 0x2c, 0x52, 0x54, 0x50, 0x74, 0x86, 0x28, 0xf0, 0x60, 0xac, 0xca, 0x3c, 0x31, 0x0d, 0x95, 0x7d, + 0x50, 0x47, 0x98, 0x32, 0x1b, 0x33, 0x64, 0x33, 0xd8, 0x8f, 0x60, 0x1c, 0x22, 0x4a, 0x53, 0xb5, + 0xc5, 0x86, 0xd4, 0x2c, 0x6f, 0xad, 0xb7, 0x2e, 0x35, 0xb7, 0xd5, 0x71, 0x5d, 0x48, 0x69, 0x97, + 0xe0, 0x01, 0xf2, 0xad, 0x95, 0xb9, 0x12, 0x3b, 0xb3, 0x0a, 0xc6, 0xc7, 0x05, 0xb0, 0xb6, 0xfd, + 0x2d, 0xd3, 0x25, 0x98, 0xc5, 0xb6, 0xcb, 0xae, 0xcb, 0xb4, 0x1a, 0x28, 0xd8, 0x5e, 0x88, 0x30, + 0xf7, 0x6a, 0xc9, 0x12, 0x81, 0xb2, 0x0e, 0x8a, 0xa9, 0x81, 0x7d, 0xe4, 0x71, 0x4f, 0x16, 0x4d, + 0x30, 0x4e, 0x74, 0x39, 0x75, 0x6b, 0xfb, 0xa9, 0x25, 0xa7, 0xa9, 0x6d, 0x2f, 0xdd, 0x1a, 0xd8, + 0x0e, 0x0c, 0x32, 0x77, 0x44, 0xa0, 0xdc, 0x00, 0x25, 0x84, 0x11, 0xeb, 0x87, 0xd4, 0xe7, 0x6e, + 0x54, 0xac, 0x62, 0x1a, 0xf7, 0xa8, 0xaf, 0xbc, 0x00, 0x85, 0xc1, 0x10, 0x7b, 0x54, 0x2d, 0x35, + 0xf2, 0xcd, 0xf2, 0x56, 0xbd, 0x15, 0x0c, 0x9c, 0x56, 0x3a, 0x55, 0x33, 0x83, 0xba, 0x04, 0x61, + 0xf3, 0xee, 0x71, 0xa2, 0xe7, 0xde, 0x7d, 0xd6, 0xd7, 0x7d, 0xc4, 0x0e, 0x86, 0x4e, 0xcb, 0x25, + 0x61, 0x3b, 0x40, 0x18, 0xb6, 0x83, 0x81, 0x73, 0x8f, 0x7a, 0x2f, 0xb3, 0xc9, 0x4a, 0xb1, 0xd4, + 0x12, 0x15, 0x8d, 0x4f, 0x12, 0xf8, 0xbf, 0x87, 0xfc, 0xf8, 0x0f, 0x38, 0xb6, 0x0a, 0x4a, 0x6e, + 0x46, 0x91, 0x99, 0x36, 0x8b, 0x7f, 0xce, 0x37, 0x1d, 0x94, 0x43, 0x21, 0x95, 0x9b, 0x24, 0x73, + 0x93, 0x40, 0xb6, 0xd4, 0xa3, 0xbe, 0xf1, 0x56, 0x02, 0xff, 0xed, 0x45, 0x9e, 0xcd, 0x60, 0x27, + 0xed, 0xc6, 0x2f, 0x1f, 0x64, 0x13, 0x2c, 0x61, 0x78, 0xd8, 0x17, 0x7d, 0xe6, 0x67, 0x31, 0x6b, + 0x93, 0x44, 0xaf, 0x8e, 0xec, 0x30, 0x78, 0x6c, 0xcc, 0x52, 0x86, 0x55, 0xc2, 0xf0, 0x90, 0x53, + 0xfe, 0xe8, 0x90, 0xc6, 0x01, 0x50, 0xba, 0x01, 0xb4, 0xe3, 0xdf, 0x23, 0x6e, 0x9e, 0x29, 0xff, + 0x1d, 0xd3, 0x7b, 0x09, 0x54, 0x77, 0x10, 0x4e, 0xfd, 0xa3, 0x33, 0xa2, 0x3b, 0x17, 0x88, 0xcc, + 0xea, 0x24, 0xd1, 0x2b, 0xe2, 0x24, 0x7c, 0xd9, 0x98, 0x52, 0x3f, 0xbc, 0x84, 0xda, 0xac, 0x4f, + 0x12, 0x5d, 0x11, 0xe8, 0xb9, 0xa4, 0x71, 0x51, 0xd2, 0xa3, 0x54, 0x12, 0xef, 0x62, 0xda, 0xfa, + 0x7c, 0x73, 0xd1, 0xd4, 0xc6, 0x89, 0x5e, 0x14, 0x6d, 0xa4, 0x93, 0x44, 0xff, 0x47, 0x54, 0x98, + 0x82, 0x0c, 0xab, 0x28, 0x5a, 0x4b, 0x8d, 0x0f, 0x12, 0x50, 0xf6, 0x70, 0xf4, 0xb7, 0x69, 0xbe, + 0x29, 0xc6, 0x6d, 0xfa, 0xd7, 0xd9, 0x65, 0x36, 0x1b, 0xd2, 0xeb, 0x6c, 0xad, 0xf2, 0x04, 0xc8, + 0x94, 0xb3, 0xf0, 0xf1, 0x5a, 0xde, 0xba, 0x7d, 0xc5, 0x95, 0x79, 0x51, 0x92, 0x95, 0x6d, 0x32, + 0x9f, 0x1d, 0x9f, 0x69, 0xb9, 0xd3, 0x33, 0x2d, 0x77, 0x34, 0xd6, 0xa4, 0xe3, 0xb1, 0x26, 0x9d, + 0x8c, 0x35, 0xe9, 0xcb, 0x58, 0x93, 0xde, 0x9c, 0x6b, 0xb9, 0x93, 0x73, 0x2d, 0x77, 0x7a, 0xae, + 0xe5, 0xf6, 0x37, 0xae, 0xba, 0x41, 0x5e, 0x8b, 0xa7, 0x8a, 0x5f, 0x24, 0x8e, 0xcc, 0xdf, 0xa8, + 0xfb, 0x5f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x0e, 0x49, 0x91, 0x38, 0x07, 0x00, 0x00, } func (this *StoreCodeProposal) Equal(that interface{}) bool { diff --git a/x/wasm/types/query.pb.go b/x/wasm/types/query.pb.go index 852dc44814..64736aa078 100644 --- a/x/wasm/types/query.pb.go +++ b/x/wasm/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: query.proto +// source: cosmwasm/wasm/v1beta1/query.proto package types @@ -43,7 +43,7 @@ func (m *QueryContractInfoRequest) Reset() { *m = QueryContractInfoReque func (m *QueryContractInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryContractInfoRequest) ProtoMessage() {} func (*QueryContractInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{0} + return fileDescriptor_e8595715dfdf95d1, []int{0} } func (m *QueryContractInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -83,7 +83,7 @@ func (m *QueryContractInfoResponse) Reset() { *m = QueryContractInfoResp func (m *QueryContractInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryContractInfoResponse) ProtoMessage() {} func (*QueryContractInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{1} + return fileDescriptor_e8595715dfdf95d1, []int{1} } func (m *QueryContractInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -124,7 +124,7 @@ func (m *QueryContractHistoryRequest) Reset() { *m = QueryContractHistor func (m *QueryContractHistoryRequest) String() string { return proto.CompactTextString(m) } func (*QueryContractHistoryRequest) ProtoMessage() {} func (*QueryContractHistoryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{2} + return fileDescriptor_e8595715dfdf95d1, []int{2} } func (m *QueryContractHistoryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ func (m *QueryContractHistoryResponse) Reset() { *m = QueryContractHisto func (m *QueryContractHistoryResponse) String() string { return proto.CompactTextString(m) } func (*QueryContractHistoryResponse) ProtoMessage() {} func (*QueryContractHistoryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{3} + return fileDescriptor_e8595715dfdf95d1, []int{3} } func (m *QueryContractHistoryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -204,7 +204,7 @@ func (m *QueryContractsByCodeRequest) Reset() { *m = QueryContractsByCod func (m *QueryContractsByCodeRequest) String() string { return proto.CompactTextString(m) } func (*QueryContractsByCodeRequest) ProtoMessage() {} func (*QueryContractsByCodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{4} + return fileDescriptor_e8595715dfdf95d1, []int{4} } func (m *QueryContractsByCodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -246,7 +246,7 @@ func (m *QueryContractsByCodeResponse) Reset() { *m = QueryContractsByCo func (m *QueryContractsByCodeResponse) String() string { return proto.CompactTextString(m) } func (*QueryContractsByCodeResponse) ProtoMessage() {} func (*QueryContractsByCodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{5} + return fileDescriptor_e8595715dfdf95d1, []int{5} } func (m *QueryContractsByCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -287,7 +287,7 @@ func (m *QueryAllContractStateRequest) Reset() { *m = QueryAllContractSt func (m *QueryAllContractStateRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllContractStateRequest) ProtoMessage() {} func (*QueryAllContractStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{6} + return fileDescriptor_e8595715dfdf95d1, []int{6} } func (m *QueryAllContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +328,7 @@ func (m *QueryAllContractStateResponse) Reset() { *m = QueryAllContractS func (m *QueryAllContractStateResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllContractStateResponse) ProtoMessage() {} func (*QueryAllContractStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{7} + return fileDescriptor_e8595715dfdf95d1, []int{7} } func (m *QueryAllContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -369,7 +369,7 @@ func (m *QueryRawContractStateRequest) Reset() { *m = QueryRawContractSt func (m *QueryRawContractStateRequest) String() string { return proto.CompactTextString(m) } func (*QueryRawContractStateRequest) ProtoMessage() {} func (*QueryRawContractStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{8} + return fileDescriptor_e8595715dfdf95d1, []int{8} } func (m *QueryRawContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -409,7 +409,7 @@ func (m *QueryRawContractStateResponse) Reset() { *m = QueryRawContractS func (m *QueryRawContractStateResponse) String() string { return proto.CompactTextString(m) } func (*QueryRawContractStateResponse) ProtoMessage() {} func (*QueryRawContractStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{9} + return fileDescriptor_e8595715dfdf95d1, []int{9} } func (m *QueryRawContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -451,7 +451,7 @@ func (m *QuerySmartContractStateRequest) Reset() { *m = QuerySmartContra func (m *QuerySmartContractStateRequest) String() string { return proto.CompactTextString(m) } func (*QuerySmartContractStateRequest) ProtoMessage() {} func (*QuerySmartContractStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{10} + return fileDescriptor_e8595715dfdf95d1, []int{10} } func (m *QuerySmartContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -491,7 +491,7 @@ func (m *QuerySmartContractStateResponse) Reset() { *m = QuerySmartContr func (m *QuerySmartContractStateResponse) String() string { return proto.CompactTextString(m) } func (*QuerySmartContractStateResponse) ProtoMessage() {} func (*QuerySmartContractStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{11} + return fileDescriptor_e8595715dfdf95d1, []int{11} } func (m *QuerySmartContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -529,7 +529,7 @@ func (m *QueryCodeRequest) Reset() { *m = QueryCodeRequest{} } func (m *QueryCodeRequest) String() string { return proto.CompactTextString(m) } func (*QueryCodeRequest) ProtoMessage() {} func (*QueryCodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{12} + return fileDescriptor_e8595715dfdf95d1, []int{12} } func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -571,7 +571,7 @@ func (m *CodeInfoResponse) Reset() { *m = CodeInfoResponse{} } func (m *CodeInfoResponse) String() string { return proto.CompactTextString(m) } func (*CodeInfoResponse) ProtoMessage() {} func (*CodeInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{13} + return fileDescriptor_e8595715dfdf95d1, []int{13} } func (m *CodeInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ func (m *QueryCodeResponse) Reset() { *m = QueryCodeResponse{} } func (m *QueryCodeResponse) String() string { return proto.CompactTextString(m) } func (*QueryCodeResponse) ProtoMessage() {} func (*QueryCodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{14} + return fileDescriptor_e8595715dfdf95d1, []int{14} } func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -649,7 +649,7 @@ func (m *QueryCodesRequest) Reset() { *m = QueryCodesRequest{} } func (m *QueryCodesRequest) String() string { return proto.CompactTextString(m) } func (*QueryCodesRequest) ProtoMessage() {} func (*QueryCodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{15} + return fileDescriptor_e8595715dfdf95d1, []int{15} } func (m *QueryCodesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -689,7 +689,7 @@ func (m *QueryCodesResponse) Reset() { *m = QueryCodesResponse{} } func (m *QueryCodesResponse) String() string { return proto.CompactTextString(m) } func (*QueryCodesResponse) ProtoMessage() {} func (*QueryCodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5c6ac9b241082464, []int{16} + return fileDescriptor_e8595715dfdf95d1, []int{16} } func (m *QueryCodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -738,78 +738,78 @@ func init() { proto.RegisterType((*QueryCodesResponse)(nil), "cosmwasm.wasm.v1beta1.QueryCodesResponse") } -func init() { proto.RegisterFile("query.proto", fileDescriptor_5c6ac9b241082464) } +func init() { proto.RegisterFile("cosmwasm/wasm/v1beta1/query.proto", fileDescriptor_e8595715dfdf95d1) } -var fileDescriptor_5c6ac9b241082464 = []byte{ - // 1075 bytes of a gzipped FileDescriptorProto +var fileDescriptor_e8595715dfdf95d1 = []byte{ + // 1080 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x97, 0xcb, 0x6f, 0xe3, 0x44, - 0x1c, 0xc7, 0x33, 0xbb, 0xe9, 0x23, 0xd3, 0x22, 0xca, 0x68, 0x81, 0x10, 0xb2, 0x76, 0x65, 0x2a, - 0x9a, 0xe5, 0xe1, 0xe9, 0x63, 0x17, 0x89, 0xe5, 0x44, 0x5a, 0x50, 0x57, 0xa2, 0x3c, 0x5c, 0x89, - 0xd7, 0xa5, 0x1a, 0xdb, 0x93, 0xc4, 0xe0, 0x78, 0xb2, 0x1e, 0x87, 0x36, 0x2a, 0x15, 0xd2, 0x5e, - 0xb8, 0x22, 0xed, 0x91, 0x0b, 0xdc, 0x56, 0x2b, 0x38, 0x22, 0x71, 0xe4, 0xd8, 0x63, 0x25, 0x2e, - 0x9c, 0x22, 0x48, 0x39, 0xa0, 0xfe, 0x09, 0x7b, 0x42, 0x33, 0x1e, 0xe7, 0xd5, 0x3a, 0x49, 0x51, - 0xc4, 0xa5, 0xf2, 0xd4, 0xbf, 0xc7, 0xe7, 0xf7, 0x9d, 0xdf, 0xcc, 0xcf, 0x81, 0x0b, 0xf7, 0x9b, - 0x34, 0x6c, 0x99, 0x8d, 0x90, 0x45, 0x0c, 0x3d, 0xeb, 0x30, 0x5e, 0x3f, 0x20, 0xbc, 0x6e, 0xca, - 0x3f, 0x5f, 0xad, 0xdb, 0x34, 0x22, 0xeb, 0x85, 0x1b, 0x55, 0x56, 0x65, 0xd2, 0x02, 0x8b, 0xa7, - 0xd8, 0xb8, 0xb0, 0x10, 0xb5, 0x1a, 0x94, 0xab, 0x45, 0xb1, 0xca, 0x58, 0xd5, 0xa7, 0x98, 0x34, - 0x3c, 0x4c, 0x82, 0x80, 0x45, 0x24, 0xf2, 0x58, 0x90, 0xbc, 0x5d, 0xf5, 0x2b, 0x36, 0xb6, 0x09, - 0xa7, 0x58, 0x66, 0xc3, 0x2a, 0x30, 0x6e, 0x90, 0xaa, 0x17, 0x48, 0xcb, 0xd8, 0xd0, 0xb8, 0x0d, - 0xf3, 0x1f, 0x09, 0x8b, 0x2d, 0x16, 0x44, 0x21, 0x71, 0xa2, 0x7b, 0x41, 0x85, 0x59, 0xf4, 0x7e, - 0x93, 0xf2, 0x08, 0xe5, 0xe1, 0x1c, 0x71, 0xdd, 0x90, 0x72, 0x9e, 0x07, 0xcb, 0xa0, 0x94, 0xb3, - 0x92, 0xa5, 0xf1, 0x10, 0xc0, 0x17, 0x2e, 0x71, 0xe3, 0x0d, 0x16, 0x70, 0x9a, 0xee, 0x87, 0x3e, - 0x86, 0x4f, 0x39, 0xca, 0x63, 0xdf, 0x0b, 0x2a, 0x2c, 0x7f, 0x6d, 0x19, 0x94, 0x16, 0x36, 0x5e, - 0x32, 0x2f, 0x95, 0xc1, 0xec, 0x8f, 0x5e, 0x5e, 0x3c, 0x69, 0xeb, 0x99, 0xd3, 0xb6, 0x0e, 0xce, - 0xdb, 0x7a, 0xc6, 0x5a, 0x74, 0xfa, 0xde, 0xdd, 0xcd, 0xfe, 0xf3, 0x83, 0x0e, 0x8c, 0xaf, 0xe1, - 0x8b, 0x03, 0x50, 0x3b, 0x1e, 0x8f, 0x58, 0xd8, 0x1a, 0x5b, 0x0e, 0xda, 0x82, 0xb0, 0x27, 0x4c, - 0x97, 0xc9, 0xaf, 0xd8, 0xa6, 0x90, 0xd0, 0x8c, 0x37, 0x2c, 0x81, 0xfa, 0x90, 0x54, 0xa9, 0x0a, - 0x69, 0xf5, 0xb9, 0x19, 0xbf, 0x00, 0x58, 0xbc, 0x3c, 0xbd, 0x92, 0xe5, 0x03, 0x38, 0x47, 0x83, - 0x28, 0xf4, 0xa8, 0xc8, 0x7f, 0xbd, 0xb4, 0xb0, 0x81, 0xc7, 0x94, 0xbd, 0xc5, 0x5c, 0xaa, 0x82, - 0xbc, 0x13, 0x44, 0x61, 0xab, 0x9c, 0x15, 0x12, 0x58, 0x49, 0x14, 0xb4, 0x7d, 0x09, 0xf6, 0xca, - 0x68, 0xec, 0x18, 0x65, 0x80, 0xfb, 0x68, 0x48, 0x35, 0x5e, 0x6e, 0x89, 0xc4, 0x89, 0x6a, 0xcf, - 0xc3, 0x39, 0x87, 0xb9, 0x74, 0xdf, 0x73, 0xa5, 0x6a, 0x59, 0x6b, 0x56, 0x2c, 0xef, 0xb9, 0xd3, - 0x11, 0xed, 0xc1, 0xb0, 0x68, 0xdd, 0xec, 0x4a, 0xb4, 0x22, 0xcc, 0x25, 0x3b, 0x1d, 0xcb, 0x96, - 0xb3, 0x7a, 0xff, 0x98, 0x92, 0x02, 0xc7, 0x8a, 0xe1, 0x6d, 0xdf, 0x4f, 0x30, 0xf6, 0x22, 0x12, - 0xd1, 0xff, 0xa9, 0x71, 0x7e, 0x04, 0xf0, 0x66, 0x4a, 0x7e, 0x25, 0xc2, 0x5d, 0x38, 0x5b, 0x67, - 0x2e, 0xf5, 0x93, 0xc6, 0x29, 0xa6, 0x34, 0xce, 0xae, 0x30, 0x52, 0x5d, 0xa2, 0x3c, 0xa6, 0x24, - 0xd1, 0x27, 0x4a, 0x22, 0x8b, 0x1c, 0x5c, 0x51, 0xa2, 0x9b, 0x10, 0xca, 0x1c, 0xfb, 0x2e, 0x89, - 0x88, 0xcc, 0xbf, 0x68, 0xe5, 0xe4, 0x7f, 0xb6, 0x49, 0x44, 0x8c, 0x4d, 0x55, 0xfb, 0xc5, 0xc0, - 0xaa, 0x76, 0x04, 0xb3, 0xd2, 0x13, 0x48, 0x4f, 0xf9, 0x6c, 0x7c, 0x06, 0x35, 0xe9, 0xb4, 0x57, - 0x27, 0x61, 0x34, 0x5d, 0x9e, 0x3d, 0xa8, 0xa7, 0x86, 0x56, 0x44, 0x6b, 0xfd, 0x44, 0xe5, 0xe2, - 0x93, 0xb6, 0x9e, 0xa7, 0x81, 0xc3, 0x5c, 0x2f, 0xa8, 0xe2, 0x2f, 0x38, 0x0b, 0x4c, 0x8b, 0x1c, - 0xec, 0x52, 0xce, 0x85, 0x96, 0x31, 0xef, 0xab, 0x70, 0x49, 0x35, 0xf9, 0xf8, 0x73, 0x65, 0xb4, - 0x01, 0x5c, 0x12, 0x86, 0x03, 0x57, 0xea, 0xad, 0x21, 0xeb, 0xf2, 0x52, 0xa7, 0xad, 0xcf, 0x4a, - 0xb3, 0xed, 0xf3, 0xb6, 0x7e, 0xcd, 0x73, 0xbb, 0xe7, 0x32, 0x0f, 0xe7, 0x9c, 0x90, 0x92, 0x88, - 0x85, 0xb2, 0xba, 0x9c, 0x95, 0x2c, 0xd1, 0x2e, 0xcc, 0x09, 0x9c, 0xfd, 0x1a, 0xe1, 0xb5, 0xfc, - 0x75, 0x49, 0xbf, 0xf6, 0xa4, 0xad, 0xbf, 0x56, 0xf5, 0xa2, 0x5a, 0xd3, 0x36, 0x1d, 0x56, 0xc7, - 0xbe, 0x17, 0x50, 0xcc, 0xb8, 0xa8, 0x9a, 0x05, 0xd8, 0xf7, 0x6c, 0x8e, 0xed, 0x56, 0x44, 0xb9, - 0xb9, 0x43, 0x0f, 0xcb, 0xe2, 0xc1, 0x9a, 0x17, 0x21, 0x76, 0x08, 0xaf, 0xa1, 0xe7, 0xe0, 0x2c, - 0x67, 0xcd, 0xd0, 0xa1, 0xf9, 0xac, 0xcc, 0xa3, 0x56, 0x02, 0xc0, 0x6e, 0x7a, 0xbe, 0x4b, 0xc3, - 0xfc, 0x4c, 0x0c, 0xa0, 0x96, 0xea, 0x9a, 0xfe, 0x16, 0xc0, 0x67, 0xfa, 0xe4, 0x50, 0x15, 0xbe, - 0x2f, 0x0e, 0xba, 0xa8, 0x50, 0x8c, 0x05, 0x20, 0xdb, 0x74, 0x35, 0xf5, 0x7e, 0x1c, 0x54, 0xa7, - 0x3c, 0xdf, 0x1d, 0x0b, 0xf3, 0x8e, 0x7a, 0x87, 0x8a, 0x6a, 0x97, 0xe4, 0x0e, 0x97, 0xe7, 0xcf, - 0xdb, 0xba, 0x5c, 0xc7, 0x3b, 0xa2, 0x48, 0x3e, 0xed, 0x03, 0xe1, 0xc9, 0xc6, 0x0c, 0x9e, 0x69, - 0xf0, 0xdf, 0xce, 0xf4, 0x23, 0x00, 0x51, 0x7f, 0x68, 0x55, 0xe4, 0x7b, 0x10, 0x76, 0x8b, 0x4c, - 0x0e, 0xf3, 0xc4, 0x55, 0xc6, 0xe7, 0x3a, 0x97, 0x54, 0x38, 0xa5, 0xa3, 0xbd, 0xf1, 0x18, 0xc2, - 0x19, 0x89, 0x8a, 0xbe, 0x07, 0x70, 0xb1, 0x7f, 0xe4, 0xa2, 0xb4, 0x01, 0x95, 0xf6, 0xc5, 0x50, - 0x58, 0x9b, 0xdc, 0x21, 0x26, 0x31, 0x4a, 0x0f, 0x7e, 0xff, 0xfb, 0xe1, 0x35, 0x03, 0x2d, 0x63, - 0xe1, 0xd0, 0xfd, 0x4e, 0x49, 0xae, 0x78, 0x7c, 0xa4, 0xce, 0xed, 0x31, 0xfa, 0x09, 0xc0, 0xa7, - 0x87, 0x46, 0x2b, 0xda, 0x98, 0x24, 0xdf, 0xe0, 0x67, 0x40, 0x61, 0xf3, 0x4a, 0x3e, 0x0a, 0x73, - 0x4d, 0x62, 0xbe, 0x82, 0x4a, 0xe3, 0x30, 0x71, 0x4d, 0xa1, 0x3d, 0xee, 0xc3, 0x55, 0x43, 0x6d, - 0x32, 0xdc, 0xc1, 0xf9, 0x3b, 0x19, 0xee, 0xd0, 0xd4, 0x34, 0x4c, 0x89, 0x5b, 0x42, 0x2f, 0x0f, - 0xe3, 0xba, 0x14, 0x1f, 0xa9, 0x8b, 0xe4, 0x18, 0xf7, 0xe6, 0xe8, 0xcf, 0x00, 0x2e, 0x0d, 0x4f, - 0x1f, 0x34, 0x32, 0x73, 0xca, 0xac, 0x2c, 0xdc, 0xbe, 0x9a, 0xd3, 0x38, 0xde, 0x0b, 0xf2, 0x72, - 0x89, 0xf6, 0x2b, 0x80, 0x4b, 0xc3, 0x13, 0x63, 0x34, 0x6f, 0xca, 0xe0, 0x1a, 0xcd, 0x9b, 0x36, - 0x94, 0x8c, 0x37, 0x25, 0xef, 0x26, 0x5a, 0x1f, 0xcb, 0x1b, 0x92, 0x03, 0x7c, 0xd4, 0x1b, 0x38, - 0xc7, 0xe8, 0x37, 0x00, 0xd1, 0xc5, 0xe1, 0x82, 0xee, 0x8c, 0xe2, 0x48, 0x9d, 0x73, 0x85, 0x37, - 0xae, 0xea, 0xa6, 0x0a, 0x78, 0x4b, 0x16, 0x70, 0x07, 0x6d, 0x8e, 0x17, 0x5c, 0x04, 0x19, 0x2c, - 0xe1, 0x1b, 0x98, 0x95, 0xed, 0xbc, 0x3a, 0xba, 0x35, 0x7b, 0x3d, 0x5c, 0x1a, 0x6f, 0xa8, 0xb8, - 0x56, 0x24, 0x97, 0x86, 0x8a, 0xa3, 0x1a, 0x17, 0x1d, 0xc2, 0x19, 0x79, 0xaf, 0xa2, 0xb1, 0x81, - 0x93, 0x5b, 0xbd, 0x70, 0x6b, 0x02, 0x4b, 0xc5, 0x50, 0x90, 0x0c, 0x37, 0x10, 0xba, 0xc8, 0x50, - 0x7e, 0xf7, 0xe4, 0x2f, 0x2d, 0xf3, 0xa8, 0xa3, 0x65, 0x4e, 0x3a, 0x1a, 0x38, 0xed, 0x68, 0xe0, - 0xcf, 0x8e, 0x06, 0xbe, 0x3b, 0xd3, 0x32, 0xa7, 0x67, 0x5a, 0xe6, 0x8f, 0x33, 0x2d, 0xf3, 0xf9, - 0xca, 0xf0, 0x34, 0xf5, 0x2b, 0xf6, 0xeb, 0xdc, 0xfd, 0x12, 0x1f, 0xc6, 0xe1, 0xe4, 0x6f, 0x38, - 0x7b, 0x56, 0xfe, 0xfa, 0xda, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x81, 0xb6, 0xcb, 0x95, 0x0d, - 0x0e, 0x00, 0x00, + 0x1c, 0xc7, 0x33, 0xdd, 0x34, 0x6d, 0x66, 0x8b, 0x08, 0xa3, 0x05, 0x42, 0xc8, 0xda, 0xc5, 0x54, + 0x34, 0xcb, 0xc3, 0x6e, 0x9b, 0x5d, 0x24, 0x96, 0x13, 0x69, 0x41, 0x5d, 0x89, 0xf2, 0x70, 0x25, + 0x5e, 0x97, 0x6a, 0x6c, 0x4f, 0x12, 0x83, 0xe3, 0xc9, 0x7a, 0x1c, 0xda, 0xa8, 0x54, 0x48, 0x7b, + 0xe1, 0x8a, 0xb4, 0x47, 0x2e, 0x70, 0x5b, 0xad, 0xe0, 0x88, 0xc4, 0x91, 0x63, 0x8f, 0x95, 0xb8, + 0x70, 0x8a, 0x20, 0xe5, 0x80, 0xfa, 0x27, 0xf4, 0x84, 0x66, 0x3c, 0xce, 0xab, 0x75, 0x92, 0xa2, + 0x68, 0x2f, 0x51, 0x26, 0xfe, 0x3d, 0x3e, 0xbf, 0xef, 0xfc, 0x66, 0x7e, 0x0e, 0x7c, 0xc9, 0xa6, + 0xac, 0xb1, 0x8f, 0x59, 0xc3, 0x10, 0x1f, 0x5f, 0xaf, 0x5b, 0x24, 0xc4, 0xeb, 0xc6, 0xfd, 0x16, + 0x09, 0xda, 0x7a, 0x33, 0xa0, 0x21, 0x45, 0xcf, 0xc6, 0x26, 0xba, 0xf8, 0x90, 0x26, 0x85, 0x1b, + 0x35, 0x5a, 0xa3, 0xc2, 0xc2, 0xe0, 0xdf, 0x22, 0xe3, 0x42, 0x42, 0xbc, 0xb0, 0xdd, 0x24, 0x4c, + 0x9a, 0x14, 0x6b, 0x94, 0xd6, 0x3c, 0x62, 0xe0, 0xa6, 0x6b, 0x60, 0xdf, 0xa7, 0x21, 0x0e, 0x5d, + 0xea, 0xc7, 0x4f, 0x57, 0xbd, 0xaa, 0x65, 0x58, 0x98, 0x91, 0x88, 0xa1, 0x17, 0xa1, 0x89, 0x6b, + 0xae, 0x2f, 0x2c, 0x23, 0x43, 0xed, 0x36, 0xcc, 0x7f, 0xcc, 0x2d, 0x36, 0xa9, 0x1f, 0x06, 0xd8, + 0x0e, 0xef, 0xf9, 0x55, 0x6a, 0x92, 0xfb, 0x2d, 0xc2, 0x42, 0x94, 0x87, 0x0b, 0xd8, 0x71, 0x02, + 0xc2, 0x58, 0x1e, 0x2c, 0x83, 0x52, 0xd6, 0x8c, 0x97, 0xda, 0x43, 0x00, 0x5f, 0xb8, 0xc4, 0x8d, + 0x35, 0xa9, 0xcf, 0x48, 0xb2, 0x1f, 0xfa, 0x04, 0x3e, 0x65, 0x4b, 0x8f, 0x3d, 0xd7, 0xaf, 0xd2, + 0xfc, 0xdc, 0x32, 0x28, 0x5d, 0xdf, 0x78, 0x59, 0xbf, 0x54, 0x1c, 0x7d, 0x30, 0x7a, 0x65, 0xe9, + 0xb8, 0xa3, 0xa6, 0x4e, 0x3a, 0x2a, 0x38, 0xeb, 0xa8, 0x29, 0x73, 0xc9, 0x1e, 0x78, 0x76, 0x37, + 0xfd, 0xef, 0x8f, 0x2a, 0xd0, 0xbe, 0x81, 0x2f, 0x0e, 0x41, 0x6d, 0xbb, 0x2c, 0xa4, 0x41, 0x7b, + 0x62, 0x39, 0x68, 0x13, 0xc2, 0xbe, 0x30, 0x3d, 0x26, 0xaf, 0x6a, 0xe9, 0x5c, 0x42, 0x3d, 0xda, + 0xc6, 0x18, 0xea, 0x23, 0x5c, 0x23, 0x32, 0xa4, 0x39, 0xe0, 0xa6, 0xfd, 0x0a, 0x60, 0xf1, 0xf2, + 0xf4, 0x52, 0x96, 0x0f, 0xe1, 0x02, 0xf1, 0xc3, 0xc0, 0x25, 0x3c, 0xff, 0xb5, 0xd2, 0xf5, 0x0d, + 0x63, 0x42, 0xd9, 0x9b, 0xd4, 0x21, 0x32, 0xc8, 0xbb, 0x7e, 0x18, 0xb4, 0x2b, 0x69, 0x2e, 0x81, + 0x19, 0x47, 0x41, 0x5b, 0x97, 0x60, 0xaf, 0x8c, 0xc7, 0x8e, 0x50, 0x86, 0xb8, 0x0f, 0x47, 0x54, + 0x63, 0x95, 0x36, 0x4f, 0x1c, 0xab, 0xf6, 0x3c, 0x5c, 0xb0, 0xa9, 0x43, 0xf6, 0x5c, 0x47, 0xa8, + 0x96, 0x36, 0x33, 0x7c, 0x79, 0xcf, 0x99, 0x8d, 0x68, 0x0f, 0x46, 0x45, 0xeb, 0x65, 0x97, 0xa2, + 0x15, 0x61, 0x36, 0xde, 0xe9, 0x48, 0xb6, 0xac, 0xd9, 0xff, 0x61, 0x46, 0x0a, 0x1c, 0x49, 0x86, + 0x77, 0x3c, 0x2f, 0xc6, 0xd8, 0x0d, 0x71, 0x48, 0x9e, 0x50, 0xe3, 0xfc, 0x04, 0xe0, 0xcd, 0x84, + 0xfc, 0x52, 0x84, 0xbb, 0x30, 0xd3, 0xa0, 0x0e, 0xf1, 0xe2, 0xc6, 0x29, 0x26, 0x34, 0xce, 0x0e, + 0x37, 0x92, 0x5d, 0x22, 0x3d, 0x66, 0x24, 0xd1, 0xa7, 0x52, 0x22, 0x13, 0xef, 0x5f, 0x51, 0xa2, + 0x9b, 0x10, 0x8a, 0x1c, 0x7b, 0x0e, 0x0e, 0xb1, 0xc8, 0xbf, 0x64, 0x66, 0xc5, 0x2f, 0x5b, 0x38, + 0xc4, 0x5a, 0x59, 0xd6, 0x7e, 0x31, 0xb0, 0xac, 0x1d, 0xc1, 0xb4, 0xf0, 0x04, 0xc2, 0x53, 0x7c, + 0xd7, 0x3e, 0x87, 0x8a, 0x70, 0xda, 0x6d, 0xe0, 0x20, 0x9c, 0x2d, 0xcf, 0x2e, 0x54, 0x13, 0x43, + 0x4b, 0xa2, 0xb5, 0x41, 0xa2, 0x4a, 0xf1, 0xbc, 0xa3, 0xe6, 0x89, 0x6f, 0x53, 0xc7, 0xf5, 0x6b, + 0xc6, 0x97, 0x8c, 0xfa, 0xba, 0x89, 0xf7, 0x77, 0x08, 0x63, 0x5c, 0xcb, 0x88, 0xf7, 0x35, 0x98, + 0x93, 0x4d, 0x3e, 0xf9, 0x5c, 0x69, 0x1d, 0x00, 0x73, 0xdc, 0x70, 0xe8, 0x4a, 0xbd, 0x35, 0x62, + 0x5d, 0xc9, 0x75, 0x3b, 0x6a, 0x46, 0x98, 0x6d, 0x9d, 0x75, 0xd4, 0x39, 0xd7, 0xe9, 0x9d, 0xcb, + 0x3c, 0x5c, 0xb0, 0x03, 0x82, 0x43, 0x1a, 0x88, 0xea, 0xb2, 0x66, 0xbc, 0x44, 0x3b, 0x30, 0xcb, + 0x71, 0xf6, 0xea, 0x98, 0xd5, 0xf3, 0xd7, 0x04, 0xfd, 0xda, 0x79, 0x47, 0x7d, 0xbd, 0xe6, 0x86, + 0xf5, 0x96, 0xa5, 0xdb, 0xb4, 0x61, 0x78, 0xae, 0x4f, 0x0c, 0xca, 0x78, 0xd5, 0xd4, 0x37, 0x3c, + 0xd7, 0x62, 0x86, 0xd5, 0x0e, 0x09, 0xd3, 0xb7, 0xc9, 0x41, 0x85, 0x7f, 0x31, 0x17, 0x79, 0x88, + 0x6d, 0xcc, 0xea, 0xe8, 0x39, 0x98, 0x61, 0xb4, 0x15, 0xd8, 0x24, 0x9f, 0x16, 0x79, 0xe4, 0x8a, + 0x03, 0x58, 0x2d, 0xd7, 0x73, 0x48, 0x90, 0x9f, 0x8f, 0x00, 0xe4, 0x52, 0x5e, 0xd3, 0xdf, 0x01, + 0xf8, 0xcc, 0x80, 0x1c, 0xb2, 0xc2, 0x0f, 0xf8, 0x41, 0xe7, 0x15, 0xf2, 0xb1, 0x00, 0x44, 0x9b, + 0xae, 0x26, 0xde, 0x8f, 0xc3, 0xea, 0x54, 0x16, 0x7b, 0x63, 0x61, 0xd1, 0x96, 0xcf, 0x50, 0x51, + 0xee, 0x92, 0xd8, 0xe1, 0xca, 0xe2, 0x59, 0x47, 0x15, 0xeb, 0x68, 0x47, 0x24, 0xc9, 0x67, 0x03, + 0x20, 0x2c, 0xde, 0x98, 0xe1, 0x33, 0x0d, 0xfe, 0xdf, 0x99, 0x7e, 0x04, 0x20, 0x1a, 0x0c, 0x2d, + 0x8b, 0x7c, 0x1f, 0xc2, 0x5e, 0x91, 0xf1, 0x61, 0x9e, 0xba, 0xca, 0xe8, 0x5c, 0x67, 0xe3, 0x0a, + 0x67, 0x74, 0xb4, 0x37, 0x1e, 0x43, 0x38, 0x2f, 0x50, 0xd1, 0x0f, 0x00, 0x2e, 0x0d, 0x8e, 0x5c, + 0x94, 0x34, 0xa0, 0x92, 0xde, 0x18, 0x0a, 0x6b, 0xd3, 0x3b, 0x44, 0x24, 0x5a, 0xe9, 0xc1, 0x1f, + 0xff, 0x3c, 0x9c, 0xd3, 0xd0, 0xf2, 0xf0, 0x9b, 0x4e, 0x7c, 0xc5, 0x1b, 0x87, 0xf2, 0xdc, 0x1e, + 0xa1, 0x9f, 0x01, 0x7c, 0x7a, 0x64, 0xb4, 0xa2, 0x8d, 0x69, 0xf2, 0x0d, 0xbf, 0x06, 0x14, 0xca, + 0x57, 0xf2, 0x91, 0x98, 0x6b, 0x02, 0xf3, 0x55, 0x54, 0x9a, 0x84, 0x69, 0xd4, 0x25, 0xda, 0xe3, + 0x01, 0x5c, 0x39, 0xd4, 0xa6, 0xc3, 0x1d, 0x9e, 0xbf, 0xd3, 0xe1, 0x8e, 0x4c, 0x4d, 0x4d, 0x17, + 0xb8, 0x25, 0xf4, 0xca, 0x28, 0xae, 0x43, 0x8c, 0x43, 0x79, 0x91, 0x1c, 0x19, 0xfd, 0x39, 0xfa, + 0x0b, 0x80, 0xb9, 0xd1, 0xe9, 0x83, 0xc6, 0x66, 0x4e, 0x98, 0x95, 0x85, 0xdb, 0x57, 0x73, 0x9a, + 0xc4, 0x7b, 0x41, 0x5e, 0x26, 0xd0, 0x7e, 0x03, 0x30, 0x37, 0x3a, 0x31, 0xc6, 0xf3, 0x26, 0x0c, + 0xae, 0xf1, 0xbc, 0x49, 0x43, 0x49, 0x7b, 0x4b, 0xf0, 0x96, 0xd1, 0xfa, 0x44, 0xde, 0x00, 0xef, + 0x1b, 0x87, 0xfd, 0x81, 0x73, 0x84, 0x7e, 0x07, 0x10, 0x5d, 0x1c, 0x2e, 0xe8, 0xce, 0x38, 0x8e, + 0xc4, 0x39, 0x57, 0x78, 0xf3, 0xaa, 0x6e, 0xb2, 0x80, 0xb7, 0x45, 0x01, 0x77, 0x50, 0x79, 0xb2, + 0xe0, 0x3c, 0xc8, 0x70, 0x09, 0xdf, 0xc2, 0xb4, 0x68, 0xe7, 0xd5, 0xf1, 0xad, 0xd9, 0xef, 0xe1, + 0xd2, 0x64, 0x43, 0xc9, 0xb5, 0x22, 0xb8, 0x14, 0x54, 0x1c, 0xd7, 0xb8, 0xe8, 0x00, 0xce, 0x8b, + 0x7b, 0x15, 0x4d, 0x0c, 0x1c, 0xdf, 0xea, 0x85, 0x5b, 0x53, 0x58, 0x4a, 0x86, 0x82, 0x60, 0xb8, + 0x81, 0xd0, 0x45, 0x86, 0xca, 0x7b, 0xc7, 0x7f, 0x2b, 0xa9, 0x47, 0x5d, 0x25, 0x75, 0xdc, 0x55, + 0xc0, 0x49, 0x57, 0x01, 0x7f, 0x75, 0x15, 0xf0, 0xfd, 0xa9, 0x92, 0x3a, 0x39, 0x55, 0x52, 0x7f, + 0x9e, 0x2a, 0xa9, 0x2f, 0x56, 0x46, 0xa7, 0xa9, 0x57, 0xb5, 0xde, 0x60, 0xce, 0x57, 0xc6, 0x41, + 0x14, 0x4e, 0xfc, 0x87, 0xb3, 0x32, 0xe2, 0xdf, 0x57, 0xf9, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x36, 0x5d, 0xe4, 0xbd, 0x39, 0x0e, 0x00, 0x00, } func (this *QueryContractInfoResponse) Equal(that interface{}) bool { @@ -1248,7 +1248,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "query.proto", + Metadata: "cosmwasm/wasm/v1beta1/query.proto", } func (m *QueryContractInfoRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/wasm/types/query.pb.gw.go b/x/wasm/types/query.pb.gw.go index 0aecd924c3..fbde946d49 100644 --- a/x/wasm/types/query.pb.gw.go +++ b/x/wasm/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: query.proto +// source: cosmwasm/wasm/v1beta1/query.proto /* Package types is a reverse proxy. diff --git a/x/wasm/types/tx.pb.go b/x/wasm/types/tx.pb.go index 923ad8c03e..2b7bfb4ba5 100644 --- a/x/wasm/types/tx.pb.go +++ b/x/wasm/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tx.proto +// source: cosmwasm/wasm/v1beta1/tx.proto package types @@ -51,7 +51,7 @@ func (m *MsgStoreCode) Reset() { *m = MsgStoreCode{} } func (m *MsgStoreCode) String() string { return proto.CompactTextString(m) } func (*MsgStoreCode) ProtoMessage() {} func (*MsgStoreCode) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{0} + return fileDescriptor_b74028d4038589a4, []int{0} } func (m *MsgStoreCode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -90,7 +90,7 @@ func (m *MsgStoreCodeResponse) Reset() { *m = MsgStoreCodeResponse{} } func (m *MsgStoreCodeResponse) String() string { return proto.CompactTextString(m) } func (*MsgStoreCodeResponse) ProtoMessage() {} func (*MsgStoreCodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{1} + return fileDescriptor_b74028d4038589a4, []int{1} } func (m *MsgStoreCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -140,7 +140,7 @@ func (m *MsgInstantiateContract) Reset() { *m = MsgInstantiateContract{} func (m *MsgInstantiateContract) String() string { return proto.CompactTextString(m) } func (*MsgInstantiateContract) ProtoMessage() {} func (*MsgInstantiateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{2} + return fileDescriptor_b74028d4038589a4, []int{2} } func (m *MsgInstantiateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -181,7 +181,7 @@ func (m *MsgInstantiateContractResponse) Reset() { *m = MsgInstantiateCo func (m *MsgInstantiateContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgInstantiateContractResponse) ProtoMessage() {} func (*MsgInstantiateContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{3} + return fileDescriptor_b74028d4038589a4, []int{3} } func (m *MsgInstantiateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -236,7 +236,7 @@ func (m *MsgStoreCodeAndInstantiateContract) Reset() { *m = MsgStoreCode func (m *MsgStoreCodeAndInstantiateContract) String() string { return proto.CompactTextString(m) } func (*MsgStoreCodeAndInstantiateContract) ProtoMessage() {} func (*MsgStoreCodeAndInstantiateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{4} + return fileDescriptor_b74028d4038589a4, []int{4} } func (m *MsgStoreCodeAndInstantiateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -283,7 +283,7 @@ func (m *MsgStoreCodeAndInstantiateContractResponse) String() string { } func (*MsgStoreCodeAndInstantiateContractResponse) ProtoMessage() {} func (*MsgStoreCodeAndInstantiateContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{5} + return fileDescriptor_b74028d4038589a4, []int{5} } func (m *MsgStoreCodeAndInstantiateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -328,7 +328,7 @@ func (m *MsgExecuteContract) Reset() { *m = MsgExecuteContract{} } func (m *MsgExecuteContract) String() string { return proto.CompactTextString(m) } func (*MsgExecuteContract) ProtoMessage() {} func (*MsgExecuteContract) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{6} + return fileDescriptor_b74028d4038589a4, []int{6} } func (m *MsgExecuteContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -367,7 +367,7 @@ func (m *MsgExecuteContractResponse) Reset() { *m = MsgExecuteContractRe func (m *MsgExecuteContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgExecuteContractResponse) ProtoMessage() {} func (*MsgExecuteContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{7} + return fileDescriptor_b74028d4038589a4, []int{7} } func (m *MsgExecuteContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -412,7 +412,7 @@ func (m *MsgMigrateContract) Reset() { *m = MsgMigrateContract{} } func (m *MsgMigrateContract) String() string { return proto.CompactTextString(m) } func (*MsgMigrateContract) ProtoMessage() {} func (*MsgMigrateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{8} + return fileDescriptor_b74028d4038589a4, []int{8} } func (m *MsgMigrateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -452,7 +452,7 @@ func (m *MsgMigrateContractResponse) Reset() { *m = MsgMigrateContractRe func (m *MsgMigrateContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgMigrateContractResponse) ProtoMessage() {} func (*MsgMigrateContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{9} + return fileDescriptor_b74028d4038589a4, []int{9} } func (m *MsgMigrateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -495,7 +495,7 @@ func (m *MsgUpdateAdmin) Reset() { *m = MsgUpdateAdmin{} } func (m *MsgUpdateAdmin) String() string { return proto.CompactTextString(m) } func (*MsgUpdateAdmin) ProtoMessage() {} func (*MsgUpdateAdmin) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{10} + return fileDescriptor_b74028d4038589a4, []int{10} } func (m *MsgUpdateAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -532,7 +532,7 @@ func (m *MsgUpdateAdminResponse) Reset() { *m = MsgUpdateAdminResponse{} func (m *MsgUpdateAdminResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateAdminResponse) ProtoMessage() {} func (*MsgUpdateAdminResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{11} + return fileDescriptor_b74028d4038589a4, []int{11} } func (m *MsgUpdateAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -573,7 +573,7 @@ func (m *MsgClearAdmin) Reset() { *m = MsgClearAdmin{} } func (m *MsgClearAdmin) String() string { return proto.CompactTextString(m) } func (*MsgClearAdmin) ProtoMessage() {} func (*MsgClearAdmin) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{12} + return fileDescriptor_b74028d4038589a4, []int{12} } func (m *MsgClearAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -610,7 +610,7 @@ func (m *MsgClearAdminResponse) Reset() { *m = MsgClearAdminResponse{} } func (m *MsgClearAdminResponse) String() string { return proto.CompactTextString(m) } func (*MsgClearAdminResponse) ProtoMessage() {} func (*MsgClearAdminResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{13} + return fileDescriptor_b74028d4038589a4, []int{13} } func (m *MsgClearAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -653,7 +653,7 @@ func (m *MsgUpdateContractStatus) Reset() { *m = MsgUpdateContractStatus func (m *MsgUpdateContractStatus) String() string { return proto.CompactTextString(m) } func (*MsgUpdateContractStatus) ProtoMessage() {} func (*MsgUpdateContractStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{14} + return fileDescriptor_b74028d4038589a4, []int{14} } func (m *MsgUpdateContractStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -690,7 +690,7 @@ func (m *MsgUpdateContractStatusResponse) Reset() { *m = MsgUpdateContra func (m *MsgUpdateContractStatusResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateContractStatusResponse) ProtoMessage() {} func (*MsgUpdateContractStatusResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0fd2153dc07d3b5c, []int{15} + return fileDescriptor_b74028d4038589a4, []int{15} } func (m *MsgUpdateContractStatusResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -738,68 +738,69 @@ func init() { proto.RegisterType((*MsgUpdateContractStatusResponse)(nil), "cosmwasm.wasm.v1beta1.MsgUpdateContractStatusResponse") } -func init() { proto.RegisterFile("tx.proto", fileDescriptor_0fd2153dc07d3b5c) } - -var fileDescriptor_0fd2153dc07d3b5c = []byte{ - // 927 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x37, 0x69, 0x7e, 0xbc, 0x84, 0xb2, 0x32, 0x6d, 0xd7, 0x78, 0x51, 0x52, 0xdc, 0x5d, - 0xa9, 0xb0, 0xd4, 0xa6, 0x45, 0x2c, 0x42, 0x88, 0x43, 0x12, 0x38, 0xf4, 0x60, 0x84, 0x5c, 0x21, - 0xc4, 0x4a, 0x28, 0x8c, 0xed, 0x89, 0x31, 0x24, 0x33, 0x91, 0x67, 0x42, 0x5b, 0x21, 0xc1, 0x3f, - 0x80, 0x10, 0xff, 0x01, 0x77, 0xc4, 0x95, 0x7f, 0x80, 0x53, 0x8f, 0x7b, 0xe4, 0x54, 0x20, 0xbd, - 0x72, 0x47, 0xe2, 0x84, 0x3c, 0x76, 0x9c, 0x69, 0x88, 0xd3, 0x64, 0xd9, 0xd3, 0x5e, 0x2a, 0x3f, - 0xe7, 0x7b, 0xdf, 0xf7, 0xde, 0x9b, 0x6f, 0x9e, 0x0b, 0x55, 0x7e, 0x66, 0x8e, 0x22, 0xca, 0xa9, - 0xba, 0xed, 0x51, 0x36, 0x3c, 0x45, 0x6c, 0x68, 0x8a, 0x3f, 0x5f, 0x1d, 0xba, 0x98, 0xa3, 0x43, - 0xfd, 0xee, 0xa0, 0xef, 0x5a, 0x2e, 0x62, 0xd8, 0x4a, 0xdf, 0x58, 0x1e, 0x0d, 0x49, 0x92, 0xa3, - 0x6f, 0x05, 0x34, 0xa0, 0xe2, 0xd1, 0x8a, 0x9f, 0xd2, 0xb7, 0x75, 0x7e, 0x3e, 0xc2, 0x2c, 0x09, - 0x8c, 0xbf, 0x14, 0x68, 0xd8, 0x2c, 0x38, 0xe1, 0x34, 0xc2, 0x5d, 0xea, 0x63, 0x75, 0x07, 0xca, - 0x0c, 0x13, 0x1f, 0x47, 0x9a, 0xb2, 0xab, 0xec, 0xd7, 0x9c, 0x34, 0x52, 0x1f, 0xc2, 0x66, 0x2c, - 0xdc, 0x73, 0xcf, 0x39, 0xee, 0x79, 0xd4, 0xc7, 0xda, 0xad, 0x5d, 0x65, 0xbf, 0xd1, 0xb9, 0x3d, - 0xb9, 0x6c, 0x35, 0x3e, 0x6e, 0x9f, 0xd8, 0x9d, 0x73, 0x2e, 0x18, 0x9c, 0x46, 0x8c, 0x9b, 0x46, - 0x82, 0x8f, 0x8e, 0x23, 0x0f, 0x6b, 0xc5, 0x94, 0x4f, 0x44, 0xaa, 0x06, 0x15, 0x77, 0x1c, 0x0e, - 0x62, 0xa1, 0x92, 0xf8, 0x61, 0x1a, 0xaa, 0x8f, 0x60, 0x27, 0x24, 0x8c, 0x23, 0xc2, 0x43, 0xc4, - 0x71, 0x6f, 0x84, 0xa3, 0x61, 0xc8, 0x58, 0x48, 0x89, 0xb6, 0xb1, 0xab, 0xec, 0xd7, 0x8f, 0xf6, - 0xcc, 0x85, 0xa3, 0x30, 0xdb, 0x9e, 0x87, 0x19, 0xeb, 0x52, 0xd2, 0x0f, 0x03, 0x67, 0x5b, 0xa2, - 0xf8, 0x30, 0x63, 0x30, 0xde, 0x81, 0x2d, 0xb9, 0x5b, 0x07, 0xb3, 0x11, 0x25, 0x0c, 0xab, 0x7b, - 0x50, 0x89, 0x7b, 0xea, 0x85, 0xbe, 0x68, 0xbb, 0xd4, 0x81, 0xc9, 0x65, 0xab, 0x1c, 0x43, 0x8e, - 0xdf, 0x73, 0xca, 0xf1, 0x4f, 0xc7, 0xbe, 0xf1, 0xb7, 0x02, 0x3b, 0x36, 0x0b, 0x8e, 0x67, 0xcc, - 0x5d, 0x4a, 0x78, 0x84, 0x3c, 0x9e, 0x3b, 0xb5, 0x2d, 0xd8, 0x40, 0xfe, 0x30, 0x24, 0x62, 0x58, - 0x35, 0x27, 0x09, 0x64, 0xb5, 0x62, 0x9e, 0x5a, 0x9c, 0x3a, 0x40, 0x2e, 0x1e, 0xa4, 0xe3, 0x49, - 0x02, 0xf5, 0x45, 0xa8, 0x86, 0x24, 0xe4, 0xbd, 0x21, 0x0b, 0xc4, 0x38, 0x1a, 0x4e, 0x25, 0x8e, - 0x6d, 0x16, 0xa8, 0x9f, 0xc0, 0x46, 0x7f, 0x4c, 0x7c, 0xa6, 0x95, 0x77, 0x8b, 0xfb, 0xf5, 0xa3, - 0x1d, 0x73, 0xd0, 0x77, 0xcd, 0xd8, 0x1a, 0xd9, 0x84, 0xba, 0x34, 0x24, 0x9d, 0x07, 0x17, 0x97, - 0xad, 0xc2, 0x4f, 0xbf, 0xb7, 0xf6, 0x82, 0x90, 0x7f, 0x3e, 0x76, 0x4d, 0x8f, 0x0e, 0xad, 0x41, - 0x48, 0xb0, 0x35, 0xe8, 0xbb, 0x07, 0xcc, 0xff, 0xd2, 0x4a, 0xec, 0x11, 0x63, 0x99, 0x93, 0x30, - 0x1a, 0x1f, 0x40, 0x73, 0x71, 0xe3, 0xd9, 0x00, 0x35, 0xa8, 0x20, 0xdf, 0x8f, 0x30, 0x63, 0xe9, - 0x04, 0xa6, 0xa1, 0xaa, 0x42, 0xc9, 0x47, 0x1c, 0x25, 0x76, 0x71, 0xc4, 0xb3, 0xf1, 0x6b, 0x11, - 0x0c, 0xf9, 0x1c, 0xda, 0xc4, 0x5f, 0x67, 0xaa, 0xcf, 0x84, 0x17, 0x67, 0xde, 0x28, 0xcb, 0xde, - 0xc8, 0x8e, 0xbd, 0x22, 0x1f, 0xfb, 0x5b, 0xd2, 0xb1, 0x57, 0x45, 0xaf, 0x2f, 0xfd, 0x73, 0xd9, - 0xd2, 0x30, 0xf1, 0xa8, 0x1f, 0x92, 0xc0, 0xfa, 0x82, 0x51, 0x62, 0x3a, 0xe8, 0xd4, 0xc6, 0x8c, - 0xa1, 0x00, 0x2f, 0x30, 0x45, 0xed, 0xa9, 0x9b, 0xe2, 0x5b, 0x78, 0xf5, 0xe6, 0x33, 0x5c, 0xeb, - 0x86, 0xc9, 0x2e, 0xba, 0xb5, 0xd8, 0x45, 0x45, 0xc9, 0x45, 0xbf, 0x28, 0xa0, 0xda, 0x2c, 0x78, - 0xff, 0x0c, 0x7b, 0xe3, 0x15, 0x5c, 0xa3, 0x43, 0xd5, 0x4b, 0x31, 0x29, 0x7b, 0x16, 0xab, 0xb7, - 0xa1, 0x18, 0x8f, 0x36, 0x61, 0x8f, 0x1f, 0x67, 0x83, 0x2b, 0x3d, 0xf5, 0xc1, 0xbd, 0x0e, 0xfa, - 0x7f, 0xcb, 0xce, 0x06, 0x35, 0xed, 0x54, 0x91, 0x3a, 0xfd, 0x3e, 0xe9, 0xd4, 0x0e, 0x83, 0x08, - 0xfd, 0xcf, 0x4e, 0x57, 0xda, 0x3d, 0x2d, 0xa8, 0x0f, 0x13, 0x2d, 0xe1, 0xb8, 0x92, 0x28, 0x05, - 0xd2, 0x57, 0x36, 0x0b, 0xd2, 0x16, 0xe6, 0xea, 0x59, 0xda, 0x02, 0x82, 0x4d, 0x9b, 0x05, 0x1f, - 0x8d, 0x7c, 0xc4, 0x71, 0x5b, 0x38, 0x3d, 0xaf, 0xfa, 0xbb, 0x50, 0x23, 0xf8, 0xb4, 0x27, 0xef, - 0xcd, 0x2a, 0xc1, 0xa7, 0x49, 0x92, 0xdc, 0x5a, 0xf1, 0x7a, 0x6b, 0x86, 0x26, 0xd6, 0xb3, 0x24, - 0x31, 0x2d, 0xc8, 0xe8, 0xc2, 0x73, 0x36, 0x0b, 0xba, 0x03, 0x8c, 0xa2, 0xe5, 0xda, 0xcb, 0xe8, - 0xef, 0xc0, 0xf6, 0x35, 0x92, 0x8c, 0xfd, 0x3b, 0x05, 0xee, 0x64, 0xc2, 0xd3, 0x61, 0x9c, 0x70, - 0xc4, 0xc7, 0xec, 0x89, 0x8e, 0xe8, 0x5d, 0x28, 0x33, 0x91, 0x2d, 0x4a, 0xd8, 0x3c, 0xba, 0x9f, - 0xb3, 0x64, 0xae, 0x4b, 0x39, 0x69, 0x92, 0xf1, 0x32, 0xb4, 0x72, 0xaa, 0x99, 0x56, 0x7c, 0xf4, - 0x73, 0x05, 0x8a, 0xf1, 0x76, 0xf8, 0x14, 0x6a, 0xb3, 0x2f, 0x7f, 0xde, 0x2e, 0x93, 0x2f, 0xb9, - 0xfe, 0x60, 0x05, 0x50, 0xe6, 0x83, 0xaf, 0xe1, 0x85, 0x45, 0x6b, 0xfd, 0x20, 0x9f, 0x63, 0x01, - 0x5c, 0x7f, 0x73, 0x2d, 0x78, 0x26, 0xfe, 0xa3, 0x02, 0xad, 0x9b, 0x3e, 0x30, 0x6f, 0xaf, 0xd0, - 0xcd, 0xe2, 0x54, 0xbd, 0xfd, 0xc4, 0xa9, 0x59, 0x85, 0x14, 0x9e, 0x9f, 0xdf, 0x5d, 0xaf, 0xe4, - 0xb3, 0xce, 0x41, 0xf5, 0xc3, 0x95, 0xa1, 0xb2, 0xe0, 0xfc, 0x0a, 0x59, 0x22, 0x38, 0x07, 0x5d, - 0x26, 0x98, 0xb7, 0x08, 0x3c, 0xa8, 0xcb, 0x37, 0xfe, 0x7e, 0x3e, 0x83, 0x04, 0xd3, 0x0f, 0x56, - 0x82, 0x65, 0x22, 0x9f, 0x01, 0x48, 0x37, 0xfb, 0x5e, 0x7e, 0xf2, 0x0c, 0xa5, 0xbf, 0xb6, 0x0a, - 0x2a, 0x53, 0xf8, 0x06, 0xb6, 0x16, 0x5e, 0x6e, 0xf3, 0xa6, 0x42, 0xaf, 0xe3, 0xf5, 0x87, 0xeb, - 0xe1, 0xa7, 0xfa, 0x9d, 0xce, 0xc5, 0x9f, 0xcd, 0xc2, 0xc5, 0xa4, 0xa9, 0x3c, 0x9e, 0x34, 0x95, - 0x3f, 0x26, 0x4d, 0xe5, 0x87, 0xab, 0x66, 0xe1, 0xf1, 0x55, 0xb3, 0xf0, 0xdb, 0x55, 0xb3, 0xf0, - 0xe8, 0x5e, 0xde, 0xa7, 0xe7, 0xcc, 0x8a, 0x55, 0x92, 0x2f, 0x90, 0x5b, 0x16, 0xff, 0xef, 0xbf, - 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x31, 0x2f, 0x86, 0x4f, 0x52, 0x0c, 0x00, 0x00, +func init() { proto.RegisterFile("cosmwasm/wasm/v1beta1/tx.proto", fileDescriptor_b74028d4038589a4) } + +var fileDescriptor_b74028d4038589a4 = []byte{ + // 933 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0x8f, 0x37, 0x69, 0xd2, 0xbc, 0x86, 0xb2, 0x32, 0x6d, 0xd7, 0x78, 0x91, 0xd3, 0x75, 0x77, + 0xa5, 0xc2, 0x52, 0x87, 0x16, 0xb1, 0x08, 0x21, 0x0e, 0x49, 0xe0, 0xd0, 0x83, 0x11, 0x72, 0x85, + 0x10, 0x2b, 0xa1, 0x30, 0xb6, 0x27, 0xc6, 0x90, 0xcc, 0x44, 0x9e, 0x09, 0x6d, 0x85, 0x04, 0x5f, + 0x00, 0x21, 0xbe, 0x01, 0x77, 0xc4, 0x95, 0x2f, 0xc0, 0xa9, 0xc7, 0x3d, 0x72, 0x2a, 0x90, 0x5e, + 0xb9, 0x23, 0x71, 0x42, 0x1e, 0xff, 0xc9, 0x34, 0xc4, 0x69, 0xb2, 0xec, 0x89, 0x4b, 0x34, 0x2f, + 0xf3, 0x7b, 0xbf, 0xdf, 0x7b, 0x6f, 0xde, 0xbc, 0x31, 0x18, 0x1e, 0x65, 0xc3, 0x53, 0xc4, 0x86, + 0x2d, 0xf1, 0xf3, 0xe5, 0xa1, 0x8b, 0x39, 0x3a, 0x6c, 0xf1, 0x33, 0x6b, 0x14, 0x51, 0x4e, 0xd5, + 0xed, 0x6c, 0xdf, 0x12, 0x3f, 0xe9, 0xbe, 0x7e, 0x77, 0xd0, 0x77, 0x5b, 0x2e, 0x62, 0x38, 0xf7, + 0xf0, 0x68, 0x48, 0x12, 0x1f, 0x7d, 0x2b, 0xa0, 0x01, 0x15, 0xcb, 0x56, 0xbc, 0x4a, 0xff, 0xbd, + 0x57, 0xa0, 0x74, 0x3e, 0xc2, 0x2c, 0x81, 0x98, 0x7f, 0x2a, 0xd0, 0xb0, 0x59, 0x70, 0xc2, 0x69, + 0x84, 0xbb, 0xd4, 0xc7, 0xea, 0x0e, 0x54, 0x19, 0x26, 0x3e, 0x8e, 0x34, 0x65, 0x57, 0xd9, 0xaf, + 0x3b, 0xa9, 0xa5, 0x3e, 0x82, 0xcd, 0x98, 0xa4, 0xe7, 0x9e, 0x73, 0xdc, 0xf3, 0xa8, 0x8f, 0xb5, + 0x5b, 0xbb, 0xca, 0x7e, 0xa3, 0x73, 0x7b, 0x72, 0xd9, 0x6c, 0x7c, 0xd4, 0x3e, 0xb1, 0x3b, 0xe7, + 0x5c, 0x30, 0x38, 0x8d, 0x18, 0x97, 0x59, 0x82, 0x8f, 0x8e, 0x23, 0x0f, 0x6b, 0xe5, 0x94, 0x4f, + 0x58, 0xaa, 0x06, 0x35, 0x77, 0x1c, 0x0e, 0x62, 0xa1, 0x8a, 0xd8, 0xc8, 0x4c, 0xf5, 0x31, 0xec, + 0x84, 0x84, 0x71, 0x44, 0x78, 0x88, 0x38, 0xee, 0x8d, 0x70, 0x34, 0x0c, 0x19, 0x0b, 0x29, 0xd1, + 0xd6, 0x76, 0x95, 0xfd, 0x8d, 0xa3, 0x3d, 0x6b, 0x6e, 0x81, 0xac, 0xb6, 0xe7, 0x61, 0xc6, 0xba, + 0x94, 0xf4, 0xc3, 0xc0, 0xd9, 0x96, 0x28, 0x3e, 0xc8, 0x19, 0xcc, 0xb7, 0x61, 0x4b, 0xce, 0xd6, + 0xc1, 0x6c, 0x44, 0x09, 0xc3, 0xea, 0x1e, 0xd4, 0xe2, 0x9c, 0x7a, 0xa1, 0x2f, 0xd2, 0xae, 0x74, + 0x60, 0x72, 0xd9, 0xac, 0xc6, 0x90, 0xe3, 0x77, 0x9d, 0x6a, 0xbc, 0x75, 0xec, 0x9b, 0x7f, 0x29, + 0xb0, 0x63, 0xb3, 0xe0, 0x78, 0xca, 0xdc, 0xa5, 0x84, 0x47, 0xc8, 0xe3, 0x85, 0x55, 0xdb, 0x82, + 0x35, 0xe4, 0x0f, 0x43, 0x22, 0x8a, 0x55, 0x77, 0x12, 0x43, 0x56, 0x2b, 0x17, 0xa9, 0xc5, 0xae, + 0x03, 0xe4, 0xe2, 0x41, 0x5a, 0x9e, 0xc4, 0x50, 0x5f, 0x84, 0xf5, 0x90, 0x84, 0xbc, 0x37, 0x64, + 0x81, 0x28, 0x47, 0xc3, 0xa9, 0xc5, 0xb6, 0xcd, 0x02, 0xf5, 0x63, 0x58, 0xeb, 0x8f, 0x89, 0xcf, + 0xb4, 0xea, 0x6e, 0x79, 0x7f, 0xe3, 0x68, 0xc7, 0x1a, 0xf4, 0x5d, 0x2b, 0x6e, 0x98, 0xbc, 0x42, + 0x5d, 0x1a, 0x92, 0xce, 0xc3, 0x8b, 0xcb, 0x66, 0xe9, 0xc7, 0xdf, 0x9a, 0x7b, 0x41, 0xc8, 0x3f, + 0x1b, 0xbb, 0x96, 0x47, 0x87, 0xad, 0x41, 0x48, 0x70, 0x6b, 0xd0, 0x77, 0x0f, 0x98, 0xff, 0x45, + 0xda, 0x1e, 0x31, 0x96, 0x39, 0x09, 0xa3, 0xf9, 0x3e, 0x18, 0xf3, 0x13, 0xcf, 0x0b, 0xa8, 0x41, + 0x0d, 0xf9, 0x7e, 0x84, 0x19, 0x4b, 0x2b, 0x90, 0x99, 0xaa, 0x0a, 0x15, 0x1f, 0x71, 0x94, 0xb4, + 0x8b, 0x23, 0xd6, 0xe6, 0x2f, 0x65, 0x30, 0xe5, 0x73, 0x68, 0x13, 0x7f, 0x95, 0xaa, 0xfe, 0x2f, + 0x7a, 0x71, 0xda, 0x1b, 0x55, 0xb9, 0x37, 0xf2, 0x63, 0xaf, 0xc9, 0xc7, 0xfe, 0xa6, 0x74, 0xec, + 0xeb, 0x22, 0xd7, 0x97, 0xfe, 0xbe, 0x6c, 0x6a, 0x98, 0x78, 0xd4, 0x0f, 0x49, 0xd0, 0xfa, 0x9c, + 0x51, 0x62, 0x39, 0xe8, 0xd4, 0xc6, 0x8c, 0xa1, 0x00, 0xcf, 0x69, 0x8a, 0xfa, 0x33, 0x6f, 0x8a, + 0x6f, 0xe0, 0x95, 0x9b, 0xcf, 0x70, 0xa5, 0x1b, 0x26, 0x77, 0xd1, 0xad, 0xf9, 0x5d, 0x54, 0x96, + 0xba, 0xe8, 0x67, 0x05, 0x54, 0x9b, 0x05, 0xef, 0x9d, 0x61, 0x6f, 0xbc, 0x44, 0xd7, 0xe8, 0xb0, + 0xee, 0xa5, 0x98, 0x94, 0x3d, 0xb7, 0xd5, 0xdb, 0x50, 0x8e, 0x4b, 0x9b, 0xb0, 0xc7, 0xcb, 0x69, + 0xe1, 0x2a, 0xcf, 0xbc, 0x70, 0xaf, 0x81, 0xfe, 0xef, 0xb0, 0xf3, 0x42, 0x65, 0x99, 0x2a, 0x52, + 0xa6, 0xdf, 0x25, 0x99, 0xda, 0x61, 0x10, 0xa1, 0xff, 0x98, 0xe9, 0x52, 0xb3, 0xa7, 0x09, 0x1b, + 0xc3, 0x44, 0x4b, 0x74, 0x5c, 0x45, 0x84, 0x02, 0xe9, 0x5f, 0x36, 0x0b, 0xd2, 0x14, 0x66, 0xe2, + 0x59, 0x98, 0x02, 0x82, 0x4d, 0x9b, 0x05, 0x1f, 0x8e, 0x7c, 0xc4, 0x71, 0x5b, 0x74, 0x7a, 0x51, + 0xf4, 0x77, 0xa1, 0x4e, 0xf0, 0x69, 0x4f, 0x9e, 0x9b, 0xeb, 0x04, 0x9f, 0x26, 0x4e, 0x72, 0x6a, + 0xe5, 0xeb, 0xa9, 0x99, 0x9a, 0x18, 0xcf, 0x92, 0x44, 0x16, 0x90, 0xd9, 0x85, 0xe7, 0x6c, 0x16, + 0x74, 0x07, 0x18, 0x45, 0x8b, 0xb5, 0x17, 0xd1, 0xdf, 0x81, 0xed, 0x6b, 0x24, 0x39, 0xfb, 0xb7, + 0x0a, 0xdc, 0xc9, 0x85, 0xb3, 0x62, 0x9c, 0x70, 0xc4, 0xc7, 0xec, 0xa9, 0x8e, 0xe8, 0x1d, 0xa8, + 0x32, 0xe1, 0x2d, 0x42, 0xd8, 0x3c, 0x7a, 0x50, 0x30, 0x64, 0xae, 0x4b, 0x39, 0xa9, 0x93, 0x79, + 0x0f, 0x9a, 0x05, 0xd1, 0x64, 0x11, 0x1f, 0xfd, 0x54, 0x83, 0x72, 0x3c, 0x1d, 0x3e, 0x81, 0xfa, + 0xf4, 0xe5, 0x2f, 0x9a, 0x65, 0xf2, 0x25, 0xd7, 0x1f, 0x2e, 0x01, 0xca, 0xfb, 0xe0, 0x2b, 0x78, + 0x61, 0xde, 0x58, 0x3f, 0x28, 0xe6, 0x98, 0x03, 0xd7, 0xdf, 0x58, 0x09, 0x9e, 0x8b, 0xff, 0xa0, + 0x40, 0xf3, 0xa6, 0x07, 0xe6, 0xad, 0x25, 0xb2, 0x99, 0xef, 0xaa, 0xb7, 0x9f, 0xda, 0x35, 0x8f, + 0x90, 0xc2, 0xf3, 0xb3, 0xb3, 0xeb, 0xe5, 0x62, 0xd6, 0x19, 0xa8, 0x7e, 0xb8, 0x34, 0x54, 0x16, + 0x9c, 0x1d, 0x21, 0x0b, 0x04, 0x67, 0xa0, 0x8b, 0x04, 0x8b, 0x06, 0x81, 0x07, 0x1b, 0xf2, 0x8d, + 0x7f, 0x50, 0xcc, 0x20, 0xc1, 0xf4, 0x83, 0xa5, 0x60, 0xb9, 0xc8, 0xa7, 0x00, 0xd2, 0xcd, 0xbe, + 0x5f, 0xec, 0x3c, 0x45, 0xe9, 0xaf, 0x2e, 0x83, 0xca, 0x15, 0xbe, 0x86, 0xad, 0xb9, 0x97, 0xdb, + 0xba, 0x29, 0xd0, 0xeb, 0x78, 0xfd, 0xd1, 0x6a, 0xf8, 0x4c, 0xbf, 0xd3, 0xb9, 0xf8, 0xc3, 0x28, + 0x5d, 0x4c, 0x0c, 0xe5, 0xc9, 0xc4, 0x50, 0x7e, 0x9f, 0x18, 0xca, 0xf7, 0x57, 0x46, 0xe9, 0xc9, + 0x95, 0x51, 0xfa, 0xf5, 0xca, 0x28, 0x3d, 0xbe, 0x5f, 0xf4, 0xf4, 0x9c, 0x25, 0x9f, 0xfd, 0xe2, + 0x05, 0x72, 0xab, 0xe2, 0x7b, 0xff, 0xf5, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xc2, 0x5f, + 0x5e, 0x7e, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -818,6 +819,7 @@ type MsgClient interface { StoreCode(ctx context.Context, in *MsgStoreCode, opts ...grpc.CallOption) (*MsgStoreCodeResponse, error) // Instantiate creates a new smart contract instance for the given code id. InstantiateContract(ctx context.Context, in *MsgInstantiateContract, opts ...grpc.CallOption) (*MsgInstantiateContractResponse, error) + // StoreCodeAndInstantiatecontract upload code and instantiate a contract using it. StoreCodeAndInstantiateContract(ctx context.Context, in *MsgStoreCodeAndInstantiateContract, opts ...grpc.CallOption) (*MsgStoreCodeAndInstantiateContractResponse, error) // Execute submits the given message data to a smart contract ExecuteContract(ctx context.Context, in *MsgExecuteContract, opts ...grpc.CallOption) (*MsgExecuteContractResponse, error) @@ -917,6 +919,7 @@ type MsgServer interface { StoreCode(context.Context, *MsgStoreCode) (*MsgStoreCodeResponse, error) // Instantiate creates a new smart contract instance for the given code id. InstantiateContract(context.Context, *MsgInstantiateContract) (*MsgInstantiateContractResponse, error) + // StoreCodeAndInstantiatecontract upload code and instantiate a contract using it. StoreCodeAndInstantiateContract(context.Context, *MsgStoreCodeAndInstantiateContract) (*MsgStoreCodeAndInstantiateContractResponse, error) // Execute submits the given message data to a smart contract ExecuteContract(context.Context, *MsgExecuteContract) (*MsgExecuteContractResponse, error) @@ -1145,7 +1148,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "tx.proto", + Metadata: "cosmwasm/wasm/v1beta1/tx.proto", } func (m *MsgStoreCode) Marshal() (dAtA []byte, err error) { diff --git a/x/wasm/types/types.pb.go b/x/wasm/types/types.pb.go index e2a49647b1..b59c8f9fa5 100644 --- a/x/wasm/types/types.pb.go +++ b/x/wasm/types/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: types.proto +// source: cosmwasm/wasm/v1beta1/types.proto package types @@ -57,7 +57,7 @@ var AccessType_value = map[string]int32{ } func (AccessType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{0} + return fileDescriptor_2548aa229a1f29bc, []int{0} } // ContractStatus types @@ -85,7 +85,7 @@ var ContractStatus_value = map[string]int32{ } func (ContractStatus) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{1} + return fileDescriptor_2548aa229a1f29bc, []int{1} } // ContractCodeHistoryOperationType actions that caused a code change @@ -121,7 +121,7 @@ func (x ContractCodeHistoryOperationType) String() string { } func (ContractCodeHistoryOperationType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{2} + return fileDescriptor_2548aa229a1f29bc, []int{2} } // AccessTypeParam @@ -133,7 +133,7 @@ func (m *AccessTypeParam) Reset() { *m = AccessTypeParam{} } func (m *AccessTypeParam) String() string { return proto.CompactTextString(m) } func (*AccessTypeParam) ProtoMessage() {} func (*AccessTypeParam) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{0} + return fileDescriptor_2548aa229a1f29bc, []int{0} } func (m *AccessTypeParam) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -172,7 +172,7 @@ func (m *AccessConfig) Reset() { *m = AccessConfig{} } func (m *AccessConfig) String() string { return proto.CompactTextString(m) } func (*AccessConfig) ProtoMessage() {} func (*AccessConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{1} + return fileDescriptor_2548aa229a1f29bc, []int{1} } func (m *AccessConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ type Params struct { func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{2} + return fileDescriptor_2548aa229a1f29bc, []int{2} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -263,7 +263,7 @@ func (m *CodeInfo) Reset() { *m = CodeInfo{} } func (m *CodeInfo) String() string { return proto.CompactTextString(m) } func (*CodeInfo) ProtoMessage() {} func (*CodeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{3} + return fileDescriptor_2548aa229a1f29bc, []int{3} } func (m *CodeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -318,7 +318,7 @@ func (m *ContractInfo) Reset() { *m = ContractInfo{} } func (m *ContractInfo) String() string { return proto.CompactTextString(m) } func (*ContractInfo) ProtoMessage() {} func (*ContractInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{4} + return fileDescriptor_2548aa229a1f29bc, []int{4} } func (m *ContractInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -361,7 +361,7 @@ func (m *ContractCodeHistoryEntry) Reset() { *m = ContractCodeHistoryEnt func (m *ContractCodeHistoryEntry) String() string { return proto.CompactTextString(m) } func (*ContractCodeHistoryEntry) ProtoMessage() {} func (*ContractCodeHistoryEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{5} + return fileDescriptor_2548aa229a1f29bc, []int{5} } func (m *ContractCodeHistoryEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -404,7 +404,7 @@ func (m *AbsoluteTxPosition) Reset() { *m = AbsoluteTxPosition{} } func (m *AbsoluteTxPosition) String() string { return proto.CompactTextString(m) } func (*AbsoluteTxPosition) ProtoMessage() {} func (*AbsoluteTxPosition) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{6} + return fileDescriptor_2548aa229a1f29bc, []int{6} } func (m *AbsoluteTxPosition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -445,7 +445,7 @@ func (m *Model) Reset() { *m = Model{} } func (m *Model) String() string { return proto.CompactTextString(m) } func (*Model) ProtoMessage() {} func (*Model) Descriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{7} + return fileDescriptor_2548aa229a1f29bc, []int{7} } func (m *Model) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -488,98 +488,99 @@ func init() { proto.RegisterType((*Model)(nil), "cosmwasm.wasm.v1beta1.Model") } -func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) } - -var fileDescriptor_d938547f84707355 = []byte{ - // 1405 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6f, 0x13, 0x47, - 0x14, 0xf6, 0xc6, 0x89, 0x13, 0x4f, 0x4c, 0x30, 0x43, 0x12, 0x1c, 0x03, 0xb6, 0x59, 0x40, 0x0d, - 0x10, 0x6c, 0x48, 0xab, 0xd2, 0x46, 0xa2, 0x92, 0xbd, 0x36, 0x64, 0xab, 0xc6, 0x8e, 0xc6, 0x0e, - 0x90, 0x4a, 0xd5, 0x6a, 0xbc, 0x3b, 0x71, 0xb6, 0xac, 0x77, 0xac, 0x9d, 0x71, 0xb0, 0x39, 0xb5, - 0xb7, 0xca, 0xbd, 0x54, 0x3d, 0xf5, 0x50, 0x57, 0x95, 0x5a, 0x55, 0xfc, 0x01, 0xfd, 0x23, 0x10, - 0x52, 0x25, 0x8e, 0x3d, 0x59, 0x6d, 0xb8, 0xb4, 0xd7, 0x1c, 0x39, 0x55, 0x3b, 0xbb, 0xc6, 0x9b, - 0xf0, 0x23, 0xee, 0x25, 0xf2, 0x7b, 0xf3, 0xbe, 0xef, 0xcd, 0xfb, 0xde, 0x9b, 0xb7, 0x01, 0xb3, - 0xbc, 0xdb, 0x22, 0x2c, 0xdb, 0x72, 0x28, 0xa7, 0x70, 0x41, 0xa7, 0xac, 0xf9, 0x08, 0xb3, 0x66, - 0x56, 0xfc, 0xd9, 0xbb, 0x59, 0x27, 0x1c, 0xdf, 0x4c, 0x2e, 0xb9, 0x6e, 0xca, 0x34, 0x11, 0x94, - 0xf3, 0x0c, 0x0f, 0x91, 0x9c, 0x6f, 0xd0, 0x06, 0xf5, 0xfc, 0xee, 0x2f, 0xdf, 0xbb, 0xd4, 0xa0, - 0xb4, 0x61, 0x91, 0x9c, 0xb0, 0xea, 0xed, 0x9d, 0x1c, 0xb6, 0xbb, 0xde, 0x91, 0x5c, 0x07, 0x27, - 0xf3, 0xba, 0x4e, 0x18, 0xab, 0x75, 0x5b, 0x64, 0x13, 0x3b, 0xb8, 0x09, 0x55, 0x30, 0xb5, 0x87, - 0xad, 0x36, 0x49, 0x48, 0x19, 0x69, 0x79, 0x6e, 0xf5, 0x42, 0xf6, 0x8d, 0xb7, 0xc8, 0x8e, 0x60, - 0x85, 0xf8, 0xc1, 0x20, 0x1d, 0xeb, 0xe2, 0xa6, 0xb5, 0x26, 0x0b, 0xa4, 0x8c, 0x3c, 0x86, 0xb5, - 0xc9, 0x1f, 0x7e, 0x4e, 0x4b, 0xf2, 0x8f, 0x12, 0x88, 0x79, 0xd1, 0x0a, 0xb5, 0x77, 0xcc, 0x06, - 0x7c, 0x00, 0x40, 0x8b, 0x38, 0x4d, 0x93, 0x31, 0x93, 0xda, 0xe3, 0xa7, 0x59, 0x38, 0x18, 0xa4, - 0x4f, 0x79, 0x69, 0x46, 0x70, 0x19, 0x05, 0xb8, 0xe0, 0x0a, 0x98, 0xc6, 0x86, 0xe1, 0x10, 0xc6, - 0x12, 0x13, 0x19, 0x69, 0x39, 0x5a, 0x80, 0x07, 0x83, 0xf4, 0x9c, 0x87, 0xf1, 0x0f, 0x64, 0x34, - 0x0c, 0xf1, 0xaf, 0xf7, 0xd3, 0x14, 0x88, 0x88, 0xca, 0x19, 0xe4, 0x00, 0xea, 0xd4, 0x20, 0x5a, - 0xbb, 0x65, 0x51, 0x6c, 0x68, 0x58, 0xe4, 0x16, 0x17, 0x9c, 0x5d, 0xbd, 0xf8, 0xce, 0x0b, 0x7a, - 0x95, 0x15, 0x2e, 0x3c, 0x1d, 0xa4, 0x43, 0x07, 0x83, 0xf4, 0x92, 0x97, 0xf2, 0x75, 0x32, 0x19, - 0xc5, 0x5d, 0xe7, 0x96, 0xf0, 0x79, 0x50, 0xf8, 0xbd, 0x04, 0x52, 0xa6, 0xcd, 0x38, 0xb6, 0xb9, - 0x89, 0x39, 0xd1, 0x0c, 0xb2, 0x83, 0xdb, 0x16, 0xd7, 0x02, 0x1a, 0x4d, 0x8c, 0xab, 0xd1, 0x95, - 0x83, 0x41, 0xfa, 0xb2, 0x97, 0xfc, 0xdd, 0x94, 0x32, 0x3a, 0x17, 0x08, 0x28, 0x7a, 0xe7, 0x9b, - 0x23, 0x25, 0xbf, 0x92, 0xc0, 0xa2, 0x4e, 0x6d, 0xee, 0x60, 0x9d, 0x6b, 0x8c, 0x63, 0xde, 0x66, - 0x43, 0x3d, 0xc2, 0xe3, 0xeb, 0x71, 0xd9, 0xd7, 0xe3, 0xfc, 0x50, 0x8f, 0x37, 0x11, 0xca, 0x68, - 0x7e, 0x78, 0x50, 0x15, 0x7e, 0x5f, 0x97, 0x4f, 0x01, 0x6c, 0xe2, 0x8e, 0xe6, 0xb2, 0x6b, 0x42, - 0x49, 0x66, 0x3e, 0x26, 0x89, 0xc9, 0x8c, 0xb4, 0x3c, 0x59, 0x38, 0x3f, 0x12, 0xf9, 0xf5, 0x18, - 0x19, 0x9d, 0x6c, 0xe2, 0xce, 0x7d, 0xcc, 0x9a, 0x0a, 0x35, 0x48, 0xd5, 0x7c, 0x4c, 0xe0, 0xc7, - 0x60, 0xae, 0x81, 0x99, 0xd6, 0x6c, 0x5b, 0xdc, 0x6c, 0x59, 0x26, 0x71, 0x12, 0x53, 0x82, 0x27, - 0x30, 0x1f, 0x2e, 0x4f, 0x03, 0x33, 0x19, 0x9d, 0x68, 0x60, 0xb6, 0xf1, 0x2a, 0x10, 0xde, 0x06, - 0x27, 0x3c, 0xa5, 0x74, 0xa2, 0xe9, 0x94, 0xf1, 0x44, 0x44, 0x20, 0x13, 0x07, 0x83, 0xf4, 0x7c, - 0x50, 0x69, 0xff, 0x58, 0x46, 0xb1, 0xa1, 0xad, 0x50, 0xc6, 0xe1, 0x1a, 0x88, 0xe9, 0xb4, 0xd9, - 0x32, 0x2d, 0x1f, 0x3d, 0x2d, 0xd0, 0x67, 0x0e, 0x06, 0xe9, 0xd3, 0x43, 0x51, 0x46, 0xa7, 0x32, - 0x9a, 0xf5, 0x4d, 0x17, 0x2b, 0x06, 0x34, 0x24, 0xff, 0x21, 0x81, 0x19, 0xb7, 0x10, 0xd5, 0xde, - 0xa1, 0xf0, 0x2c, 0x88, 0x8a, 0x3a, 0x77, 0x31, 0xdb, 0x15, 0x93, 0x19, 0x43, 0x33, 0xae, 0x63, - 0x1d, 0xb3, 0x5d, 0x98, 0x00, 0xd3, 0xba, 0x43, 0x30, 0xa7, 0x8e, 0x37, 0xfe, 0x68, 0x68, 0xc2, - 0x45, 0x10, 0x61, 0xb4, 0xed, 0xe8, 0x44, 0x74, 0x2f, 0x8a, 0x7c, 0xcb, 0x45, 0xd4, 0xdb, 0xa6, - 0x65, 0x10, 0x47, 0x08, 0x1b, 0x45, 0x43, 0x13, 0x3e, 0x00, 0x30, 0x38, 0x41, 0xba, 0x68, 0xa8, - 0x50, 0x6d, 0xcc, 0xde, 0x4f, 0xba, 0xbd, 0x47, 0xa7, 0x02, 0x24, 0xde, 0x81, 0xfc, 0x75, 0x18, - 0xc4, 0x14, 0xbf, 0xe1, 0xa2, 0xa6, 0x8b, 0x60, 0x5a, 0xd4, 0x64, 0x1a, 0xa2, 0xa2, 0xc9, 0x02, - 0xd8, 0x1f, 0xa4, 0x23, 0xa2, 0xe4, 0x22, 0x8a, 0xb8, 0x47, 0xaa, 0xf1, 0x8e, 0xda, 0xe6, 0xc1, - 0x14, 0x36, 0x9a, 0xa6, 0xed, 0x97, 0xe6, 0x19, 0xae, 0xd7, 0xc2, 0x75, 0x62, 0xf9, 0x75, 0x79, - 0x06, 0x54, 0x7c, 0x16, 0x62, 0xf8, 0xa5, 0x5c, 0x79, 0x5b, 0x29, 0x75, 0x46, 0xad, 0x36, 0x27, - 0xb5, 0xce, 0x26, 0x65, 0x26, 0x37, 0xa9, 0x8d, 0x86, 0x48, 0x78, 0x1d, 0xcc, 0x9a, 0x75, 0x5d, - 0x6b, 0x51, 0x87, 0xbb, 0x77, 0x8e, 0x88, 0x4d, 0x73, 0x62, 0x7f, 0x90, 0x8e, 0xaa, 0x05, 0x65, - 0x93, 0x3a, 0x5c, 0x2d, 0xa2, 0xa8, 0x59, 0xd7, 0xc5, 0x4f, 0x03, 0xde, 0x06, 0x11, 0x6f, 0xde, - 0x45, 0xef, 0xe7, 0x56, 0x2f, 0xbf, 0x25, 0xa5, 0x72, 0xe8, 0x11, 0x20, 0x1f, 0x04, 0x37, 0x40, - 0x94, 0x74, 0x38, 0xb1, 0xc5, 0x22, 0x98, 0x11, 0x97, 0x9e, 0xcf, 0x7a, 0x1b, 0x3d, 0x3b, 0xdc, - 0xe8, 0xd9, 0xbc, 0xdd, 0x2d, 0x2c, 0x3d, 0xfb, 0xfd, 0xfa, 0x42, 0x50, 0xd8, 0xd2, 0x10, 0x86, - 0x46, 0x0c, 0x6b, 0x93, 0xff, 0xb8, 0x4b, 0xef, 0xdb, 0x09, 0x90, 0x18, 0x86, 0xba, 0x42, 0xaf, - 0x9b, 0x8c, 0x53, 0xa7, 0x5b, 0xb2, 0xb9, 0xd3, 0x85, 0x5b, 0x20, 0x4a, 0x5b, 0xc4, 0xc1, 0x7c, - 0xb4, 0x9e, 0x6f, 0x1d, 0x73, 0xe7, 0x00, 0x47, 0x65, 0x08, 0x75, 0x17, 0x12, 0x1a, 0x31, 0x05, - 0xdb, 0x3c, 0xf1, 0xd6, 0x36, 0x2b, 0x60, 0xba, 0xdd, 0x32, 0x44, 0x83, 0xc2, 0xff, 0xbb, 0x41, - 0x3e, 0x12, 0x66, 0x41, 0xb8, 0xc9, 0x1a, 0xa2, 0xf3, 0xb1, 0xc2, 0xb9, 0x97, 0x83, 0x74, 0x82, - 0xd8, 0x3a, 0x35, 0x4c, 0xbb, 0x91, 0xfb, 0x92, 0x51, 0x3b, 0x8b, 0xf0, 0xa3, 0x0d, 0xc2, 0x18, - 0x6e, 0x10, 0xe4, 0x06, 0xca, 0x08, 0xc0, 0xd7, 0xe9, 0xe0, 0x05, 0x10, 0xab, 0x5b, 0x54, 0x7f, - 0xa8, 0xed, 0x12, 0xb3, 0xb1, 0xcb, 0xbd, 0xd9, 0x44, 0xb3, 0xc2, 0xb7, 0x2e, 0x5c, 0x70, 0x09, - 0xcc, 0xf0, 0x8e, 0x66, 0xda, 0x06, 0xe9, 0x78, 0x35, 0xa1, 0x69, 0xde, 0x51, 0x5d, 0x53, 0xc6, - 0x60, 0x6a, 0x83, 0x1a, 0xc4, 0x82, 0x05, 0x10, 0x7e, 0x48, 0xba, 0xde, 0x5b, 0x2d, 0xdc, 0x78, - 0x39, 0x48, 0xaf, 0x34, 0x4c, 0xbe, 0xdb, 0xae, 0x67, 0x75, 0xda, 0xcc, 0x59, 0xa6, 0x4d, 0x72, - 0x94, 0xb9, 0x1a, 0x52, 0x3b, 0x67, 0x99, 0x75, 0x96, 0xab, 0x77, 0x39, 0x61, 0xd9, 0x75, 0xd2, - 0x29, 0xb8, 0x3f, 0x90, 0x0b, 0x76, 0x87, 0xd9, 0xfb, 0x26, 0x4f, 0x88, 0x17, 0xef, 0x19, 0x57, - 0xff, 0x95, 0x00, 0x18, 0xed, 0x7e, 0xf8, 0x21, 0x38, 0x93, 0x57, 0x94, 0x52, 0xb5, 0xaa, 0xd5, - 0xb6, 0x37, 0x4b, 0xda, 0x56, 0xb9, 0xba, 0x59, 0x52, 0xd4, 0x3b, 0x6a, 0xa9, 0x18, 0x0f, 0x25, - 0x97, 0x7a, 0xfd, 0xcc, 0xc2, 0x28, 0x78, 0xcb, 0x66, 0x2d, 0xa2, 0x9b, 0x3b, 0x26, 0x31, 0xe0, - 0x0a, 0x80, 0x41, 0x5c, 0xb9, 0x52, 0xa8, 0x14, 0xb7, 0xe3, 0x52, 0x72, 0xbe, 0xd7, 0xcf, 0xc4, - 0x47, 0x90, 0x32, 0xad, 0x53, 0xa3, 0x0b, 0x6f, 0x81, 0x44, 0x30, 0xba, 0x52, 0xfe, 0x6c, 0x5b, - 0xcb, 0x17, 0x8b, 0xa8, 0x54, 0xad, 0xc6, 0x27, 0x8e, 0xa6, 0xa9, 0xd8, 0x56, 0x37, 0xef, 0x7d, - 0x6d, 0xe1, 0x2a, 0x58, 0x08, 0x02, 0x4b, 0xf7, 0x4a, 0x68, 0x5b, 0x64, 0x0a, 0x27, 0xcf, 0xf4, - 0xfa, 0x99, 0xd3, 0x23, 0x54, 0x69, 0x8f, 0x38, 0x5d, 0x37, 0x59, 0x72, 0xe6, 0x9b, 0x5f, 0x52, - 0xa1, 0x27, 0xbf, 0xa6, 0x42, 0x57, 0x9f, 0x49, 0x60, 0xee, 0xf0, 0x03, 0x81, 0x9f, 0x80, 0xb3, - 0x4a, 0xa5, 0x5c, 0x43, 0x79, 0xa5, 0xa6, 0x55, 0x6b, 0xf9, 0xda, 0x56, 0xf5, 0x48, 0xcd, 0xe7, - 0x7b, 0xfd, 0xcc, 0xd2, 0x61, 0x50, 0xb0, 0xee, 0x0f, 0xc0, 0xe2, 0x51, 0x7c, 0x5e, 0xa9, 0xa9, - 0xf7, 0x4a, 0x71, 0x29, 0x99, 0xe8, 0xf5, 0x33, 0xf3, 0xca, 0x91, 0xaf, 0x12, 0x37, 0xf7, 0x08, - 0xfc, 0x08, 0x24, 0x8e, 0xa2, 0xd4, 0xb2, 0x8f, 0x9b, 0x48, 0x26, 0x7b, 0xfd, 0xcc, 0xe2, 0x61, - 0x9c, 0x6a, 0x63, 0x81, 0x0c, 0x14, 0xf3, 0x5b, 0x18, 0x64, 0x8e, 0x7b, 0x39, 0x90, 0x80, 0x1b, - 0xaf, 0x12, 0x29, 0x95, 0x62, 0x49, 0x5b, 0x57, 0xab, 0xb5, 0x0a, 0xda, 0xd6, 0x2a, 0x9b, 0x25, - 0x94, 0xaf, 0xa9, 0x95, 0xf2, 0x9b, 0xfa, 0x9c, 0xeb, 0xf5, 0x33, 0xd7, 0x8e, 0xe3, 0x0e, 0xaa, - 0x70, 0x1f, 0x5c, 0x19, 0x2b, 0x8d, 0x5a, 0x56, 0x6b, 0x71, 0x29, 0xb9, 0xdc, 0xeb, 0x67, 0x2e, - 0x1d, 0xc7, 0xaf, 0xda, 0x26, 0x87, 0x5f, 0x80, 0x95, 0xb1, 0x88, 0x37, 0xd4, 0xbb, 0x28, 0x5f, - 0x73, 0xc5, 0xbb, 0xd6, 0xeb, 0x67, 0xde, 0x3b, 0x8e, 0x7b, 0xc3, 0x6c, 0x38, 0x98, 0x93, 0xb1, - 0xe9, 0xef, 0x96, 0xca, 0xa5, 0xaa, 0x5a, 0x8d, 0x87, 0xc7, 0xa3, 0xbf, 0x4b, 0x6c, 0xc2, 0x4c, - 0x96, 0x9c, 0x74, 0x9b, 0x55, 0xb8, 0xf3, 0xf4, 0xef, 0x54, 0xe8, 0xc9, 0x7e, 0x4a, 0x7a, 0xba, - 0x9f, 0x92, 0x9e, 0xef, 0xa7, 0xa4, 0xbf, 0xf6, 0x53, 0xd2, 0x77, 0x2f, 0x52, 0xa1, 0xe7, 0x2f, - 0x52, 0xa1, 0x3f, 0x5f, 0xa4, 0x42, 0x9f, 0x5f, 0x3a, 0xfa, 0x98, 0xad, 0x9d, 0xfa, 0x75, 0x66, - 0x3c, 0xcc, 0x75, 0x72, 0xee, 0xba, 0xca, 0x89, 0xff, 0xe7, 0xeb, 0x11, 0xb1, 0xa8, 0xdf, 0xff, - 0x2f, 0x00, 0x00, 0xff, 0xff, 0x88, 0xec, 0xe8, 0x19, 0xdf, 0x0b, 0x00, 0x00, +func init() { proto.RegisterFile("cosmwasm/wasm/v1beta1/types.proto", fileDescriptor_2548aa229a1f29bc) } + +var fileDescriptor_2548aa229a1f29bc = []byte{ + // 1414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6f, 0xdb, 0xc6, + 0x12, 0x16, 0x2d, 0x5b, 0xb6, 0xd6, 0x8a, 0xa3, 0x6c, 0x6c, 0x47, 0x56, 0x12, 0x49, 0x66, 0x12, + 0x3c, 0x27, 0x71, 0xa4, 0xc4, 0xef, 0xe1, 0xa5, 0x35, 0x90, 0x02, 0x12, 0xa5, 0xc4, 0x2c, 0x6a, + 0xc9, 0x58, 0xc9, 0x49, 0x5c, 0xa0, 0x20, 0x56, 0xe4, 0x5a, 0x66, 0x43, 0x71, 0x05, 0xee, 0xca, + 0x91, 0x72, 0x6a, 0x6f, 0x85, 0x7a, 0x29, 0x7a, 0xea, 0xa1, 0x2a, 0x0a, 0xb4, 0x28, 0xf2, 0x07, + 0xf4, 0x8f, 0x08, 0x02, 0x14, 0xc8, 0xb1, 0x27, 0xa1, 0x75, 0x2e, 0xed, 0xd5, 0xc7, 0x9c, 0x0a, + 0x2e, 0xa9, 0x88, 0x76, 0x7e, 0x58, 0xbd, 0x10, 0x9c, 0xd9, 0xf9, 0xbe, 0xd9, 0xf9, 0x66, 0x77, + 0x48, 0xb0, 0xac, 0x53, 0xd6, 0x7c, 0x8c, 0x59, 0x33, 0x27, 0x1e, 0xfb, 0xb7, 0xea, 0x84, 0xe3, + 0x5b, 0x39, 0xde, 0x6d, 0x11, 0x96, 0x6d, 0x39, 0x94, 0x53, 0xb8, 0x30, 0x0c, 0xc9, 0x8a, 0x87, + 0x1f, 0x92, 0x5c, 0x72, 0xdd, 0x94, 0x69, 0x22, 0x28, 0xe7, 0x19, 0x1e, 0x22, 0x39, 0xdf, 0xa0, + 0x0d, 0xea, 0xf9, 0xdd, 0x37, 0xdf, 0xbb, 0xd4, 0xa0, 0xb4, 0x61, 0x91, 0x9c, 0xb0, 0xea, 0xed, + 0xdd, 0x1c, 0xb6, 0xbb, 0xde, 0x92, 0x5c, 0x07, 0xa7, 0xf3, 0xba, 0x4e, 0x18, 0xab, 0x75, 0x5b, + 0x64, 0x0b, 0x3b, 0xb8, 0x09, 0x55, 0x30, 0xb5, 0x8f, 0xad, 0x36, 0x49, 0x48, 0x19, 0x69, 0x65, + 0x6e, 0x6d, 0x39, 0xfb, 0xd6, 0x5d, 0x64, 0x47, 0xb0, 0x42, 0xfc, 0x70, 0x90, 0x8e, 0x75, 0x71, + 0xd3, 0x5a, 0x97, 0x05, 0x52, 0x46, 0x1e, 0xc3, 0xfa, 0xe4, 0x77, 0x3f, 0xa6, 0x25, 0xf9, 0x7b, + 0x09, 0xc4, 0xbc, 0x68, 0x85, 0xda, 0xbb, 0x66, 0x03, 0x3e, 0x04, 0xa0, 0x45, 0x9c, 0xa6, 0xc9, + 0x98, 0x49, 0xed, 0xf1, 0xd3, 0x2c, 0x1c, 0x0e, 0xd2, 0x67, 0xbc, 0x34, 0x23, 0xb8, 0x8c, 0x02, + 0x5c, 0x70, 0x15, 0x4c, 0x63, 0xc3, 0x70, 0x08, 0x63, 0x89, 0x89, 0x8c, 0xb4, 0x12, 0x2d, 0xc0, + 0xc3, 0x41, 0x7a, 0xce, 0xc3, 0xf8, 0x0b, 0x32, 0x1a, 0x86, 0xf8, 0xdb, 0xfb, 0x61, 0x0a, 0x44, + 0x44, 0xe5, 0x0c, 0x72, 0x00, 0x75, 0x6a, 0x10, 0xad, 0xdd, 0xb2, 0x28, 0x36, 0x34, 0x2c, 0x72, + 0x8b, 0x0d, 0xce, 0xae, 0x5d, 0x7a, 0xef, 0x06, 0xbd, 0xca, 0x0a, 0xcb, 0xcf, 0x06, 0xe9, 0xd0, + 0xe1, 0x20, 0xbd, 0xe4, 0xa5, 0x7c, 0x93, 0x4c, 0x46, 0x71, 0xd7, 0xb9, 0x2d, 0x7c, 0x1e, 0x14, + 0x7e, 0x2b, 0x81, 0x94, 0x69, 0x33, 0x8e, 0x6d, 0x6e, 0x62, 0x4e, 0x34, 0x83, 0xec, 0xe2, 0xb6, + 0xc5, 0xb5, 0x80, 0x46, 0x13, 0xe3, 0x6a, 0x74, 0xf5, 0x70, 0x90, 0xbe, 0xe2, 0x25, 0x7f, 0x3f, + 0xa5, 0x8c, 0x2e, 0x04, 0x02, 0x8a, 0xde, 0xfa, 0xd6, 0x48, 0xc9, 0x2f, 0x24, 0xb0, 0xa8, 0x53, + 0x9b, 0x3b, 0x58, 0xe7, 0x1a, 0xe3, 0x98, 0xb7, 0xd9, 0x50, 0x8f, 0xf0, 0xf8, 0x7a, 0x5c, 0xf1, + 0xf5, 0xb8, 0x38, 0xd4, 0xe3, 0x6d, 0x84, 0x32, 0x9a, 0x1f, 0x2e, 0x54, 0x85, 0xdf, 0xd7, 0xe5, + 0x63, 0x00, 0x9b, 0xb8, 0xa3, 0xb9, 0xec, 0x9a, 0x50, 0x92, 0x99, 0x4f, 0x48, 0x62, 0x32, 0x23, + 0xad, 0x4c, 0x16, 0x2e, 0x8e, 0x44, 0x7e, 0x33, 0x46, 0x46, 0xa7, 0x9b, 0xb8, 0xf3, 0x00, 0xb3, + 0xa6, 0x42, 0x0d, 0x52, 0x35, 0x9f, 0x10, 0xf8, 0x21, 0x98, 0x6b, 0x60, 0xa6, 0x35, 0xdb, 0x16, + 0x37, 0x5b, 0x96, 0x49, 0x9c, 0xc4, 0x94, 0xe0, 0x09, 0x9c, 0x0f, 0x97, 0xa7, 0x81, 0x99, 0x8c, + 0x4e, 0x35, 0x30, 0xdb, 0x7c, 0x1d, 0x08, 0xef, 0x80, 0x53, 0x9e, 0x52, 0x3a, 0xd1, 0x74, 0xca, + 0x78, 0x22, 0x22, 0x90, 0x89, 0xc3, 0x41, 0x7a, 0x3e, 0xa8, 0xb4, 0xbf, 0x2c, 0xa3, 0xd8, 0xd0, + 0x56, 0x28, 0xe3, 0x70, 0x1d, 0xc4, 0x74, 0xda, 0x6c, 0x99, 0x96, 0x8f, 0x9e, 0x16, 0xe8, 0x73, + 0x87, 0x83, 0xf4, 0xd9, 0xa1, 0x28, 0xa3, 0x55, 0x19, 0xcd, 0xfa, 0xa6, 0x8b, 0x15, 0x07, 0x34, + 0x24, 0xff, 0x26, 0x81, 0x19, 0xb7, 0x10, 0xd5, 0xde, 0xa5, 0xf0, 0x3c, 0x88, 0x8a, 0x3a, 0xf7, + 0x30, 0xdb, 0x13, 0x27, 0x33, 0x86, 0x66, 0x5c, 0xc7, 0x06, 0x66, 0x7b, 0x30, 0x01, 0xa6, 0x75, + 0x87, 0x60, 0x4e, 0x1d, 0xef, 0xf8, 0xa3, 0xa1, 0x09, 0x17, 0x41, 0x84, 0xd1, 0xb6, 0xa3, 0x13, + 0xd1, 0xbd, 0x28, 0xf2, 0x2d, 0x17, 0x51, 0x6f, 0x9b, 0x96, 0x41, 0x1c, 0x21, 0x6c, 0x14, 0x0d, + 0x4d, 0xf8, 0x10, 0xc0, 0xe0, 0x09, 0xd2, 0x45, 0x43, 0x85, 0x6a, 0x63, 0xf6, 0x7e, 0xd2, 0xed, + 0x3d, 0x3a, 0x13, 0x20, 0xf1, 0x16, 0xe4, 0x2f, 0xc3, 0x20, 0xa6, 0xf8, 0x0d, 0x17, 0x35, 0x5d, + 0x02, 0xd3, 0xa2, 0x26, 0xd3, 0x10, 0x15, 0x4d, 0x16, 0xc0, 0xc1, 0x20, 0x1d, 0x11, 0x25, 0x17, + 0x51, 0xc4, 0x5d, 0x52, 0x8d, 0xf7, 0xd4, 0x36, 0x0f, 0xa6, 0xb0, 0xd1, 0x34, 0x6d, 0xbf, 0x34, + 0xcf, 0x70, 0xbd, 0x16, 0xae, 0x13, 0xcb, 0xaf, 0xcb, 0x33, 0xa0, 0xe2, 0xb3, 0x10, 0xc3, 0x2f, + 0xe5, 0xea, 0xbb, 0x4a, 0xa9, 0x33, 0x6a, 0xb5, 0x39, 0xa9, 0x75, 0xb6, 0x28, 0x33, 0xb9, 0x49, + 0x6d, 0x34, 0x44, 0xc2, 0x1b, 0x60, 0xd6, 0xac, 0xeb, 0x5a, 0x8b, 0x3a, 0xdc, 0xdd, 0x73, 0x44, + 0x4c, 0x9a, 0x53, 0x07, 0x83, 0x74, 0x54, 0x2d, 0x28, 0x5b, 0xd4, 0xe1, 0x6a, 0x11, 0x45, 0xcd, + 0xba, 0x2e, 0x5e, 0x0d, 0x78, 0x07, 0x44, 0xbc, 0xf3, 0x2e, 0x7a, 0x3f, 0xb7, 0x76, 0xe5, 0x1d, + 0x29, 0x95, 0x23, 0x97, 0x00, 0xf9, 0x20, 0xb8, 0x09, 0xa2, 0xa4, 0xc3, 0x89, 0x2d, 0x06, 0xc1, + 0x8c, 0xd8, 0xf4, 0x7c, 0xd6, 0x9b, 0xe8, 0xd9, 0xe1, 0x44, 0xcf, 0xe6, 0xed, 0x6e, 0x61, 0xe9, + 0xf9, 0xaf, 0x37, 0x16, 0x82, 0xc2, 0x96, 0x86, 0x30, 0x34, 0x62, 0x58, 0x9f, 0xfc, 0xcb, 0x1d, + 0x7a, 0x5f, 0x4f, 0x80, 0xc4, 0x30, 0xd4, 0x15, 0x7a, 0xc3, 0x64, 0x9c, 0x3a, 0xdd, 0x92, 0xcd, + 0x9d, 0x2e, 0xdc, 0x06, 0x51, 0xda, 0x22, 0x0e, 0xe6, 0xa3, 0xf1, 0x7c, 0xfb, 0x84, 0x3d, 0x07, + 0x38, 0x2a, 0x43, 0xa8, 0x3b, 0x90, 0xd0, 0x88, 0x29, 0xd8, 0xe6, 0x89, 0x77, 0xb6, 0x59, 0x01, + 0xd3, 0xed, 0x96, 0x21, 0x1a, 0x14, 0xfe, 0xd7, 0x0d, 0xf2, 0x91, 0x30, 0x0b, 0xc2, 0x4d, 0xd6, + 0x10, 0x9d, 0x8f, 0x15, 0x2e, 0xbc, 0x1a, 0xa4, 0x13, 0xc4, 0xd6, 0xa9, 0x61, 0xda, 0x8d, 0xdc, + 0xe7, 0x8c, 0xda, 0x59, 0x84, 0x1f, 0x6f, 0x12, 0xc6, 0x70, 0x83, 0x20, 0x37, 0x50, 0x46, 0x00, + 0xbe, 0x49, 0x07, 0x97, 0x41, 0xac, 0x6e, 0x51, 0xfd, 0x91, 0xb6, 0x47, 0xcc, 0xc6, 0x1e, 0xf7, + 0xce, 0x26, 0x9a, 0x15, 0xbe, 0x0d, 0xe1, 0x82, 0x4b, 0x60, 0x86, 0x77, 0x34, 0xd3, 0x36, 0x48, + 0xc7, 0xab, 0x09, 0x4d, 0xf3, 0x8e, 0xea, 0x9a, 0x32, 0x06, 0x53, 0x9b, 0xd4, 0x20, 0x16, 0x2c, + 0x80, 0xf0, 0x23, 0xd2, 0xf5, 0xee, 0x6a, 0xe1, 0xe6, 0xab, 0x41, 0x7a, 0xb5, 0x61, 0xf2, 0xbd, + 0x76, 0x3d, 0xab, 0xd3, 0x66, 0xce, 0x32, 0x6d, 0x92, 0xa3, 0xcc, 0xd5, 0x90, 0xda, 0x39, 0xcb, + 0xac, 0xb3, 0x5c, 0xbd, 0xcb, 0x09, 0xcb, 0x6e, 0x90, 0x4e, 0xc1, 0x7d, 0x41, 0x2e, 0xd8, 0x3d, + 0xcc, 0xde, 0x37, 0x79, 0x42, 0xdc, 0x78, 0xcf, 0xb8, 0xf6, 0xb7, 0x04, 0xc0, 0x68, 0xf6, 0xc3, + 0xff, 0x83, 0x73, 0x79, 0x45, 0x29, 0x55, 0xab, 0x5a, 0x6d, 0x67, 0xab, 0xa4, 0x6d, 0x97, 0xab, + 0x5b, 0x25, 0x45, 0xbd, 0xab, 0x96, 0x8a, 0xf1, 0x50, 0x72, 0xa9, 0xd7, 0xcf, 0x2c, 0x8c, 0x82, + 0xb7, 0x6d, 0xd6, 0x22, 0xba, 0xb9, 0x6b, 0x12, 0x03, 0xae, 0x02, 0x18, 0xc4, 0x95, 0x2b, 0x85, + 0x4a, 0x71, 0x27, 0x2e, 0x25, 0xe7, 0x7b, 0xfd, 0x4c, 0x7c, 0x04, 0x29, 0xd3, 0x3a, 0x35, 0xba, + 0xf0, 0x36, 0x48, 0x04, 0xa3, 0x2b, 0xe5, 0x4f, 0x76, 0xb4, 0x7c, 0xb1, 0x88, 0x4a, 0xd5, 0x6a, + 0x7c, 0xe2, 0x78, 0x9a, 0x8a, 0x6d, 0x75, 0xf3, 0xde, 0xd7, 0x16, 0xae, 0x81, 0x85, 0x20, 0xb0, + 0x74, 0xbf, 0x84, 0x76, 0x44, 0xa6, 0x70, 0xf2, 0x5c, 0xaf, 0x9f, 0x39, 0x3b, 0x42, 0x95, 0xf6, + 0x89, 0xd3, 0x75, 0x93, 0x25, 0x67, 0xbe, 0xfa, 0x29, 0x15, 0x7a, 0xfa, 0x73, 0x2a, 0x74, 0xed, + 0xb9, 0x04, 0xe6, 0x8e, 0x5e, 0x10, 0xf8, 0x11, 0x38, 0xaf, 0x54, 0xca, 0x35, 0x94, 0x57, 0x6a, + 0x5a, 0xb5, 0x96, 0xaf, 0x6d, 0x57, 0x8f, 0xd5, 0x7c, 0xb1, 0xd7, 0xcf, 0x2c, 0x1d, 0x05, 0x05, + 0xeb, 0xfe, 0x1f, 0x58, 0x3c, 0x8e, 0xcf, 0x2b, 0x35, 0xf5, 0x7e, 0x29, 0x2e, 0x25, 0x13, 0xbd, + 0x7e, 0x66, 0x5e, 0x39, 0xf6, 0x55, 0xe2, 0xe6, 0x3e, 0x81, 0x1f, 0x80, 0xc4, 0x71, 0x94, 0x5a, + 0xf6, 0x71, 0x13, 0xc9, 0x64, 0xaf, 0x9f, 0x59, 0x3c, 0x8a, 0x53, 0x6d, 0x2c, 0x90, 0x81, 0x62, + 0x7e, 0x09, 0x83, 0xcc, 0x49, 0x37, 0x07, 0x12, 0x70, 0xf3, 0x75, 0x22, 0xa5, 0x52, 0x2c, 0x69, + 0x1b, 0x6a, 0xb5, 0x56, 0x41, 0x3b, 0x5a, 0x65, 0xab, 0x84, 0xf2, 0x35, 0xb5, 0x52, 0x7e, 0x5b, + 0x9f, 0x73, 0xbd, 0x7e, 0xe6, 0xfa, 0x49, 0xdc, 0x41, 0x15, 0x1e, 0x80, 0xab, 0x63, 0xa5, 0x51, + 0xcb, 0x6a, 0x2d, 0x2e, 0x25, 0x57, 0x7a, 0xfd, 0xcc, 0xe5, 0x93, 0xf8, 0x55, 0xdb, 0xe4, 0xf0, + 0x33, 0xb0, 0x3a, 0x16, 0xf1, 0xa6, 0x7a, 0x0f, 0xe5, 0x6b, 0xae, 0x78, 0xd7, 0x7b, 0xfd, 0xcc, + 0x7f, 0x4e, 0xe2, 0xde, 0x34, 0x1b, 0x0e, 0xe6, 0x64, 0x6c, 0xfa, 0x7b, 0xa5, 0x72, 0xa9, 0xaa, + 0x56, 0xe3, 0xe1, 0xf1, 0xe8, 0xef, 0x11, 0x9b, 0x30, 0x93, 0x25, 0x27, 0xdd, 0x66, 0x15, 0xee, + 0x3e, 0xfb, 0x33, 0x15, 0x7a, 0x7a, 0x90, 0x92, 0x9e, 0x1d, 0xa4, 0xa4, 0x17, 0x07, 0x29, 0xe9, + 0x8f, 0x83, 0x94, 0xf4, 0xcd, 0xcb, 0x54, 0xe8, 0xc5, 0xcb, 0x54, 0xe8, 0xf7, 0x97, 0xa9, 0xd0, + 0xa7, 0x97, 0x8f, 0x5f, 0x66, 0x6b, 0xb7, 0x7e, 0x83, 0x19, 0x8f, 0x72, 0x1d, 0xef, 0xbf, 0x5e, + 0xfc, 0xcf, 0xd7, 0x23, 0x62, 0x50, 0xff, 0xf7, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xd8, + 0x67, 0x41, 0xf5, 0x0b, 0x00, 0x00, } func (this *AccessTypeParam) Equal(that interface{}) bool { diff --git a/x/wasm/types/types_test.go b/x/wasm/types/types_test.go index 94f2c2277b..5fbf6139f9 100644 --- a/x/wasm/types/types_test.go +++ b/x/wasm/types/types_test.go @@ -193,7 +193,7 @@ func TestContractInfoSetExtension(t *testing.T) { } func TestContractInfoMarshalUnmarshal(t *testing.T) { - var myAddr = sdk.BytesToAccAddress(rand.Bytes(sdk.BytesAddrLen)) + var myAddr = sdk.BytesToAccAddress(rand.Bytes(sdk.BytesAddrLen)) var myOtherAddr = sdk.BytesToAccAddress(rand.Bytes(sdk.BytesAddrLen)) var anyPos = AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}