diff --git a/CHANGELOG.md b/CHANGELOG.md index ea16db0d4..7a7e1cc00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### State Machine Breaking +* [#224](https://github.com/babylonlabs-io/babylon/pull/224) Make injected checkpoint a standard tx * [#207](https://github.com/babylonlabs-io/babylon/pull/207) Rename total voting power to total bonded sat * [#204](https://github.com/babylonlabs-io/babylon/pull/204) Add babylon finality diff --git a/app/app.go b/app/app.go index 95e7aad1d..e22ac0155 100644 --- a/app/app.go +++ b/app/app.go @@ -488,7 +488,7 @@ func NewBabylonApp( // set proposal extension proposalHandler := checkpointing.NewProposalHandler( - logger, &app.CheckpointingKeeper, bApp.Mempool(), bApp) + logger, &app.CheckpointingKeeper, bApp.Mempool(), bApp, app.EncCfg) proposalHandler.SetHandlers(bApp) // set vote extension diff --git a/proto/babylon/checkpointing/v1/checkpoint.proto b/proto/babylon/checkpointing/v1/checkpoint.proto index 309447a7a..2afe6e991 100644 --- a/proto/babylon/checkpointing/v1/checkpoint.proto +++ b/proto/babylon/checkpointing/v1/checkpoint.proto @@ -44,8 +44,10 @@ message RawCheckpointWithMeta { repeated CheckpointStateUpdate lifecycle = 5; } -// InjectedCheckpoint wraps the checkpoint and the extended votes -message InjectedCheckpoint { +// MsgInjectedCheckpoint wraps the checkpoint and the extended votes +// Note: this is a special message type that is only for internal ABCI++ usage +// for inserting checkpoint into the block +message MsgInjectedCheckpoint { RawCheckpointWithMeta ckpt = 1; // extended_commit_info is the commit info including the vote extensions // from the previous proposal diff --git a/x/checkpointing/proposal.go b/x/checkpointing/proposal.go index 68748c460..de0662345 100644 --- a/x/checkpointing/proposal.go +++ b/x/checkpointing/proposal.go @@ -7,21 +7,28 @@ import ( "slices" "cosmossdk.io/log" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" - abci "github.com/cometbft/cometbft/abci/types" - + appparams "github.com/babylonlabs-io/babylon/app/params" ckpttypes "github.com/babylonlabs-io/babylon/x/checkpointing/types" ) const defaultInjectedTxIndex = 0 type ProposalHandler struct { - logger log.Logger - ckptKeeper CheckpointingKeeper - txVerifier baseapp.ProposalTxVerifier + logger log.Logger + ckptKeeper CheckpointingKeeper + bApp *baseapp.BaseApp + + // used for building and parsing the injected tx + txEncoder sdk.TxEncoder + txDecoder sdk.TxDecoder + txBuilder client.TxBuilder + defaultPrepareProposalHandler sdk.PrepareProposalHandler defaultProcessProposalHandler sdk.ProcessProposalHandler } @@ -30,13 +37,19 @@ func NewProposalHandler( logger log.Logger, ckptKeeper CheckpointingKeeper, mp mempool.Mempool, - txVerifier baseapp.ProposalTxVerifier, + bApp *baseapp.BaseApp, + encCfg *appparams.EncodingConfig, ) *ProposalHandler { - defaultHandler := baseapp.NewDefaultProposalHandler(mp, txVerifier) + defaultHandler := baseapp.NewDefaultProposalHandler(mp, bApp) + ckpttypes.RegisterInterfaces(encCfg.InterfaceRegistry) + return &ProposalHandler{ logger: logger, ckptKeeper: ckptKeeper, - txVerifier: txVerifier, + bApp: bApp, + txEncoder: encCfg.TxConfig.TxEncoder(), + txDecoder: encCfg.TxConfig.TxDecoder(), + txBuilder: encCfg.TxConfig.NewTxBuilder(), defaultPrepareProposalHandler: defaultHandler.PrepareProposalHandler(), defaultProcessProposalHandler: defaultHandler.ProcessProposalHandler(), } @@ -91,11 +104,11 @@ func (h *ProposalHandler) PrepareProposal() sdk.PrepareProposalHandler { } // 3. inject a "fake" tx into the proposal s.t. validators can decode, verify the checkpoint - injectedCkpt := &ckpttypes.InjectedCheckpoint{ + injectedCkpt := &ckpttypes.MsgInjectedCheckpoint{ Ckpt: ckpt, ExtendedCommitInfo: &req.LocalLastCommit, } - injectedVoteExtTx, err := injectedCkpt.Marshal() + injectedVoteExtTx, err := h.buildInjectedTxBytes(injectedCkpt) if err != nil { return nil, fmt.Errorf("failed to encode vote extensions into a special tx: %w", err) } @@ -268,7 +281,7 @@ func (h *ProposalHandler) ProcessProposal() sdk.ProcessProposalHandler { // and no BLS signatures are send in epoch 0 if epoch.IsVoteExtensionProposal(ctx) { // 1. extract the special tx containing the checkpoint - injectedCkpt, err := extractInjectedCheckpoint(req.Txs) + injectedCkpt, err := h.ExtractInjectedCheckpoint(req.Txs) if err != nil { h.logger.Error( "processProposal: failed to extract injected checkpoint from the tx set", "err", err) @@ -345,7 +358,7 @@ func (h *ProposalHandler) PreBlocker() sdk.PreBlocker { } // 1. extract the special tx containing BLS sigs - injectedCkpt, err := extractInjectedCheckpoint(req.Txs) + injectedCkpt, err := h.ExtractInjectedCheckpoint(req.Txs) if err != nil { return res, fmt.Errorf( "preblocker: failed to extract injected checkpoint from the tx set: %w", err) @@ -360,24 +373,37 @@ func (h *ProposalHandler) PreBlocker() sdk.PreBlocker { } } -// extractInjectedCheckpoint extracts the injected checkpoint from the tx set -func extractInjectedCheckpoint(txs [][]byte) (*ckpttypes.InjectedCheckpoint, error) { +func (h *ProposalHandler) buildInjectedTxBytes(injectedCkpt *ckpttypes.MsgInjectedCheckpoint) ([]byte, error) { + if err := h.txBuilder.SetMsgs(injectedCkpt); err != nil { + return nil, err + } + + return h.txEncoder(h.txBuilder.GetTx()) +} + +// ExtractInjectedCheckpoint extracts the injected checkpoint from the tx set +func (h *ProposalHandler) ExtractInjectedCheckpoint(txs [][]byte) (*ckpttypes.MsgInjectedCheckpoint, error) { if len(txs) < defaultInjectedTxIndex+1 { return nil, fmt.Errorf("the tx set does not contain the injected tx") } - injectedTx := txs[defaultInjectedTxIndex] + injectedTxBytes := txs[defaultInjectedTxIndex] - if len(injectedTx) == 0 { + if len(injectedTxBytes) == 0 { return nil, fmt.Errorf("the injected vote extensions tx is empty") } - var injectedCkpt ckpttypes.InjectedCheckpoint - if err := injectedCkpt.Unmarshal(injectedTx); err != nil { + injectedTx, err := h.txDecoder(injectedTxBytes) + if err != nil { return nil, fmt.Errorf("failed to decode injected vote extension tx: %w", err) } + msgs := injectedTx.GetMsgs() + if len(msgs) != 1 { + return nil, fmt.Errorf("injected tx must have exact one message, got %d", len(msgs)) + } + injectedCkpt := msgs[0].(*ckpttypes.MsgInjectedCheckpoint) - return &injectedCkpt, nil + return injectedCkpt, nil } // removeInjectedTx removes the injected tx from the tx set diff --git a/x/checkpointing/proposal_test.go b/x/checkpointing/proposal_test.go index afd88afd4..65ffb139f 100644 --- a/x/checkpointing/proposal_test.go +++ b/x/checkpointing/proposal_test.go @@ -13,6 +13,8 @@ import ( cbftt "github.com/cometbft/cometbft/abci/types" cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" tendermintTypes "github.com/cometbft/cometbft/proto/tendermint/types" + dbm "github.com/cosmos/cosmos-db" + "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" protoio "github.com/cosmos/gogoproto/io" @@ -20,6 +22,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + appparams "github.com/babylonlabs-io/babylon/app/params" "github.com/babylonlabs-io/babylon/crypto/bls12381" "github.com/babylonlabs-io/babylon/testutil/datagen" "github.com/babylonlabs-io/babylon/testutil/helper" @@ -484,11 +487,17 @@ func TestPrepareProposalAtVoteExtensionHeight(t *testing.T) { ek.EXPECT().GetTotalVotingPower(gomock.Any(), ec.Epoch.EpochNumber).Return(scenario.TotalPower).AnyTimes() ek.EXPECT().GetValidatorSet(gomock.Any(), ec.Epoch.EpochNumber).Return(et.NewSortedValidatorSet(ToValidatorSet(scenario.ValidatorSet))).AnyTimes() + logger := log.NewTestLogger(t) + db := dbm.NewMemDB() + name := t.Name() + encCfg := appparams.DefaultEncodingConfig() + bApp := baseapp.NewBaseApp(name, logger, db, encCfg.TxConfig.TxDecoder(), baseapp.SetChainID("chain-test")) h := checkpointing.NewProposalHandler( log.NewNopLogger(), ek, mem, - nil, + bApp, + encCfg, ) commitInfo, _, cometInfo := helper.ExtendedCommitToLastCommit(cbftt.ExtendedCommitInfo{Round: 0, Votes: scenario.Extensions}) @@ -502,8 +511,7 @@ func TestPrepareProposalAtVoteExtensionHeight(t *testing.T) { } else { require.NoError(t, err) require.Len(t, prop.Txs, 1) - var checkpoint checkpointingtypes.InjectedCheckpoint - err := checkpoint.Unmarshal(prop.Txs[0]) + checkpoint, err := h.ExtractInjectedCheckpoint(prop.Txs) require.NoError(t, err) err = verifyCheckpoint(scenario.ValidatorSet, checkpoint.Ckpt.Ckpt) require.NoError(t, err) diff --git a/x/checkpointing/types/checkpoint.pb.go b/x/checkpointing/types/checkpoint.pb.go index 801ac381d..7850a21b2 100644 --- a/x/checkpointing/types/checkpoint.pb.go +++ b/x/checkpointing/types/checkpoint.pb.go @@ -207,26 +207,28 @@ func (m *RawCheckpointWithMeta) GetLifecycle() []*CheckpointStateUpdate { return nil } -// InjectedCheckpoint wraps the checkpoint and the extended votes -type InjectedCheckpoint struct { +// MsgInjectedCheckpoint wraps the checkpoint and the extended votes +// Note: this is a special message type that is only for internal ABCI++ usage +// for inserting checkpoint into the block +type MsgInjectedCheckpoint struct { Ckpt *RawCheckpointWithMeta `protobuf:"bytes,1,opt,name=ckpt,proto3" json:"ckpt,omitempty"` // extended_commit_info is the commit info including the vote extensions // from the previous proposal ExtendedCommitInfo *types.ExtendedCommitInfo `protobuf:"bytes,2,opt,name=extended_commit_info,json=extendedCommitInfo,proto3" json:"extended_commit_info,omitempty"` } -func (m *InjectedCheckpoint) Reset() { *m = InjectedCheckpoint{} } -func (m *InjectedCheckpoint) String() string { return proto.CompactTextString(m) } -func (*InjectedCheckpoint) ProtoMessage() {} -func (*InjectedCheckpoint) Descriptor() ([]byte, []int) { +func (m *MsgInjectedCheckpoint) Reset() { *m = MsgInjectedCheckpoint{} } +func (m *MsgInjectedCheckpoint) String() string { return proto.CompactTextString(m) } +func (*MsgInjectedCheckpoint) ProtoMessage() {} +func (*MsgInjectedCheckpoint) Descriptor() ([]byte, []int) { return fileDescriptor_73996df9c6aabde4, []int{2} } -func (m *InjectedCheckpoint) XXX_Unmarshal(b []byte) error { +func (m *MsgInjectedCheckpoint) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *InjectedCheckpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgInjectedCheckpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_InjectedCheckpoint.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgInjectedCheckpoint.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -236,26 +238,26 @@ func (m *InjectedCheckpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *InjectedCheckpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_InjectedCheckpoint.Merge(m, src) +func (m *MsgInjectedCheckpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInjectedCheckpoint.Merge(m, src) } -func (m *InjectedCheckpoint) XXX_Size() int { +func (m *MsgInjectedCheckpoint) XXX_Size() int { return m.Size() } -func (m *InjectedCheckpoint) XXX_DiscardUnknown() { - xxx_messageInfo_InjectedCheckpoint.DiscardUnknown(m) +func (m *MsgInjectedCheckpoint) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInjectedCheckpoint.DiscardUnknown(m) } -var xxx_messageInfo_InjectedCheckpoint proto.InternalMessageInfo +var xxx_messageInfo_MsgInjectedCheckpoint proto.InternalMessageInfo -func (m *InjectedCheckpoint) GetCkpt() *RawCheckpointWithMeta { +func (m *MsgInjectedCheckpoint) GetCkpt() *RawCheckpointWithMeta { if m != nil { return m.Ckpt } return nil } -func (m *InjectedCheckpoint) GetExtendedCommitInfo() *types.ExtendedCommitInfo { +func (m *MsgInjectedCheckpoint) GetExtendedCommitInfo() *types.ExtendedCommitInfo { if m != nil { return m.ExtendedCommitInfo } @@ -404,7 +406,7 @@ func init() { proto.RegisterEnum("babylon.checkpointing.v1.CheckpointStatus", CheckpointStatus_name, CheckpointStatus_value) proto.RegisterType((*RawCheckpoint)(nil), "babylon.checkpointing.v1.RawCheckpoint") proto.RegisterType((*RawCheckpointWithMeta)(nil), "babylon.checkpointing.v1.RawCheckpointWithMeta") - proto.RegisterType((*InjectedCheckpoint)(nil), "babylon.checkpointing.v1.InjectedCheckpoint") + proto.RegisterType((*MsgInjectedCheckpoint)(nil), "babylon.checkpointing.v1.MsgInjectedCheckpoint") proto.RegisterType((*CheckpointStateUpdate)(nil), "babylon.checkpointing.v1.CheckpointStateUpdate") proto.RegisterType((*BlsSig)(nil), "babylon.checkpointing.v1.BlsSig") } @@ -414,61 +416,61 @@ func init() { } var fileDescriptor_73996df9c6aabde4 = []byte{ - // 852 bytes of a gzipped FileDescriptorProto + // 855 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcf, 0x6e, 0x1b, 0x45, 0x1c, 0xf6, 0x26, 0x1b, 0x53, 0x8f, 0xe3, 0xca, 0x8c, 0x1a, 0x64, 0xb9, 0x92, 0x6d, 0x82, 0x10, 0xa1, 0xc0, 0xae, 0xe2, 0x1e, 0x40, 0xf4, 0x50, 0x6c, 0xc7, 0x01, 0xab, 0x71, 0x08, 0xbb, 0xb6, - 0x40, 0xbd, 0xac, 0x66, 0x77, 0xc7, 0xeb, 0xc1, 0xb3, 0x3b, 0xab, 0x9d, 0xd9, 0xb4, 0xe6, 0x05, - 0x40, 0x39, 0xf5, 0x05, 0x22, 0x21, 0xf1, 0x02, 0xbc, 0x03, 0x17, 0x8e, 0x3d, 0xa2, 0x4a, 0x14, + 0x40, 0xbd, 0xac, 0x66, 0x77, 0xc7, 0xe3, 0xc1, 0xbb, 0x3b, 0xab, 0x9d, 0xd9, 0xb4, 0xe6, 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, 0xb0, 0xbf, 0x57, 0x5d, 0xcf, 0x98, 0x3d, + 0x16, 0x4d, 0x68, 0x12, 0x5e, 0x65, 0xee, 0x0f, 0x0e, 0x3b, 0x07, 0x83, 0x87, 0xfd, 0xbd, 0xaa, + 0x9e, 0x31, 0xf7, 0x69, 0x84, 0x02, 0xfa, 0x0d, 0xf6, 0xeb, 0xfa, 0x77, 0x3f, 0x34, 0x0a, 0xdd, + 0x2f, 0x7e, 0x3e, 0x6b, 0x68, 0x4f, 0xcf, 0x1a, 0xda, 0xef, 0x67, 0x0d, 0xed, 0xc9, 0x79, 0xa3, + 0xf0, 0xf4, 0xbc, 0x51, 0xf8, 0xe5, 0xbc, 0x51, 0x78, 0xf8, 0xe1, 0xbf, 0xbb, 0xf4, 0xf8, 0x85, + 0xf7, 0x48, 0xbd, 0x0c, 0x6e, 0x51, 0x85, 0xee, 0xee, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, + 0x6e, 0xa3, 0xf0, 0xb5, 0x06, 0x00, 0x00, } func (this *RawCheckpoint) Equal(that interface{}) bool { @@ -721,7 +723,7 @@ func (m *RawCheckpointWithMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *InjectedCheckpoint) Marshal() (dAtA []byte, err error) { +func (m *MsgInjectedCheckpoint) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -731,12 +733,12 @@ func (m *InjectedCheckpoint) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *InjectedCheckpoint) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgInjectedCheckpoint) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *InjectedCheckpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgInjectedCheckpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -941,7 +943,7 @@ func (m *RawCheckpointWithMeta) Size() (n int) { return n } -func (m *InjectedCheckpoint) Size() (n int) { +func (m *MsgInjectedCheckpoint) Size() (n int) { if m == nil { return 0 } @@ -1377,7 +1379,7 @@ func (m *RawCheckpointWithMeta) Unmarshal(dAtA []byte) error { } return nil } -func (m *InjectedCheckpoint) Unmarshal(dAtA []byte) error { +func (m *MsgInjectedCheckpoint) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1400,10 +1402,10 @@ func (m *InjectedCheckpoint) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: InjectedCheckpoint: wiretype end group for non-group") + return fmt.Errorf("proto: MsgInjectedCheckpoint: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: InjectedCheckpoint: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgInjectedCheckpoint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/checkpointing/types/codec.go b/x/checkpointing/types/codec.go index 5faec792e..6f5610d04 100644 --- a/x/checkpointing/types/codec.go +++ b/x/checkpointing/types/codec.go @@ -15,6 +15,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { // Register messages registry.RegisterImplementations((*sdk.Msg)(nil), &MsgWrappedCreateValidator{}, + &MsgInjectedCheckpoint{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) }