From 346edea01a3600241289568e887932843d4664fa Mon Sep 17 00:00:00 2001 From: Sergi Rene Date: Thu, 31 Oct 2024 10:52:38 +0100 Subject: [PATCH] feat(manager): decouple drs version from commit (#1182) Co-authored-by: Omri --- block/block.go | 2 +- block/executor_test.go | 6 +- block/manager.go | 9 +- block/manager_test.go | 37 ++- block/production_test.go | 17 +- block/pruning_test.go | 5 +- block/slvalidator.go | 3 +- block/slvalidator_test.go | 20 +- block/state.go | 2 +- block/submit_test.go | 19 +- go.mod | 2 +- go.sum | 4 +- node/node_test.go | 1 + .../dymension/rollapp/block_descriptor.proto | 2 +- .../dymensionxyz/dymension/rollapp/tx.proto | 2 +- proto/types/dymint/state.proto | 4 +- rpc/client/client_test.go | 9 +- rpc/json/service_test.go | 8 +- store/pruning_test.go | 2 +- store/store.go | 17 +- store/storeIface.go | 4 +- testutil/node.go | 4 +- testutil/rpc.go | 1 - testutil/types.go | 28 +- types/batch.go | 2 +- types/errors.go | 8 +- .../dymension/rollapp/block_descriptor.pb.go | 82 +++--- .../dymensionxyz/dymension/rollapp/tx.pb.go | 246 +++++++++++------- types/pb/dymint/state.pb.go | 131 +++++----- types/serialization_test.go | 5 +- version/version.go | 2 +- 31 files changed, 346 insertions(+), 338 deletions(-) diff --git a/block/block.go b/block/block.go index 71e265842..02535ad80 100644 --- a/block/block.go +++ b/block/block.go @@ -102,7 +102,7 @@ func (m *Manager) applyBlock(block *types.Block, commit *types.Commit, blockMeta return fmt.Errorf("save block source: %w", err) } - _, err = m.Store.SaveDRSVersion(block.Header.Height, responses.EndBlock.RollappParamUpdates.Version, nil) + _, err = m.Store.SaveDRSVersion(block.Header.Height, responses.EndBlock.RollappParamUpdates.DrsVersion, nil) if err != nil { return fmt.Errorf("add drs version: %w", err) } diff --git a/block/executor_test.go b/block/executor_test.go index 09434e35d..c40e4af2b 100644 --- a/block/executor_test.go +++ b/block/executor_test.go @@ -180,8 +180,8 @@ func TestApplyBlock(t *testing.T) { app.On("DeliverTx", mock.Anything).Return(abci.ResponseDeliverTx{}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "celestia", - Version: "abcde", + Da: "celestia", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -332,7 +332,7 @@ func TestApplyBlock(t *testing.T) { // check rollapp params update assert.Equal(state.RollappParams.Da, "celestia") - assert.Equal(state.RollappParams.Version, "abcde") + assert.Equal(state.RollappParams.DrsVersion, uint32(0)) assert.Equal(state.ConsensusParams.Block.MaxBytes, int64(100)) assert.Equal(state.ConsensusParams.Block.MaxGas, int64(100)) diff --git a/block/manager.go b/block/manager.go index 309d44c7f..0e2e99b1f 100644 --- a/block/manager.go +++ b/block/manager.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "strconv" "sync" "sync/atomic" @@ -383,8 +384,12 @@ func (m *Manager) UpdateTargetHeight(h uint64) { // ValidateConfigWithRollappParams checks the configuration params are consistent with the params in the dymint state (e.g. DA and version) func (m *Manager) ValidateConfigWithRollappParams() error { - if version.Commit != m.State.RollappParams.Version { - return fmt.Errorf("binary version mismatch. rollapp param: %s binary used:%s", m.State.RollappParams.Version, version.Commit) + drsVersion, err := strconv.ParseUint(version.DrsVersion, 10, 32) + if err != nil { + return fmt.Errorf("unable to parse drs version") + } + if uint32(drsVersion) != m.State.RollappParams.DrsVersion { + return fmt.Errorf("DRS version mismatch. rollapp param: %d binary used:%d", m.State.RollappParams.DrsVersion, drsVersion) } if da.Client(m.State.RollappParams.Da) != m.DAClient.GetClientType() { diff --git a/block/manager_test.go b/block/manager_test.go index d80f78481..0416c8d8b 100644 --- a/block/manager_test.go +++ b/block/manager_test.go @@ -23,7 +23,6 @@ import ( "github.com/dymensionxyz/dymint/testutil" "github.com/dymensionxyz/dymint/types" "github.com/dymensionxyz/dymint/types/pb/dymensionxyz/dymension/rollapp" - "github.com/dymensionxyz/dymint/version" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/crypto/ed25519" @@ -136,8 +135,8 @@ func TestProduceOnlyAfterSynced(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -211,8 +210,8 @@ func TestApplyCachedBlocks_WithFraudCheck(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -299,8 +298,8 @@ func TestApplyLocalBlock_WithFraudCheck(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -418,8 +417,8 @@ func TestProduceNewBlock(t *testing.T) { app.On("Commit", mock.Anything).Return(abci.ResponseCommit{Data: commitHash[:]}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -451,8 +450,8 @@ func TestProducePendingBlock(t *testing.T) { app.On("Commit", mock.Anything).Return(abci.ResponseCommit{Data: commitHash[:]}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -564,8 +563,8 @@ func TestProduceBlockFailAfterCommit(t *testing.T) { }) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -596,8 +595,8 @@ func TestCreateNextDABatchWithBytesLimit(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -678,8 +677,8 @@ func TestDAFetch(t *testing.T) { app := testutil.GetAppMock(testutil.Info, testutil.Commit, testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -774,8 +773,8 @@ func TestManager_ApplyBatchFromSL_FraudHandling(t *testing.T) { app := testutil.GetAppMock(testutil.Info, testutil.Commit, testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ diff --git a/block/production_test.go b/block/production_test.go index 42912105c..8ff470b26 100644 --- a/block/production_test.go +++ b/block/production_test.go @@ -33,7 +33,6 @@ import ( uchannel "github.com/dymensionxyz/dymint/utils/channel" uevent "github.com/dymensionxyz/dymint/utils/event" protoutils "github.com/dymensionxyz/dymint/utils/proto" - "github.com/dymensionxyz/dymint/version" ) // TODO: test producing lastBlock @@ -48,8 +47,8 @@ func TestCreateEmptyBlocksEnableDisable(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -212,8 +211,8 @@ func TestStopBlockProduction(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -296,8 +295,8 @@ func TestUpdateInitialSequencerSet(t *testing.T) { ctx := context.Background() app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -402,8 +401,8 @@ func TestUpdateExistingSequencerSet(t *testing.T) { ctx := context.Background() app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ diff --git a/block/pruning_test.go b/block/pruning_test.go index ecf073e07..64f80b084 100644 --- a/block/pruning_test.go +++ b/block/pruning_test.go @@ -6,7 +6,6 @@ import ( "github.com/dymensionxyz/dymint/da" "github.com/dymensionxyz/dymint/testutil" - "github.com/dymensionxyz/dymint/version" "github.com/dymensionxyz/gerr-cosmos/gerrc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -21,8 +20,8 @@ func TestPruningRetainHeight(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ diff --git a/block/slvalidator.go b/block/slvalidator.go index 4fb4b8033..33e0c7576 100644 --- a/block/slvalidator.go +++ b/block/slvalidator.go @@ -232,8 +232,7 @@ func (v *SettlementValidator) NextValidationHeight() uint64 { } // validateDRS compares the DRS version stored for the specific height, obtained from rollapp params. -// DRS checks will work only for non-finalized heights, since it does not store the whole history, but it will never validate finalized heights. -func (v *SettlementValidator) validateDRS(stateIndex uint64, height uint64, version string) error { +func (v *SettlementValidator) validateDRS(stateIndex uint64, height uint64, version uint32) error { drs, err := v.blockManager.Store.LoadDRSVersion(height) if err != nil { return err diff --git a/block/slvalidator_test.go b/block/slvalidator_test.go index 51d77239c..5d662658b 100644 --- a/block/slvalidator_test.go +++ b/block/slvalidator_test.go @@ -17,7 +17,6 @@ import ( "github.com/dymensionxyz/dymint/testutil" "github.com/dymensionxyz/dymint/types" "github.com/dymensionxyz/dymint/types/pb/dymensionxyz/dymension/rollapp" - "github.com/dymensionxyz/dymint/version" "github.com/libp2p/go-libp2p/core/crypto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" @@ -33,8 +32,8 @@ func TestStateUpdateValidator_ValidateStateUpdate(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -225,9 +224,7 @@ func TestStateUpdateValidator_ValidateStateUpdate(t *testing.T) { switch tc.stateUpdateFraud { case "drs": // set different bd drs version - version, err := testutil.CreateRandomVersionCommit() - require.NoError(t, err) - slBatch.BlockDescriptors[0].DrsVersion = version + slBatch.BlockDescriptors[0].DrsVersion = 2 case "batchnumblocks": // set wrong numblocks in state update slBatch.NumBlocks = 11 @@ -270,8 +267,8 @@ func TestStateUpdateValidator_ValidateDAFraud(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -403,15 +400,12 @@ func getBlockDescriptors(batch *types.Batch) ([]rollapp.BlockDescriptor, error) // Create block descriptors var bds []rollapp.BlockDescriptor for _, block := range batch.Blocks { - version, err := testutil.CreateRandomVersionCommit() - if err != nil { - return nil, err - } + bd := rollapp.BlockDescriptor{ Height: block.Header.Height, StateRoot: block.Header.AppHash[:], Timestamp: block.Header.GetTimestamp(), - DrsVersion: version, + DrsVersion: 0, } bds = append(bds, bd) } diff --git a/block/state.go b/block/state.go index b423c30d3..18cf2c50c 100644 --- a/block/state.go +++ b/block/state.go @@ -131,7 +131,7 @@ func (e *Executor) UpdateStateAfterCommit(s *types.State, resp *tmstate.ABCIResp } if resp.EndBlock.RollappParamUpdates != nil { s.RollappParams.Da = resp.EndBlock.RollappParamUpdates.Da - s.RollappParams.Version = resp.EndBlock.RollappParamUpdates.Version + s.RollappParams.DrsVersion = resp.EndBlock.RollappParamUpdates.DrsVersion } } diff --git a/block/submit_test.go b/block/submit_test.go index 20b897e13..bcdd37772 100644 --- a/block/submit_test.go +++ b/block/submit_test.go @@ -26,7 +26,6 @@ import ( slmocks "github.com/dymensionxyz/dymint/mocks/github.com/dymensionxyz/dymint/settlement" "github.com/dymensionxyz/dymint/testutil" "github.com/dymensionxyz/dymint/types" - "github.com/dymensionxyz/dymint/version" ) // TestBatchOverhead tests the scenario where we have a single block that is very large, and occupies the entire batch size. @@ -106,6 +105,7 @@ func TestBatchSubmissionHappyFlow(t *testing.T) { require := require.New(t) app := testutil.GetAppMock(testutil.EndBlock) ctx := context.Background() + // Create proxy app clientCreator := proxy.NewLocalClientCreator(app) proxyApp := proxy.NewAppConns(clientCreator) @@ -113,8 +113,8 @@ func TestBatchSubmissionHappyFlow(t *testing.T) { require.NoError(err) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -149,10 +149,11 @@ func TestBatchSubmissionFailedSubmission(t *testing.T) { require := require.New(t) app := testutil.GetAppMock(testutil.EndBlock) ctx := context.Background() + app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -227,8 +228,8 @@ func TestSubmissionByTime(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -310,8 +311,8 @@ func TestSubmissionByBatchSize(t *testing.T) { app := testutil.GetAppMock(testutil.EndBlock) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ diff --git a/go.mod b/go.mod index 1be30661b..83c11b171 100644 --- a/go.mod +++ b/go.mod @@ -300,7 +300,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.20241008141942-63af9d24107f + github.com/tendermint/tendermint => github.com/dymensionxyz/cometbft v0.34.29-0.20241030154748-3f9dfa21d17b ) 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 cba754ced..3a6302a79 100644 --- a/go.sum +++ b/go.sum @@ -457,8 +457,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.20241008141942-63af9d24107f h1:CclWJWRydsd8D4/R1IegIkcWtL4wqTA3MWtXrx1a6y4= -github.com/dymensionxyz/cometbft v0.34.29-0.20241008141942-63af9d24107f/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw= +github.com/dymensionxyz/cometbft v0.34.29-0.20241030154748-3f9dfa21d17b h1:rxkH+9cBG2nnReMavb2FqQXwDLjKcz0/KB8/6SV5Xlo= +github.com/dymensionxyz/cometbft v0.34.29-0.20241030154748-3f9dfa21d17b/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/evmos/v12 v12.1.6-dymension-v0.3 h1:vmAdUGUc4rTIiO3Phezr7vGq+0uPDVKSA4WAe8+yl6w= diff --git a/node/node_test.go b/node/node_test.go index bf7d6f936..7b0a1e816 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -28,6 +28,7 @@ import ( // simply check that node is starting and stopping without panicking func TestStartup(t *testing.T) { + assert := assert.New(t) require := require.New(t) diff --git a/proto/types/dymensionxyz/dymension/rollapp/block_descriptor.proto b/proto/types/dymensionxyz/dymension/rollapp/block_descriptor.proto index c3726e5da..53b8884e5 100644 --- a/proto/types/dymensionxyz/dymension/rollapp/block_descriptor.proto +++ b/proto/types/dymensionxyz/dymension/rollapp/block_descriptor.proto @@ -19,7 +19,7 @@ message BlockDescriptor { // timestamp is the time from the block header google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // DrsVersion is a DRS version used by the rollapp. - string drs_version = 4; + uint32 drs_version = 4; } // BlockDescriptors defines list of BlockDescriptor. diff --git a/proto/types/dymensionxyz/dymension/rollapp/tx.proto b/proto/types/dymensionxyz/dymension/rollapp/tx.proto index e4d44f9f7..e3a1475c2 100644 --- a/proto/types/dymensionxyz/dymension/rollapp/tx.proto +++ b/proto/types/dymensionxyz/dymension/rollapp/tx.proto @@ -167,7 +167,7 @@ message MsgMarkVulnerableRollapps { // Authority is the authority address. string authority = 1; // DrsVersions is a list of DRS versions that will be marked vulnerable. - repeated string drs_versions = 2; + repeated uint32 drs_versions = 2; } message MsgMarkVulnerableRollappsResponse {} diff --git a/proto/types/dymint/state.proto b/proto/types/dymint/state.proto index 41204766f..18c9e4b79 100755 --- a/proto/types/dymint/state.proto +++ b/proto/types/dymint/state.proto @@ -54,6 +54,6 @@ message State { message RollappParams { //data availability type (e.g. celestia) used in the rollapp string da = 1 ; - //commit used for the rollapp executable - string version = 2 ; + //drs version + uint32 drs_version = 2; } diff --git a/rpc/client/client_test.go b/rpc/client/client_test.go index eba9fe7a9..f005b1ae5 100644 --- a/rpc/client/client_test.go +++ b/rpc/client/client_test.go @@ -36,7 +36,6 @@ import ( "github.com/dymensionxyz/dymint/settlement" "github.com/dymensionxyz/dymint/testutil" "github.com/dymensionxyz/dymint/types" - "github.com/dymensionxyz/dymint/version" ) var expectedInfo = abci.ResponseInfo{ @@ -575,8 +574,8 @@ func TestTx(t *testing.T) { mockApp.On("BeginBlock", mock.Anything).Return(abci.ResponseBeginBlock{}) mockApp.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -823,8 +822,8 @@ func TestValidatorSetHandling(t *testing.T) { require.NoError(err) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ diff --git a/rpc/json/service_test.go b/rpc/json/service_test.go index d9c967fab..37f532266 100644 --- a/rpc/json/service_test.go +++ b/rpc/json/service_test.go @@ -32,7 +32,6 @@ import ( "github.com/dymensionxyz/dymint/node" "github.com/dymensionxyz/dymint/rpc/client" "github.com/dymensionxyz/dymint/settlement" - "github.com/dymensionxyz/dymint/version" ) func TestHandlerMapping(t *testing.T) { @@ -277,13 +276,14 @@ func TestSubscription(t *testing.T) { func getRPC(t *testing.T) (*tmmocks.MockApplication, *client.Client) { t.Helper() require := require.New(t) + app := &tmmocks.MockApplication{} app.On("InitChain", mock.Anything).Return(abci.ResponseInitChain{}) app.On("BeginBlock", mock.Anything).Return(abci.ResponseBeginBlock{}) app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ @@ -336,7 +336,7 @@ func getRPC(t *testing.T) (*tmmocks.MockApplication, *client.Client) { key, signingKey, proxy.NewLocalClientCreator(app), - &types.GenesisDoc{ChainID: rollappID, AppState: []byte("{\"rollappparams\": {\"params\": {\"da\": \"mock\",\"version\": \"" + version.Commit + "\"}}}")}, + &types.GenesisDoc{ChainID: rollappID, AppState: []byte("{\"rollappparams\": {\"params\": {\"da\": \"mock\",\"version\": 1}}}")}, log.TestingLogger(), mempool.NopMetrics(), ) diff --git a/store/pruning_test.go b/store/pruning_test.go index b0d4991d2..9628dd5aa 100644 --- a/store/pruning_test.go +++ b/store/pruning_test.go @@ -111,7 +111,7 @@ func TestStorePruning(t *testing.T) { // generate and store drs version randomly for block heights if randBool() { - _, err = bstore.SaveDRSVersion(block.Header.Height, "", nil) + _, err = bstore.SaveDRSVersion(block.Header.Height, 1, nil) savedDRSHeights[block.Header.Height] = true assert.NoError(err) } diff --git a/store/store.go b/store/store.go index 4ce428306..8c5ce4df4 100644 --- a/store/store.go +++ b/store/store.go @@ -317,20 +317,21 @@ func (s *DefaultStore) LoadValidationHeight() (uint64, error) { return binary.LittleEndian.Uint64(b), nil } -func (s *DefaultStore) LoadDRSVersion(height uint64) (string, error) { - versionBytes, err := s.db.Get(getDRSVersionKey(height)) +func (s *DefaultStore) LoadDRSVersion(height uint64) (uint32, error) { + b, err := s.db.Get(getDRSVersionKey(height)) if err != nil { - return "", fmt.Errorf("load drs version for height %v: %w", height, err) + return 0, err } - return string(versionBytes), nil + return binary.LittleEndian.Uint32(b), nil } -func (s *DefaultStore) SaveDRSVersion(height uint64, version string, batch KVBatch) (KVBatch, error) { - versionBytes := []byte(version) +func (s *DefaultStore) SaveDRSVersion(height uint64, version uint32, batch KVBatch) (KVBatch, error) { + b := make([]byte, 8) + binary.LittleEndian.PutUint32(b, version) if batch == nil { - return nil, s.db.Set(getDRSVersionKey(height), versionBytes) + return nil, s.db.Set(getDRSVersionKey(height), b) } - err := batch.Set(getDRSVersionKey(height), versionBytes) + err := batch.Set(getDRSVersionKey(height), b) return batch, err } diff --git a/store/storeIface.go b/store/storeIface.go index d93658805..8a2bf7166 100644 --- a/store/storeIface.go +++ b/store/storeIface.go @@ -86,9 +86,9 @@ type Store interface { LoadValidationHeight() (uint64, error) - LoadDRSVersion(height uint64) (string, error) + LoadDRSVersion(height uint64) (uint32, error) - SaveDRSVersion(height uint64, version string, batch KVBatch) (KVBatch, error) + SaveDRSVersion(height uint64, version uint32, batch KVBatch) (KVBatch, error) Close() error } diff --git a/testutil/node.go b/testutil/node.go index 5a58540bc..0abce0cf9 100644 --- a/testutil/node.go +++ b/testutil/node.go @@ -31,8 +31,8 @@ func CreateNode(isSequencer bool, blockManagerConfig *config.BlockManagerConfig, } app.On("EndBlock", mock.Anything).Return(abci.ResponseEndBlock{ RollappParamUpdates: &abci.RollappParams{ - Da: "celestia", - Version: "abcde", + Da: "celestia", + DrsVersion: 0, }, ConsensusParamUpdates: &abci.ConsensusParams{ Block: &abci.BlockParams{ diff --git a/testutil/rpc.go b/testutil/rpc.go index 3b6bed272..80b31c1e6 100644 --- a/testutil/rpc.go +++ b/testutil/rpc.go @@ -16,7 +16,6 @@ func CreateLocalServer(t *testing.T) (*rpc.Server, net.Listener) { // Create a new local listener listener, err := nettest.NewLocalListener("tcp") require.NoError(t, err) - serverReadyCh := make(chan bool, 1) var server *rpc.Server diff --git a/testutil/types.go b/testutil/types.go index f0cca12f6..ecf540037 100644 --- a/testutil/types.go +++ b/testutil/types.go @@ -3,6 +3,7 @@ package testutil import ( "crypto/rand" "math/big" + "strconv" "time" "github.com/cosmos/cosmos-sdk/types/bech32" @@ -182,10 +183,11 @@ func GenerateCommits(blocks []*types.Block, proposerKey crypto.PrivKey) ([]*type return commits, nil } -func GenerateDRS(blocks int) []string { - drs := make([]string, blocks) +func GenerateDRS(blocks int) []uint32 { + drsVersion, _ := strconv.ParseUint(dymintversion.DrsVersion, 10, 32) + drs := make([]uint32, blocks) for i := 0; i < blocks; i++ { - drs[i] = dymintversion.Commit + drs[i] = uint32(drsVersion) } return drs } @@ -320,6 +322,7 @@ func GenerateSequencer() types.Sequencer { // GenerateStateWithSequencer generates an initial state for testing. func GenerateStateWithSequencer(initialHeight int64, lastBlockHeight int64, pubkey tmcrypto.PubKey) *types.State { + dymintVersion, _ := strconv.ParseUint(dymintversion.DrsVersion, 10, 32) s := &types.State{ ChainID: "test-chain", InitialHeight: uint64(initialHeight), @@ -333,8 +336,8 @@ func GenerateStateWithSequencer(initialHeight int64, lastBlockHeight int64, pubk }, }, RollappParams: dymint.RollappParams{ - Da: "mock", - Version: dymintversion.Commit, + Da: "mock", + DrsVersion: uint32(dymintVersion), }, ConsensusParams: tmproto.ConsensusParams{ Block: tmproto.BlockParams{ @@ -375,7 +378,7 @@ func GenerateGenesis(initialHeight int64) *tmtypes.GenesisDoc { AppVersion: AppVersion, }, }, - AppState: []byte("{\"rollappparams\": {\"params\": {\"da\": \"mock\",\"version\": \"" + dymintversion.Commit + "\"}}}"), + AppState: []byte("{\"rollappparams\": {\"params\": {\"da\": \"mock\",\"version\": 0}}}"), } } @@ -404,16 +407,3 @@ func GetRandomBlock(height uint64, nTxs int) *types.Block { return block } - -func CreateRandomVersionCommit() (string, error) { - letterRunes := []rune("abcdefghijklmnopqrstuvwxyz") - b := make([]rune, 40) - for i := range b { - num, err := rand.Int(rand.Reader, big.NewInt(int64(len(letterRunes)))) - if err != nil { - return "", err - } - b[i] = letterRunes[num.Int64()] - } - return string(b), nil -} diff --git a/types/batch.go b/types/batch.go index 2912f0a28..ea2377144 100644 --- a/types/batch.go +++ b/types/batch.go @@ -11,7 +11,7 @@ type Batch struct { Commits []*Commit // LastBatch is true if this is the last batch of the sequencer (i.e completes it's rotation flow). LastBatch bool - DRSVersion []string + DRSVersion []uint32 } // StartHeight is the height of the first block in the batch. diff --git a/types/errors.go b/types/errors.go index 7c4104854..c2f3162ae 100644 --- a/types/errors.go +++ b/types/errors.go @@ -520,11 +520,11 @@ func (e ErrStateUpdateBlobCorruptedFraud) Unwrap() error { type ErrStateUpdateDRSVersionFraud struct { StateIndex uint64 Height uint64 - BlockVersion string - SLVersion string + BlockVersion uint32 + SLVersion uint32 } -func NewErrStateUpdateDRSVersionFraud(stateIndex uint64, height uint64, blockVersion string, slVersion string) error { +func NewErrStateUpdateDRSVersionFraud(stateIndex uint64, height uint64, blockVersion uint32, slVersion uint32) error { return &ErrStateUpdateDRSVersionFraud{ StateIndex: stateIndex, Height: height, @@ -534,7 +534,7 @@ func NewErrStateUpdateDRSVersionFraud(stateIndex uint64, height uint64, blockVer } func (e ErrStateUpdateDRSVersionFraud) Error() string { - return fmt.Sprintf("drs version not matching. StateIndex: %d Height: %d Block DRS: %s SL DRS: %s", e.StateIndex, e.Height, e.BlockVersion, e.SLVersion) + return fmt.Sprintf("drs version not matching. StateIndex: %d Height: %d Block DRS: %d SL DRS: %d", e.StateIndex, e.Height, e.BlockVersion, e.SLVersion) } func (e ErrStateUpdateDRSVersionFraud) Unwrap() error { diff --git a/types/pb/dymensionxyz/dymension/rollapp/block_descriptor.pb.go b/types/pb/dymensionxyz/dymension/rollapp/block_descriptor.pb.go index 9c5006af5..a96f2a450 100644 --- a/types/pb/dymensionxyz/dymension/rollapp/block_descriptor.pb.go +++ b/types/pb/dymensionxyz/dymension/rollapp/block_descriptor.pb.go @@ -36,7 +36,7 @@ type BlockDescriptor struct { // timestamp is the time from the block header Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` // DrsVersion is a DRS version used by the rollapp. - DrsVersion string `protobuf:"bytes,4,opt,name=drs_version,json=drsVersion,proto3" json:"drs_version,omitempty"` + DrsVersion uint32 `protobuf:"varint,4,opt,name=drs_version,json=drsVersion,proto3" json:"drs_version,omitempty"` } func (m *BlockDescriptor) Reset() { *m = BlockDescriptor{} } @@ -93,11 +93,11 @@ func (m *BlockDescriptor) GetTimestamp() time.Time { return time.Time{} } -func (m *BlockDescriptor) GetDrsVersion() string { +func (m *BlockDescriptor) GetDrsVersion() uint32 { if m != nil { return m.DrsVersion } - return "" + return 0 } // BlockDescriptors defines list of BlockDescriptor. @@ -155,28 +155,28 @@ func init() { } var fileDescriptor_7dcfa105ccca6c3f = []byte{ - // 331 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x4a, 0xf3, 0x40, - 0x14, 0x85, 0x33, 0x6d, 0x29, 0x7f, 0xa7, 0x3f, 0x28, 0x41, 0x24, 0x14, 0x99, 0x84, 0xae, 0xb2, - 0x9a, 0x81, 0xba, 0x74, 0x37, 0x54, 0x1f, 0x20, 0x88, 0xa0, 0x9b, 0xda, 0x34, 0x63, 0x3a, 0x98, - 0xf4, 0x0e, 0x33, 0x53, 0xb1, 0x3e, 0x45, 0x1f, 0xc4, 0x07, 0xe9, 0xb2, 0x4b, 0x57, 0x2a, 0xed, - 0x8b, 0x48, 0x9a, 0xb6, 0x91, 0x0a, 0xba, 0xcb, 0xb9, 0x9c, 0x2f, 0xe7, 0xce, 0x3d, 0xf8, 0xc2, - 0xce, 0x94, 0x30, 0x2c, 0x99, 0xe5, 0x62, 0x62, 0x24, 0x4c, 0x9e, 0x67, 0x2f, 0x95, 0x60, 0x1a, - 0xb2, 0x6c, 0xa8, 0x14, 0x8b, 0x33, 0x18, 0x3d, 0x0e, 0x12, 0x61, 0x46, 0x5a, 0x2a, 0x0b, 0x9a, - 0x2a, 0x0d, 0x16, 0x5c, 0xf2, 0x1d, 0xa3, 0x7b, 0x41, 0xb7, 0x58, 0xe7, 0x24, 0x85, 0x14, 0x36, - 0x56, 0x56, 0x7c, 0x95, 0x54, 0xc7, 0x4f, 0x01, 0xd2, 0x4c, 0xb0, 0x8d, 0x8a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0xff, 0xff, 0x20, 0x0e, 0xe0, 0x3f, 0x08, 0x02, 0x00, 0x00, + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcd, 0x4a, 0xc3, 0x40, + 0x14, 0x85, 0x33, 0x6d, 0x29, 0x76, 0xaa, 0x28, 0x41, 0x24, 0x14, 0x99, 0x84, 0xae, 0xb2, 0x9a, + 0x81, 0xba, 0x74, 0x37, 0x54, 0x1f, 0x20, 0x88, 0xa0, 0x9b, 0xda, 0x34, 0x63, 0x3a, 0x98, 0xf4, + 0x0e, 0x33, 0x53, 0xb1, 0x3e, 0x45, 0x1f, 0xc4, 0x07, 0xe9, 0xb2, 0x4b, 0x57, 0x2a, 0xed, 0x8b, + 0x48, 0x9a, 0xfe, 0x48, 0x05, 0xdd, 0xe5, 0x5c, 0xce, 0x97, 0x73, 0xe7, 0x1e, 0x7c, 0x69, 0x27, + 0x4a, 0x18, 0x96, 0x4c, 0x72, 0x31, 0x32, 0x12, 0x46, 0x2f, 0x93, 0xd7, 0x9d, 0x60, 0x1a, 0xb2, + 0xac, 0xaf, 0x14, 0x8b, 0x33, 0x18, 0x3c, 0xf5, 0x12, 0x61, 0x06, 0x5a, 0x2a, 0x0b, 0x9a, 0x2a, + 0x0d, 0x16, 0x5c, 0xf2, 0x13, 0xa3, 0x5b, 0x41, 0xd7, 0x58, 0xeb, 0x34, 0x85, 0x14, 0x56, 0x56, + 0x56, 0x7c, 0x95, 0x54, 0xcb, 0x4f, 0x01, 0xd2, 0x4c, 0xb0, 0x95, 0x8a, 0xc7, 0x8f, 0xcc, 0xca, + 0x5c, 0x18, 0xdb, 0xcf, 0x55, 0x69, 0x68, 0xbf, 0x21, 0x7c, 0xcc, 0x8b, 0xc4, 0xee, 0x36, 0xd0, + 0x3d, 0xc3, 0xf5, 0xa1, 0x90, 0xe9, 0xd0, 0x7a, 0x28, 0x40, 0x61, 0x2d, 0x5a, 0x2b, 0xf7, 0x1c, + 0x37, 0x8c, 0xed, 0x5b, 0x11, 0x01, 0x58, 0xaf, 0x12, 0xa0, 0xf0, 0x30, 0xda, 0x0d, 0x5c, 0x8e, + 0x1b, 0xdb, 0x9f, 0x7b, 0xd5, 0x00, 0x85, 0xcd, 0x4e, 0x8b, 0x96, 0xf1, 0x74, 0x13, 0x4f, 0x6f, + 0x36, 0x0e, 0x7e, 0x30, 0xfb, 0xf0, 0x9d, 0xe9, 0xa7, 0x8f, 0xa2, 0x1d, 0xe6, 0xfa, 0xb8, 0x99, + 0x68, 0xd3, 0x7b, 0x16, 0xba, 0x78, 0x9b, 0x57, 0x0b, 0x50, 0x78, 0x14, 0xe1, 0x44, 0x9b, 0xdb, + 0x72, 0xd2, 0xbe, 0xc3, 0x27, 0x7b, 0xdb, 0x1a, 0xf7, 0x0a, 0x57, 0x78, 0xd7, 0x43, 0x41, 0x35, + 0x6c, 0x76, 0x18, 0xfd, 0xfb, 0x4c, 0x74, 0x8f, 0xe6, 0xb5, 0x62, 0x8d, 0xa8, 0xc2, 0xbb, 0xfc, + 0x61, 0xb6, 0x20, 0x68, 0xbe, 0x20, 0xe8, 0x6b, 0x41, 0xd0, 0x74, 0x49, 0x9c, 0xf9, 0x92, 0x38, + 0xef, 0x4b, 0xe2, 0xdc, 0x5f, 0xa7, 0xd2, 0x0e, 0xc7, 0x31, 0x1d, 0x40, 0xfe, 0xab, 0x3c, 0x39, + 0xb2, 0xac, 0xac, 0x55, 0xc5, 0xff, 0x34, 0x1b, 0xd7, 0x57, 0x67, 0xb8, 0xf8, 0x0e, 0x00, 0x00, + 0xff, 0xff, 0xc3, 0x52, 0x7d, 0x6c, 0x08, 0x02, 0x00, 0x00, } func (m *BlockDescriptor) Marshal() (dAtA []byte, err error) { @@ -199,12 +199,10 @@ func (m *BlockDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.DrsVersion) > 0 { - i -= len(m.DrsVersion) - copy(dAtA[i:], m.DrsVersion) - i = encodeVarintBlockDescriptor(dAtA, i, uint64(len(m.DrsVersion))) + if m.DrsVersion != 0 { + i = encodeVarintBlockDescriptor(dAtA, i, uint64(m.DrsVersion)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):]) if err1 != nil { @@ -292,9 +290,8 @@ func (m *BlockDescriptor) Size() (n int) { } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) n += 1 + l + sovBlockDescriptor(uint64(l)) - l = len(m.DrsVersion) - if l > 0 { - n += 1 + l + sovBlockDescriptor(uint64(l)) + if m.DrsVersion != 0 { + n += 1 + sovBlockDescriptor(uint64(m.DrsVersion)) } return n } @@ -436,10 +433,10 @@ func (m *BlockDescriptor) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 4: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DrsVersion", wireType) } - var stringLen uint64 + m.DrsVersion = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowBlockDescriptor @@ -449,24 +446,11 @@ func (m *BlockDescriptor) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.DrsVersion |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthBlockDescriptor - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthBlockDescriptor - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DrsVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipBlockDescriptor(dAtA[iNdEx:]) diff --git a/types/pb/dymensionxyz/dymension/rollapp/tx.pb.go b/types/pb/dymensionxyz/dymension/rollapp/tx.pb.go index dba4ff173..b3ad872a4 100644 --- a/types/pb/dymensionxyz/dymension/rollapp/tx.pb.go +++ b/types/pb/dymensionxyz/dymension/rollapp/tx.pb.go @@ -908,7 +908,7 @@ type MsgMarkVulnerableRollapps struct { // Authority is the authority address. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // DrsVersions is a list of DRS versions that will be marked vulnerable. - DrsVersions []string `protobuf:"bytes,2,rep,name=drs_versions,json=drsVersions,proto3" json:"drs_versions,omitempty"` + DrsVersions []uint32 `protobuf:"varint,2,rep,packed,name=drs_versions,json=drsVersions,proto3" json:"drs_versions,omitempty"` } func (m *MsgMarkVulnerableRollapps) Reset() { *m = MsgMarkVulnerableRollapps{} } @@ -951,7 +951,7 @@ func (m *MsgMarkVulnerableRollapps) GetAuthority() string { return "" } -func (m *MsgMarkVulnerableRollapps) GetDrsVersions() []string { +func (m *MsgMarkVulnerableRollapps) GetDrsVersions() []uint32 { if m != nil { return m.DrsVersions } @@ -1018,63 +1018,63 @@ func init() { } var fileDescriptor_fa9b86052c2a43cd = []byte{ - // 889 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x8e, 0xff, 0x3c, 0xbb, 0xc6, 0x1d, 0xa2, 0x68, 0x49, 0x5b, 0xe3, 0x3a, 0x42, - 0x8a, 0xa8, 0xb0, 0x21, 0xbd, 0x85, 0x53, 0x42, 0x44, 0x5b, 0x90, 0x55, 0xd8, 0x86, 0x1c, 0xb8, - 0x98, 0xb1, 0x77, 0xb2, 0x1e, 0x75, 0x77, 0x66, 0x99, 0x19, 0x3b, 0x35, 0x47, 0xae, 0x48, 0x08, - 0xf1, 0x49, 0x38, 0xf0, 0x19, 0x50, 0x8f, 0x3d, 0xc2, 0x05, 0xa1, 0xe4, 0xc0, 0xd7, 0x40, 0x33, - 0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eb, 0xa0, 0xae, 0x7b, 0x98, 0xa5, 0xb4, 0x77, 0xe1, 0xfe, - 0x8d, 0xbb, 0xa5, 0x2d, 0x1d, 0x7d, 0xf7, 0xf2, 0xa2, 0xe9, 0xbc, 0xba, 0x68, 0x3a, 0xff, 0x5c, - 0x34, 0x9d, 0x5f, 0x2e, 0x9b, 0x1b, 0xaf, 0x2e, 0x9b, 0x1b, 0x7f, 0x5e, 0x36, 0x37, 0xbe, 0xfd, - 0x3c, 0xa0, 0x6a, 0x34, 0x1e, 0x74, 0x86, 0x3c, 0xba, 0xf6, 0x6b, 0xa0, 0x4c, 0x75, 0x93, 0xff, - 0x44, 0x3c, 0x58, 0xf1, 0xa5, 0x18, 0x14, 0xcd, 0xa7, 0xe1, 0xe1, 0x7f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xd3, 0x61, 0x82, 0xbe, 0x60, 0x09, 0x00, 0x00, + // 891 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x23, 0x35, + 0x14, 0xef, 0x24, 0x69, 0xfe, 0xbc, 0xa4, 0x21, 0x6b, 0xaa, 0x6a, 0xe8, 0xee, 0x86, 0x6c, 0x2a, + 0xa4, 0x88, 0x15, 0x09, 0x74, 0x6f, 0xe5, 0xd4, 0x52, 0xb1, 0xbb, 0xa0, 0x68, 0x61, 0xb6, 0xf4, + 0xc0, 0x25, 0x38, 0x19, 0x77, 0x62, 0xed, 0x8c, 0x3d, 0xd8, 0x4e, 0xba, 0xe1, 0xc8, 0x15, 0x09, + 0x21, 0x3e, 0x09, 0x07, 0x3e, 0x03, 0xda, 0xe3, 0x1e, 0xe1, 0x82, 0x50, 0x7b, 0xe0, 0x6b, 0x20, + 0x7b, 0x9c, 0x49, 0xba, 0x4d, 0x93, 0x50, 0xed, 0xc9, 0x7e, 0xcf, 0xef, 0x3d, 0xbf, 0xdf, 0xef,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, 0x7d, 0xf7, 0xea, 0xa2, 0xee, 0xbc, 0xbe, 0xa8, 0x3b, + 0xff, 0x5c, 0xd4, 0x9d, 0x5f, 0x2e, 0xeb, 0x1b, 0xaf, 0x2f, 0xeb, 0x1b, 0x7f, 0x5e, 0xd6, 0x37, + 0xbe, 0xfd, 0x3c, 0xa0, 0x6a, 0x38, 0xea, 0xb7, 0x07, 0x3c, 0xba, 0xf6, 0x6b, 0xa0, 0x4c, 0x75, + 0x92, 0xff, 0x44, 0xdc, 0x5f, 0xf1, 0xa5, 0xe8, 0xe7, 0xcd, 0xa7, 0xe1, 0xd1, 0x7f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x0d, 0xbb, 0x21, 0x76, 0x60, 0x09, 0x00, 0x00, } func (m *MsgCreateRollapp) Marshal() (dAtA []byte, err error) { @@ -1708,13 +1708,22 @@ func (m *MsgMarkVulnerableRollapps) MarshalToSizedBuffer(dAtA []byte) (int, erro var l int _ = l if len(m.DrsVersions) > 0 { - for iNdEx := len(m.DrsVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DrsVersions[iNdEx]) - copy(dAtA[i:], m.DrsVersions[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.DrsVersions[iNdEx]))) - i-- - dAtA[i] = 0x12 + dAtA7 := make([]byte, len(m.DrsVersions)*10) + var j6 int + for _, num := range m.DrsVersions { + for num >= 1<<7 { + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j6++ + } + dAtA7[j6] = uint8(num) + j6++ } + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintTx(dAtA, i, uint64(j6)) + i-- + dAtA[i] = 0x12 } if len(m.Authority) > 0 { i -= len(m.Authority) @@ -2043,10 +2052,11 @@ func (m *MsgMarkVulnerableRollapps) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } if len(m.DrsVersions) > 0 { - for _, s := range m.DrsVersions { - l = len(s) - n += 1 + l + sovTx(uint64(l)) + l = 0 + for _, e := range m.DrsVersions { + l += sovTx(uint64(e)) } + n += 1 + sovTx(uint64(l)) + l } return n } @@ -4016,37 +4026,81 @@ func (m *MsgMarkVulnerableRollapps) Unmarshal(dAtA []byte) error { m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DrsVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DrsVersions = append(m.DrsVersions, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.DrsVersions) == 0 { + m.DrsVersions = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DrsVersions = append(m.DrsVersions, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field DrsVersions", wireType) } - m.DrsVersions = append(m.DrsVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/types/pb/dymint/state.pb.go b/types/pb/dymint/state.pb.go index e5ba789c9..0e95298c2 100644 --- a/types/pb/dymint/state.pb.go +++ b/types/pb/dymint/state.pb.go @@ -200,8 +200,8 @@ func (m *State) GetProposer() *Sequencer { 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"` + //drs version + DrsVersion uint32 `protobuf:"varint,2,opt,name=drs_version,json=drsVersion,proto3" json:"drs_version,omitempty"` } func (m *RollappParams) Reset() { *m = RollappParams{} } @@ -244,11 +244,11 @@ func (m *RollappParams) GetDa() string { return "" } -func (m *RollappParams) GetVersion() string { +func (m *RollappParams) GetDrsVersion() uint32 { if m != nil { - return m.Version + return m.DrsVersion } - return "" + return 0 } func init() { @@ -259,50 +259,51 @@ func init() { func init() { proto.RegisterFile("types/dymint/state.proto", fileDescriptor_4b679420add07272) } var fileDescriptor_4b679420add07272 = []byte{ - // 688 bytes of a gzipped FileDescriptorProto + // 695 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xcf, 0x4e, 0xdb, 0x4a, - 0x14, 0xc6, 0xe3, 0x10, 0x88, 0x33, 0x21, 0x89, 0x19, 0xb8, 0x92, 0xe1, 0x4a, 0x4e, 0xe0, 0xea, - 0x5e, 0x45, 0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, 0x16, 0x94, 0xba, 0x99, - 0xda, 0x8f, 0x5d, 0x28, 0x04, 0x22, 0x60, 0x85, 0x34, 0x67, 0x24, 0x67, 0x4b, 0xe6, 0xab, 0x81, - 0xb1, 0xf7, 0x65, 0x3a, 0xa7, 0xdb, 0xe9, 0x5c, 0x54, 0xe4, 0x07, 0x09, 0x7a, 0x2d, 0x51, 0x1e, - 0x1a, 0x84, 0x9b, 0x72, 0xdd, 0xaa, 0x92, 0xb0, 0x65, 0xc6, 0x99, 0x9f, 0x60, 0x96, 0xd8, 0xfd, - 0x91, 0x31, 0xde, 0x57, 0xad, 0x42, 0x4a, 0xbf, 0xc2, 0x2c, 0x11, 0x83, 0x81, 0x8b, 0x42, 0x21, - 0x03, 0x89, 0xb4, 0x71, 0x51, 0xc8, 0xd0, 0x7b, 0x6d, 0xc3, 0x38, 0x2d, 0x49, 0xd5, 0x71, 0x6b, - 0x64, 0x8c, 0x5b, 0xde, 0xe1, 0xea, 0x69, 0x38, 0x10, 0xad, 0x9a, 0x8b, 0x98, 0xaa, 0x4d, 0x79, - 0xaf, 0x09, 0x70, 0x08, 0xba, 0x01, 0x66, 0xf5, 0xd6, 0x03, 0xb1, 0x15, 0x01, 0x21, 0x69, 0xc0, - 0x03, 0xfd, 0x92, 0x66, 0x99, 0x48, 0x40, 0x97, 0x0e, 0x65, 0xe9, 0x7f, 0xb9, 0x7a, 0xf6, 0x91, - 0x8a, 0x6e, 0x94, 0xdb, 0x2b, 0xd7, 0x45, 0x38, 0x06, 0x96, 0xee, 0x02, 0x8e, 0x48, 0xa9, 0x0a, - 0x39, 0x94, 0x85, 0xf4, 0xd5, 0xbd, 0x0b, 0x59, 0xd6, 0xf3, 0x06, 0x98, 0x45, 0x49, 0x0b, 0xca, - 0x48, 0x69, 0x1f, 0xc9, 0x73, 0x0e, 0xaa, 0x73, 0xe6, 0xe4, 0xeb, 0x92, 0xe4, 0x21, 0x29, 0x51, - 0x8d, 0xcc, 0x5a, 0x66, 0xdb, 0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xf1, 0x7b, 0xe5, 0x1a, + 0xf7, 0xcf, 0x6e, 0xe3, 0xf1, 0xd9, 0x6d, 0xfc, 0x7c, 0x76, 0x1b, 0x9f, 0xbc, 0x24, 0xe3, 0xe9, + 0x32, 0xf4, 0x22, 0xb2, 0x10, 0xcf, 0x1f, 0x17, 0x82, 0xff, 0x76, 0xf7, 0xbd, 0xfa, 0x24, 0xe8, + 0xef, 0x4a, 0xa8, 0xd7, 0xe1, 0x9e, 0x9c, 0xf9, 0xf3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x24, + 0xb8, 0xfb, 0x6f, 0x4a, 0x05, 0x00, 0x00, } func (m *State) Marshal() (dAtA []byte, err error) { @@ -485,12 +486,10 @@ func (m *RollappParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintState(dAtA, i, uint64(len(m.Version))) + if m.DrsVersion != 0 { + i = encodeVarintState(dAtA, i, uint64(m.DrsVersion)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } if len(m.Da) > 0 { i -= len(m.Da) @@ -583,9 +582,8 @@ func (m *RollappParams) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovState(uint64(l)) + if m.DrsVersion != 0 { + n += 1 + sovState(uint64(m.DrsVersion)) } return n } @@ -1177,10 +1175,10 @@ func (m *RollappParams) Unmarshal(dAtA []byte) error { m.Da = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DrsVersion", wireType) } - var stringLen uint64 + m.DrsVersion = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowState @@ -1190,24 +1188,11 @@ func (m *RollappParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.DrsVersion |= uint32(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) diff --git a/types/serialization_test.go b/types/serialization_test.go index 470182a4a..780235585 100644 --- a/types/serialization_test.go +++ b/types/serialization_test.go @@ -14,7 +14,6 @@ import ( "github.com/dymensionxyz/dymint/testutil" "github.com/dymensionxyz/dymint/types" pb "github.com/dymensionxyz/dymint/types/pb/dymint" - "github.com/dymensionxyz/dymint/version" ) func TestBlockSerializationRoundTrip(t *testing.T) { @@ -134,8 +133,8 @@ func TestStateRoundTrip(t *testing.T) { }, }, RollappParams: pb.RollappParams{ - Da: "mock", - Version: version.Commit, + Da: "mock", + DrsVersion: 0, }, LastResultsHash: [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2}, AppHash: [32]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1}, diff --git a/version/version.go b/version/version.go index f7eb1ede0..2777743a9 100644 --- a/version/version.go +++ b/version/version.go @@ -2,5 +2,5 @@ package version var ( BuildVersion = "" - Commit = "" + DrsVersion = "0" )