diff --git a/block/consensus.go b/block/consensus.go index b5776f1f5..529bdcb43 100644 --- a/block/consensus.go +++ b/block/consensus.go @@ -4,6 +4,8 @@ import ( "fmt" "sync" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/gogo/protobuf/proto" "github.com/dymensionxyz/dymint/types" @@ -36,6 +38,16 @@ func (q *ConsensusMsgQueue) Get() []proto.Message { return q.queue.DequeueAll() } +func ConsensusMsgSigner(m proto.Message) (sdk.AccAddress, error) { + switch m.(type) { + case *rdktypes.ConsensusMsgUpsertSequencer: + const RdkSequencersModuleName = "sequencers" + return authtypes.NewModuleAddress(RdkSequencersModuleName), nil + default: + return nil, fmt.Errorf("unknown consensus msg") + } +} + // ConsensusMsgsOnSequencerSetUpdate forms a list of consensus messages to handle the sequencer set update. func ConsensusMsgsOnSequencerSetUpdate(newSequencers []types.Sequencer) ([]proto.Message, error) { msgs := make([]proto.Message, 0, len(newSequencers)) @@ -44,7 +56,12 @@ func ConsensusMsgsOnSequencerSetUpdate(newSequencers []types.Sequencer) ([]proto if err != nil { return nil, fmt.Errorf("sequencer consensus public key: %w", err) } + signer, err := ConsensusMsgSigner(new(rdktypes.ConsensusMsgUpsertSequencer)) + if err != nil { + return nil, fmt.Errorf("consensus msg signer: %w", err) + } msgs = append(msgs, &rdktypes.ConsensusMsgUpsertSequencer{ + Signer: signer.String(), Operator: s.SettlementAddress, ConsPubKey: protoutils.CosmosToGogo(anyPK), RewardAddr: s.RewardAddr, diff --git a/block/consensus_test.go b/block/consensus_test.go new file mode 100644 index 000000000..57cb7599f --- /dev/null +++ b/block/consensus_test.go @@ -0,0 +1,24 @@ +package block_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/dymensionxyz/dymint/block" + sequencertypes "github.com/dymensionxyz/dymint/types/pb/dymensionxyz/dymension/sequencer" + rdktypes "github.com/dymensionxyz/dymint/types/pb/rollapp/sequencers/types" +) + +func TestConsensusMsgSigner(t *testing.T) { + t.Run("valid", func(t *testing.T) { + addr, err := block.ConsensusMsgSigner(new(rdktypes.ConsensusMsgUpsertSequencer)) + require.NoError(t, err) + require.Equal(t, "cosmos1k3m3ck7fkza9zlwn95p0m73wugf5x4hxf83rqd", addr.String()) + }) + + t.Run("invalid", func(t *testing.T) { + _, err := block.ConsensusMsgSigner(new(sequencertypes.MsgCreateSequencer)) + require.Error(t, err) + }) +} diff --git a/block/production_test.go b/block/production_test.go index 7a855dc55..42912105c 100644 --- a/block/production_test.go +++ b/block/production_test.go @@ -21,6 +21,7 @@ import ( "github.com/tendermint/tendermint/libs/pubsub" "github.com/tendermint/tendermint/proxy" + block2 "github.com/dymensionxyz/dymint/block" "github.com/dymensionxyz/dymint/da" "github.com/dymensionxyz/dymint/mempool" mempoolv1 "github.com/dymensionxyz/dymint/mempool/v1" @@ -353,10 +354,14 @@ func TestUpdateInitialSequencerSet(t *testing.T) { require.Len(block.Data.ConsensusMessages, 2) // Construct expected messages + signer, err := block2.ConsensusMsgSigner(new(rdktypes.ConsensusMsgUpsertSequencer)) + require.NoError(err) + // Msg 1 anyPK1, err := proposer.AnyConsPubKey() require.NoError(err) expectedConsMsg1 := &rdktypes.ConsensusMsgUpsertSequencer{ + Signer: signer.String(), Operator: proposer.SettlementAddress, ConsPubKey: protoutils.CosmosToGogo(anyPK1), RewardAddr: proposer.RewardAddr, @@ -373,6 +378,7 @@ func TestUpdateInitialSequencerSet(t *testing.T) { anyPK2, err := sequencer.AnyConsPubKey() require.NoError(err) expectedConsMsg2 := &rdktypes.ConsensusMsgUpsertSequencer{ + Signer: signer.String(), Operator: sequencer.SettlementAddress, ConsPubKey: protoutils.CosmosToGogo(anyPK2), RewardAddr: sequencer.RewardAddr, @@ -474,9 +480,12 @@ func TestUpdateExistingSequencerSet(t *testing.T) { require.Len(block.Data.ConsensusMessages, 1) // Construct the expected message + signer, err := block2.ConsensusMsgSigner(new(rdktypes.ConsensusMsgUpsertSequencer)) + require.NoError(err) anyPK, err := updatedSequencer.AnyConsPubKey() require.NoError(err) expectedConsMsg := &rdktypes.ConsensusMsgUpsertSequencer{ + Signer: signer.String(), Operator: updatedSequencer.SettlementAddress, ConsPubKey: protoutils.CosmosToGogo(anyPK), RewardAddr: updatedSequencer.RewardAddr, diff --git a/proto/types/rollapp/sequencers/types/tx.proto b/proto/types/rollapp/sequencers/types/tx.proto index 7bb24438c..38a625089 100644 --- a/proto/types/rollapp/sequencers/types/tx.proto +++ b/proto/types/rollapp/sequencers/types/tx.proto @@ -29,14 +29,20 @@ message MsgUpdateWhitelistedRelayersResponse {} // ConsensusMsgUpsertSequencer is a consensus message to upsert the sequencer. message ConsensusMsgUpsertSequencer { - // Operator is the bech32-encoded address of the actor sending the update - string operator = 1; - // ConsPubKey is a tendermint consensus pub key - google.protobuf.Any cons_pub_key = 2; + option (cosmos.msg.v1.signer) = "signer"; + + // Signer is the bech32-encoded address of the consensus msg signer. + // Expected to be an authorized address. + string signer = 1; + // Operator is the bech32-encoded address of the sequencer + string operator = 2; + // ConsPubKey is a tendermint consensus pub key of the sequencer + google.protobuf.Any cons_pub_key = 3; // RewardAddr is the bech32-encoded sequencer's reward address - string reward_addr = 3; - // Relayers is an array of the whitelisted relayer addresses. Addresses are bech32-encoded strings. - repeated string relayers = 4; + string reward_addr = 4; + // Relayers is an array of the whitelisted relayer addresses of the sequencer. + // Addresses are bech32-encoded strings. + repeated string relayers = 5; } message ConsensusMsgUpsertSequencerResponse {} diff --git a/types/pb/rollapp/sequencers/types/tx.pb.go b/types/pb/rollapp/sequencers/types/tx.pb.go index 146904143..d09539817 100644 --- a/types/pb/rollapp/sequencers/types/tx.pb.go +++ b/types/pb/rollapp/sequencers/types/tx.pb.go @@ -207,14 +207,18 @@ var xxx_messageInfo_MsgUpdateWhitelistedRelayersResponse proto.InternalMessageIn // ConsensusMsgUpsertSequencer is a consensus message to upsert the sequencer. type ConsensusMsgUpsertSequencer struct { - // Operator is the bech32-encoded address of the actor sending the update - Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"` - // ConsPubKey is a tendermint consensus pub key - ConsPubKey *types.Any `protobuf:"bytes,2,opt,name=cons_pub_key,json=consPubKey,proto3" json:"cons_pub_key,omitempty"` + // Signer is the bech32-encoded address of the consensus msg signer. + // Expected to be an authorized address. + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // Operator is the bech32-encoded address of the sequencer + Operator string `protobuf:"bytes,2,opt,name=operator,proto3" json:"operator,omitempty"` + // ConsPubKey is a tendermint consensus pub key of the sequencer + ConsPubKey *types.Any `protobuf:"bytes,3,opt,name=cons_pub_key,json=consPubKey,proto3" json:"cons_pub_key,omitempty"` // RewardAddr is the bech32-encoded sequencer's reward address - RewardAddr string `protobuf:"bytes,3,opt,name=reward_addr,json=rewardAddr,proto3" json:"reward_addr,omitempty"` - // Relayers is an array of the whitelisted relayer addresses. Addresses are bech32-encoded strings. - Relayers []string `protobuf:"bytes,4,rep,name=relayers,proto3" json:"relayers,omitempty"` + RewardAddr string `protobuf:"bytes,4,opt,name=reward_addr,json=rewardAddr,proto3" json:"reward_addr,omitempty"` + // Relayers is an array of the whitelisted relayer addresses of the sequencer. + // Addresses are bech32-encoded strings. + Relayers []string `protobuf:"bytes,5,rep,name=relayers,proto3" json:"relayers,omitempty"` } func (m *ConsensusMsgUpsertSequencer) Reset() { *m = ConsensusMsgUpsertSequencer{} } @@ -250,6 +254,13 @@ func (m *ConsensusMsgUpsertSequencer) XXX_DiscardUnknown() { var xxx_messageInfo_ConsensusMsgUpsertSequencer proto.InternalMessageInfo +func (m *ConsensusMsgUpsertSequencer) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + func (m *ConsensusMsgUpsertSequencer) GetOperator() string { if m != nil { return m.Operator @@ -328,32 +339,34 @@ func init() { } var fileDescriptor_bb27942d1c1a6ff0 = []byte{ - // 400 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0xea, 0xd3, 0x40, - 0x14, 0xc5, 0x9b, 0xff, 0x5f, 0xa4, 0x4e, 0x75, 0x53, 0x8a, 0xc4, 0xa8, 0xb1, 0xc4, 0x4f, 0x5c, - 0x64, 0x50, 0xc1, 0x45, 0x77, 0xd5, 0xa5, 0x08, 0x12, 0x15, 0xc1, 0x4d, 0x49, 0x32, 0xd7, 0x34, - 0x98, 0xcc, 0x8c, 0x73, 0x27, 0xda, 0x71, 0xe9, 0x13, 0xf8, 0x24, 0xe2, 0x63, 0xb8, 0xec, 0xd2, - 0xa5, 0xb4, 0x0b, 0x5f, 0x43, 0x32, 0xf9, 0x90, 0x96, 0x92, 0xd5, 0xcc, 0xe5, 0xfc, 0x2e, 0x73, - 0xce, 0xbd, 0x43, 0xee, 0x6b, 0x23, 0x01, 0xa9, 0x12, 0x45, 0x11, 0x4b, 0x49, 0x11, 0x3e, 0x55, - 0xc0, 0x53, 0x50, 0x48, 0x1b, 0x41, 0x6f, 0x42, 0xa9, 0x84, 0x16, 0x53, 0xb7, 0x45, 0xc2, 0xff, - 0x48, 0x68, 0x11, 0x6f, 0x96, 0x89, 0x4c, 0x58, 0x88, 0xd6, 0xb7, 0x86, 0xf7, 0x6e, 0x36, 0xfd, - 0xa9, 0xc0, 0x52, 0x20, 0x2d, 0x31, 0xa3, 0x9f, 0x1f, 0xd5, 0x47, 0x2b, 0x5f, 0xcb, 0x84, 0xc8, - 0x0a, 0xa0, 0xb6, 0x4a, 0xaa, 0x0f, 0x34, 0xe6, 0xa6, 0x91, 0x02, 0x46, 0xae, 0xbe, 0xc4, 0xec, - 0xad, 0x64, 0xb1, 0x86, 0x08, 0xbe, 0xc4, 0x8a, 0x2d, 0x19, 0x53, 0x80, 0x38, 0xf5, 0xc8, 0x58, - 0x48, 0x50, 0xb1, 0x16, 0xca, 0x75, 0xe6, 0xce, 0x83, 0x4b, 0x51, 0x5f, 0x4f, 0x6f, 0x91, 0x89, -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7, 0xba, 0xfd, 0xa1, 0x32, 0x39, 0xf1, 0x7b, 0x93, 0x8b, 0x36, - 0xd3, 0x93, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xae, 0x33, 0x00, 0x54, 0xe0, 0x02, 0x00, 0x00, + // 421 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x8a, 0xd4, 0x40, + 0x14, 0x85, 0x3b, 0x3d, 0x3a, 0x8c, 0xd5, 0xba, 0x09, 0xc3, 0x10, 0xa3, 0xc6, 0x10, 0xff, 0x06, + 0x17, 0x29, 0x54, 0x70, 0x31, 0xbb, 0xd1, 0xa5, 0x08, 0x12, 0x15, 0xc1, 0x4d, 0x93, 0xa4, 0xae, + 0x35, 0xc1, 0xa4, 0xaa, 0xac, 0x5b, 0xd1, 0x29, 0x97, 0x3e, 0x81, 0x8f, 0xe2, 0x63, 0xb8, 0x1c, + 0x70, 0xe3, 0x52, 0xba, 0x17, 0xbe, 0x86, 0xe4, 0x57, 0x3a, 0x34, 0xbd, 0x4a, 0x0e, 0xe7, 0xbb, + 0xd4, 0x39, 0x75, 0x8b, 0x3c, 0x30, 0x56, 0x01, 0x52, 0x2d, 0xcb, 0x32, 0x55, 0x8a, 0x22, 0x7c, + 0xaa, 0x41, 0xe4, 0xa0, 0x91, 0x76, 0x86, 0x39, 0x8f, 0x95, 0x96, 0x46, 0xba, 0x5e, 0x8f, 0xc4, + 0xff, 0x91, 0xb8, 0x45, 0xfc, 0x43, 0x2e, 0xb9, 0x6c, 0x21, 0xda, 0xfc, 0x75, 0xbc, 0x7f, 0xab, + 0x9b, 0xcf, 0x25, 0x56, 0x12, 0x69, 0x85, 0x9c, 0x7e, 0x7e, 0xd4, 0x7c, 0x7a, 0xfb, 0x3a, 0x97, + 0x92, 0x97, 0x40, 0x5b, 0x95, 0xd5, 0x1f, 0x68, 0x2a, 0x6c, 0x67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, 0xfe, 0x8b, 0xa6, 0x7f, 0x9f, 0x2e, 0xba, 0x47, 0xee, 0xec, 0x28, 0x35, 0x94, 0x7f, 0xf6, + 0xe6, 0xe7, 0x2a, 0x70, 0x2e, 0x56, 0x81, 0xf3, 0x67, 0x15, 0x38, 0xdf, 0xd7, 0xc1, 0xec, 0x62, + 0x1d, 0xcc, 0x7e, 0xaf, 0x83, 0xd9, 0xfb, 0x13, 0x5e, 0x98, 0xb3, 0x3a, 0x8b, 0x73, 0x59, 0x51, + 0x66, 0x2b, 0x10, 0x58, 0x48, 0x71, 0x6e, 0xbf, 0x36, 0xa2, 0x10, 0xa6, 0x7f, 0xc6, 0x2a, 0xdb, + 0xf2, 0xc4, 0xb3, 0xfd, 0xb6, 0xe0, 0x93, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x00, 0xa2, + 0x2e, 0x05, 0x03, 0x00, 0x00, } func (m *MsgUpdateRewardAddress) Marshal() (dAtA []byte, err error) { @@ -504,7 +517,7 @@ func (m *ConsensusMsgUpsertSequencer) MarshalToSizedBuffer(dAtA []byte) (int, er copy(dAtA[i:], m.Relayers[iNdEx]) i = encodeVarintTx(dAtA, i, uint64(len(m.Relayers[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } } if len(m.RewardAddr) > 0 { @@ -512,7 +525,7 @@ func (m *ConsensusMsgUpsertSequencer) MarshalToSizedBuffer(dAtA []byte) (int, er copy(dAtA[i:], m.RewardAddr) i = encodeVarintTx(dAtA, i, uint64(len(m.RewardAddr))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if m.ConsPubKey != nil { { @@ -524,13 +537,20 @@ func (m *ConsensusMsgUpsertSequencer) MarshalToSizedBuffer(dAtA []byte) (int, er i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(m.Operator) > 0 { i -= len(m.Operator) copy(dAtA[i:], m.Operator) i = encodeVarintTx(dAtA, i, uint64(len(m.Operator))) i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -630,6 +650,10 @@ func (m *ConsensusMsgUpsertSequencer) Size() (n int) { } var l int _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Operator) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1024,6 +1048,38 @@ func (m *ConsensusMsgUpsertSequencer) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= 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 + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) } @@ -1055,7 +1111,7 @@ func (m *ConsensusMsgUpsertSequencer) Unmarshal(dAtA []byte) error { } m.Operator = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConsPubKey", wireType) } @@ -1091,7 +1147,7 @@ func (m *ConsensusMsgUpsertSequencer) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RewardAddr", wireType) } @@ -1123,7 +1179,7 @@ func (m *ConsensusMsgUpsertSequencer) Unmarshal(dAtA []byte) error { } m.RewardAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relayers", wireType) }