diff --git a/block/executor_test.go b/block/executor_test.go index 6b1a7786e..ffe22754c 100644 --- a/block/executor_test.go +++ b/block/executor_test.go @@ -98,7 +98,7 @@ func TestApplyBlock(t *testing.T) { app.On("BeginBlock", mock.Anything).Return(abci.ResponseBeginBlock{}) app.On("DeliverTx", mock.Anything).Return(abci.ResponseDeliverTx{}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "celestia", Version: "abcde", }, diff --git a/block/manager_test.go b/block/manager_test.go index 0fcd6c1f4..401a6f86d 100644 --- a/block/manager_test.go +++ b/block/manager_test.go @@ -129,7 +129,7 @@ func TestProduceOnlyAfterSynced(t *testing.T) { // Init app app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -212,7 +212,7 @@ func TestProduceNewBlock(t *testing.T) { commitHash := [32]byte{1} app.On("Commit", mock.Anything).Return(abci.ResponseCommit{Data: commitHash[:]}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -245,7 +245,7 @@ func TestProducePendingBlock(t *testing.T) { commitHash := [32]byte{1} app.On("Commit", mock.Anything).Return(abci.ResponseCommit{Data: commitHash[:]}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -359,7 +359,7 @@ func TestProduceBlockFailAfterCommit(t *testing.T) { LastBlockAppHash: tc.LastAppCommitHash[:], }) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -391,7 +391,7 @@ func TestCreateNextDABatchWithBytesLimit(t *testing.T) { require := require.New(t) app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -473,7 +473,7 @@ func TestDAFetch(t *testing.T) { // Setup app app := testutil.GetAppMock(testutil.Info, testutil.Commit, testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, diff --git a/block/production_test.go b/block/production_test.go index 77a659f31..0130cb8f1 100644 --- a/block/production_test.go +++ b/block/production_test.go @@ -38,7 +38,7 @@ func TestCreateEmptyBlocksEnableDisable(t *testing.T) { require := require.New(t) app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -202,7 +202,7 @@ func TestStopBlockProduction(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, diff --git a/block/pruning_test.go b/block/pruning_test.go index 6879a6d96..3f333f0db 100644 --- a/block/pruning_test.go +++ b/block/pruning_test.go @@ -1,10 +1,25 @@ package block_test -/*func TestPruningRetainHeight(t *testing.T) { +import ( + "context" + "testing" + + "github.com/dymensionxyz/dymint/da" + "github.com/dymensionxyz/dymint/testutil" + "github.com/dymensionxyz/dymint/version" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + "github.com/tendermint/tendermint/proxy" +) + +func TestPruningRetainHeight(t *testing.T) { require := require.New(t) app := testutil.GetAppMock() app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -58,4 +73,4 @@ package block_test err = manager.PruneBlocks(validRetainHeight) require.NoError(err) -}*/ +} diff --git a/block/state.go b/block/state.go index 0d84ad99f..f003f525c 100644 --- a/block/state.go +++ b/block/state.go @@ -128,9 +128,9 @@ func (e *Executor) UpdateStateAfterCommit(s *types.State, resp *tmstate.ABCIResp s.ConsensusParams.Block.MaxGas = resp.EndBlock.ConsensusParamUpdates.Block.MaxGas s.ConsensusParams.Block.MaxBytes = resp.EndBlock.ConsensusParamUpdates.Block.MaxBytes } - if resp.EndBlock.RollappConsensusParamUpdates != nil { - s.RollappParams.Da = resp.EndBlock.RollappConsensusParamUpdates.Da - s.RollappParams.Version = resp.EndBlock.RollappConsensusParamUpdates.Version + if resp.EndBlock.RollappParamUpdates != nil { + s.RollappParams.Da = resp.EndBlock.RollappParamUpdates.Da + s.RollappParams.Version = resp.EndBlock.RollappParamUpdates.Version } } diff --git a/block/submit_test.go b/block/submit_test.go index 65f13ac0c..7f2713787 100644 --- a/block/submit_test.go +++ b/block/submit_test.go @@ -112,7 +112,7 @@ func TestBatchSubmissionHappyFlow(t *testing.T) { err := proxyApp.Start() require.NoError(err) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -150,7 +150,7 @@ func TestBatchSubmissionFailedSubmission(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) ctx := context.Background() app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -221,7 +221,7 @@ func TestSubmissionByTime(t *testing.T) { require := require.New(t) app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, @@ -304,7 +304,7 @@ func TestSubmissionByBatchSize(t *testing.T) { for _, c := range cases { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, diff --git a/go.mod b/go.mod index ad5c5c53d..351ed8cd8 100644 --- a/go.mod +++ b/go.mod @@ -301,7 +301,7 @@ replace ( github.com/evmos/evmos/v12 => github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.3 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4 github.com/gorilla/rpc => github.com/dymensionxyz/rpc v1.3.1 - github.com/tendermint/tendermint => github.com/dymensionxyz/cometbft v0.34.29-0.20240906093934-57cd50faef13 + github.com/tendermint/tendermint => github.com/dymensionxyz/cometbft v0.34.29-0.20240906143736-1e3959c2826e ) replace github.com/osmosis-labs/osmosis/v15 => github.com/dymensionxyz/osmosis/v15 v15.2.0-dymension-v1.1.2 diff --git a/go.sum b/go.sum index 42ad2df5e..b4f585883 100644 --- a/go.sum +++ b/go.sum @@ -305,8 +305,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= -github.com/dymensionxyz/cometbft v0.34.29-0.20240906093934-57cd50faef13 h1:Bz7HmEY2v76i+9ODm5yDArQk5pZw3ND0ecKVbD7Gt4I= -github.com/dymensionxyz/cometbft v0.34.29-0.20240906093934-57cd50faef13/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= +github.com/dymensionxyz/cometbft v0.34.29-0.20240906143736-1e3959c2826e h1:A5FIvuFPvdxShuf9mSHfDUEL7I/oKVcSr1AtSlmgskA= +github.com/dymensionxyz/cometbft v0.34.29-0.20240906143736-1e3959c2826e/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240821081230-b4018b2bac13 h1:u5yeve5jZR6TdRjjR+vYT/8PWKbhwCZxUmAu+/Tnxyg= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240821081230-b4018b2bac13/go.mod h1:jabDQYXrccscSE0fXkh7eQFYPWJCRiuWKonFGObVq6s= github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 h1:cmpJYdRviuUfmlJdHrcAND8Jd6JIY4rp63bWAQzPr54= diff --git a/proto/types/dymint/state.proto b/proto/types/dymint/state.proto index 121bd917e..dc3b1bbf1 100755 --- a/proto/types/dymint/state.proto +++ b/proto/types/dymint/state.proto @@ -43,13 +43,12 @@ message State { uint64 base_height = 17; SequencerSet sequencerSet = 18 [(gogoproto.nullable) = false]; - RollappConsensusParams rollapp_params = 19 [(gogoproto.nullable) = false]; + RollappParams rollapp_params = 19 [(gogoproto.nullable) = false]; } //rollapp params defined in genesis and updated via gov proposal -message RollappConsensusParams { - +message RollappParams { //data availability type (e.g. celestia) used in the rollapp string da = 1 ; //commit used for the rollapp executable diff --git a/rpc/client/client_test.go b/rpc/client/client_test.go index 3289d041e..aebc0957d 100644 --- a/rpc/client/client_test.go +++ b/rpc/client/client_test.go @@ -444,7 +444,7 @@ func TestTx(t *testing.T) { require.NotNil(rpc) mockApp.On("BeginBlock", mock.Anything).Return(abci.ResponseBeginBlock{}) mockApp.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, diff --git a/rpc/json/service_test.go b/rpc/json/service_test.go index 0f876a341..d9c967fab 100644 --- a/rpc/json/service_test.go +++ b/rpc/json/service_test.go @@ -281,7 +281,7 @@ func getRPC(t *testing.T) (*tmmocks.MockApplication, *client.Client) { app.On("InitChain", mock.Anything).Return(abci.ResponseInitChain{}) app.On("BeginBlock", mock.Anything).Return(abci.ResponseBeginBlock{}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "mock", Version: version.Commit, }, diff --git a/testutil/node.go b/testutil/node.go index 398935524..5a58540bc 100644 --- a/testutil/node.go +++ b/testutil/node.go @@ -30,7 +30,7 @@ func CreateNode(isSequencer bool, blockManagerConfig *config.BlockManagerConfig, return nil, err } app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ - RollappConsensusParamUpdates: &abci.RollappConsensusParams{ + RollappParamUpdates: &abci.RollappParams{ Da: "celestia", Version: "abcde", }, diff --git a/testutil/types.go b/testutil/types.go index e1d05952b..e019fc0bc 100644 --- a/testutil/types.go +++ b/testutil/types.go @@ -236,7 +236,7 @@ func GenerateStateWithSequencer(initialHeight int64, lastBlockHeight int64, pubk App: AppVersion, }, }, - RollappParams: dymint.RollappConsensusParams{ + RollappParams: dymint.RollappParams{ Da: "mock", Version: dymintversion.Commit, }, diff --git a/types/pb/dymint/state.pb.go b/types/pb/dymint/state.pb.go index ba909fbb3..1cb1dfca9 100644 --- a/types/pb/dymint/state.pb.go +++ b/types/pb/dymint/state.pb.go @@ -31,22 +31,22 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type State struct { - Version *state.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - InitialHeight int64 `protobuf:"varint,3,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` - LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` - LastBlockID types.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` - LastBlockTime time.Time `protobuf:"bytes,6,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"` - Validators *types.ValidatorSet `protobuf:"bytes,9,opt,name=validators,proto3" json:"validators,omitempty"` // Deprecated: Do not use. - LastHeightValidatorsChanged int64 `protobuf:"varint,11,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"` - ConsensusParams types.ConsensusParams `protobuf:"bytes,12,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` - LastHeightConsensusParamsChanged int64 `protobuf:"varint,13,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"` - LastResultsHash []byte `protobuf:"bytes,14,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` - AppHash []byte `protobuf:"bytes,15,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - LastStoreHeight uint64 `protobuf:"varint,16,opt,name=last_store_height,json=lastStoreHeight,proto3" json:"last_store_height,omitempty"` - BaseHeight uint64 `protobuf:"varint,17,opt,name=base_height,json=baseHeight,proto3" json:"base_height,omitempty"` - SequencerSet SequencerSet `protobuf:"bytes,18,opt,name=sequencerSet,proto3" json:"sequencerSet"` - RollappParams RollappConsensusParams `protobuf:"bytes,19,opt,name=rollapp_params,json=rollappParams,proto3" json:"rollapp_params"` + Version *state.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + InitialHeight int64 `protobuf:"varint,3,opt,name=initial_height,json=initialHeight,proto3" json:"initial_height,omitempty"` + LastBlockHeight int64 `protobuf:"varint,4,opt,name=last_block_height,json=lastBlockHeight,proto3" json:"last_block_height,omitempty"` + LastBlockID types.BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"` + LastBlockTime time.Time `protobuf:"bytes,6,opt,name=last_block_time,json=lastBlockTime,proto3,stdtime" json:"last_block_time"` + Validators *types.ValidatorSet `protobuf:"bytes,9,opt,name=validators,proto3" json:"validators,omitempty"` // Deprecated: Do not use. + LastHeightValidatorsChanged int64 `protobuf:"varint,11,opt,name=last_height_validators_changed,json=lastHeightValidatorsChanged,proto3" json:"last_height_validators_changed,omitempty"` + ConsensusParams types.ConsensusParams `protobuf:"bytes,12,opt,name=consensus_params,json=consensusParams,proto3" json:"consensus_params"` + LastHeightConsensusParamsChanged int64 `protobuf:"varint,13,opt,name=last_height_consensus_params_changed,json=lastHeightConsensusParamsChanged,proto3" json:"last_height_consensus_params_changed,omitempty"` + LastResultsHash []byte `protobuf:"bytes,14,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"` + AppHash []byte `protobuf:"bytes,15,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + LastStoreHeight uint64 `protobuf:"varint,16,opt,name=last_store_height,json=lastStoreHeight,proto3" json:"last_store_height,omitempty"` + BaseHeight uint64 `protobuf:"varint,17,opt,name=base_height,json=baseHeight,proto3" json:"base_height,omitempty"` + SequencerSet SequencerSet `protobuf:"bytes,18,opt,name=sequencerSet,proto3" json:"sequencerSet"` + RollappParams RollappParams `protobuf:"bytes,19,opt,name=rollapp_params,json=rollappParams,proto3" json:"rollapp_params"` } func (m *State) Reset() { *m = State{} } @@ -188,33 +188,33 @@ func (m *State) GetSequencerSet() SequencerSet { return SequencerSet{} } -func (m *State) GetRollappParams() RollappConsensusParams { +func (m *State) GetRollappParams() RollappParams { if m != nil { return m.RollappParams } - return RollappConsensusParams{} + return RollappParams{} } //rollapp params defined in genesis and updated via gov proposal -type RollappConsensusParams struct { +type RollappParams struct { //data availability type (e.g. celestia) used in the rollapp Da string `protobuf:"bytes,1,opt,name=da,proto3" json:"da,omitempty"` //commit used for the rollapp executable Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` } -func (m *RollappConsensusParams) Reset() { *m = RollappConsensusParams{} } -func (m *RollappConsensusParams) String() string { return proto.CompactTextString(m) } -func (*RollappConsensusParams) ProtoMessage() {} -func (*RollappConsensusParams) Descriptor() ([]byte, []int) { +func (m *RollappParams) Reset() { *m = RollappParams{} } +func (m *RollappParams) String() string { return proto.CompactTextString(m) } +func (*RollappParams) ProtoMessage() {} +func (*RollappParams) Descriptor() ([]byte, []int) { return fileDescriptor_4b679420add07272, []int{1} } -func (m *RollappConsensusParams) XXX_Unmarshal(b []byte) error { +func (m *RollappParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *RollappConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *RollappParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_RollappConsensusParams.Marshal(b, m, deterministic) + return xxx_messageInfo_RollappParams.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -224,26 +224,26 @@ func (m *RollappConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *RollappConsensusParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_RollappConsensusParams.Merge(m, src) +func (m *RollappParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_RollappParams.Merge(m, src) } -func (m *RollappConsensusParams) XXX_Size() int { +func (m *RollappParams) XXX_Size() int { return m.Size() } -func (m *RollappConsensusParams) XXX_DiscardUnknown() { - xxx_messageInfo_RollappConsensusParams.DiscardUnknown(m) +func (m *RollappParams) XXX_DiscardUnknown() { + xxx_messageInfo_RollappParams.DiscardUnknown(m) } -var xxx_messageInfo_RollappConsensusParams proto.InternalMessageInfo +var xxx_messageInfo_RollappParams proto.InternalMessageInfo -func (m *RollappConsensusParams) GetDa() string { +func (m *RollappParams) GetDa() string { if m != nil { return m.Da } return "" } -func (m *RollappConsensusParams) GetVersion() string { +func (m *RollappParams) GetVersion() string { if m != nil { return m.Version } @@ -252,56 +252,56 @@ func (m *RollappConsensusParams) GetVersion() string { func init() { proto.RegisterType((*State)(nil), "dymint.State") - proto.RegisterType((*RollappConsensusParams)(nil), "dymint.RollappConsensusParams") + proto.RegisterType((*RollappParams)(nil), "dymint.RollappParams") } func init() { proto.RegisterFile("types/dymint/state.proto", fileDescriptor_4b679420add07272) } var fileDescriptor_4b679420add07272 = []byte{ - // 684 bytes of a gzipped FileDescriptorProto + // 685 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xcb, 0x4e, 0xdb, 0x4c, - 0x14, 0xc7, 0xe3, 0x10, 0x48, 0x32, 0x21, 0x17, 0x06, 0xf4, 0xc9, 0xf0, 0x49, 0x4e, 0xa0, 0x17, - 0x45, 0x5d, 0x38, 0x52, 0xd9, 0xb7, 0x92, 0x61, 0x41, 0x28, 0xaa, 0x2a, 0xa7, 0x62, 0xd1, 0x8d, - 0x35, 0xb6, 0xa7, 0xf6, 0xa8, 0x8e, 0xc7, 0xf5, 0x4c, 0x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88, 0xe4, 0x75, 0x6e, 0xba, 0xd5, - 0x10, 0x41, 0x73, 0x79, 0xc7, 0xf5, 0x6d, 0xd5, 0x4b, 0xe7, 0xec, 0x76, 0x6e, 0x19, 0x77, 0x73, - 0xcb, 0xf8, 0x3b, 0xb7, 0x8c, 0x9b, 0x07, 0xab, 0x72, 0xf7, 0x60, 0x55, 0x7e, 0x3f, 0x58, 0x95, - 0x2f, 0x76, 0x44, 0x78, 0x3c, 0xf3, 0xed, 0x80, 0x4e, 0xc5, 0xd3, 0x81, 0x53, 0xc1, 0xff, 0xb8, - 0xfe, 0x59, 0x3c, 0x27, 0xfa, 0x4d, 0xf2, 0xf5, 0xda, 0xdf, 0x92, 0xf7, 0xe5, 0xf8, 0x5f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x67, 0x27, 0x6f, 0x6e, 0x86, 0x05, 0x00, 0x00, + 0x14, 0xc7, 0xe3, 0x10, 0x88, 0x33, 0x21, 0x17, 0x06, 0x3e, 0xc9, 0xf0, 0x49, 0x4e, 0xe0, 0xbb, + 0x28, 0xea, 0xc2, 0x91, 0xca, 0xaa, 0x9b, 0x56, 0x32, 0x2c, 0x08, 0x42, 0x55, 0xe5, 0x54, 0x2c, + 0xba, 0xb1, 0xc6, 0xf6, 0xd4, 0x1e, 0xd5, 0xf1, 0xb8, 0x9e, 0x09, 0x2a, 0x7d, 0x0a, 0x1e, 0xa7, + 0x8f, 0xc0, 0x92, 0x65, 0x57, 0xb4, 0x0a, 0x2f, 0x52, 0xcd, 0xc5, 0x89, 0x43, 0xc4, 0x2a, 0x99, + 0xff, 0xf9, 0xcd, 0xdf, 0x67, 0xce, 0x39, 0x33, 0xc0, 0xe2, 0xb7, 0x39, 0x66, 0xe3, 0xe8, 0x76, + 0x46, 0x32, 0x3e, 0x66, 0x1c, 0x71, 0xec, 0xe4, 0x05, 0xe5, 0x14, 0xee, 0x28, 0xed, 0xe8, 0x20, + 0xa6, 0x31, 0x95, 0xd2, 0x58, 0xfc, 0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0xc1, 0x8e, 0xbc, 0x1d, 0xa7, 0x7f, + 0x02, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x4d, 0xfd, 0x88, 0x74, 0x05, 0x00, 0x00, } func (m *State) Marshal() (dAtA []byte, err error) { @@ -458,7 +458,7 @@ func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RollappConsensusParams) Marshal() (dAtA []byte, err error) { +func (m *RollappParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -468,12 +468,12 @@ func (m *RollappConsensusParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *RollappConsensusParams) MarshalTo(dAtA []byte) (int, error) { +func (m *RollappParams) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *RollappConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *RollappParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -563,7 +563,7 @@ func (m *State) Size() (n int) { return n } -func (m *RollappConsensusParams) Size() (n int) { +func (m *RollappParams) Size() (n int) { if m == nil { return 0 } @@ -1087,7 +1087,7 @@ func (m *State) Unmarshal(dAtA []byte) error { } return nil } -func (m *RollappConsensusParams) Unmarshal(dAtA []byte) error { +func (m *RollappParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1110,10 +1110,10 @@ func (m *RollappConsensusParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: RollappConsensusParams: wiretype end group for non-group") + return fmt.Errorf("proto: RollappParams: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: RollappConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: RollappParams: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/types/serialization_test.go b/types/serialization_test.go index d353dd543..ca1218c2e 100644 --- a/types/serialization_test.go +++ b/types/serialization_test.go @@ -135,7 +135,7 @@ func TestStateRoundTrip(t *testing.T) { AppVersion: 42, }, }, - RollappParams: pb.RollappConsensusParams{ + RollappParams: pb.RollappParams{ Da: "mock", Version: version.Commit, }, diff --git a/types/state.go b/types/state.go index 16d6f5aaa..d4a6c87f0 100644 --- a/types/state.go +++ b/types/state.go @@ -41,7 +41,7 @@ type State struct { AppHash [32]byte // New rollapp parameters . - RollappParams dymint.RollappConsensusParams + RollappParams dymint.RollappParams } func (s *State) IsGenesis() bool { @@ -49,7 +49,7 @@ func (s *State) IsGenesis() bool { } type RollappParams struct { - Params *dymint.RollappConsensusParams + Params *dymint.RollappParams } // SetHeight sets the height saved in the Store if it is higher than the existing height