diff --git a/CHANGELOG.md b/CHANGELOG.md index 2080b7fec..cb5814bb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,8 @@ nil params response ### Improvements +* [#242](https://github.com/babylonlabs-io/babylon/pull/242) Add +ResumeFinalityProposal and handler * [#258](https://github.com/babylonlabs-io/babylon/pull/258) fix go releaser and trigger by github action * [#252](https://github.com/babylonlabs-io/babylon/pull/252) Fix diff --git a/app/app.go b/app/app.go index 84e5fd9c8..924cde78e 100644 --- a/app/app.go +++ b/app/app.go @@ -23,8 +23,6 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - "github.com/babylonlabs-io/babylon/x/mint" - minttypes "github.com/babylonlabs-io/babylon/x/mint/types" abci "github.com/cometbft/cometbft/abci/types" cmtos "github.com/cometbft/cometbft/libs/os" cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -91,13 +89,15 @@ import ( ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" "github.com/spf13/cast" - "github.com/babylonlabs-io/babylon/app/ante" - "github.com/babylonlabs-io/babylon/app/upgrades" - bbn "github.com/babylonlabs-io/babylon/types" + "github.com/babylonlabs-io/babylon/x/mint" + minttypes "github.com/babylonlabs-io/babylon/x/mint/types" + "github.com/babylonlabs-io/babylon/app/ante" appkeepers "github.com/babylonlabs-io/babylon/app/keepers" appparams "github.com/babylonlabs-io/babylon/app/params" + "github.com/babylonlabs-io/babylon/app/upgrades" "github.com/babylonlabs-io/babylon/client/docs" + bbn "github.com/babylonlabs-io/babylon/types" "github.com/babylonlabs-io/babylon/x/btccheckpoint" btccheckpointtypes "github.com/babylonlabs-io/babylon/x/btccheckpoint/types" "github.com/babylonlabs-io/babylon/x/btclightclient" diff --git a/proto/babylon/finality/v1/tx.proto b/proto/babylon/finality/v1/tx.proto index 90d6ee73b..927db94fd 100644 --- a/proto/babylon/finality/v1/tx.proto +++ b/proto/babylon/finality/v1/tx.proto @@ -23,6 +23,8 @@ service Msg { // UnjailFinalityProvider defines a method for unjailing a jailed // finality provider, thus it can receive voting power rpc UnjailFinalityProvider(MsgUnjailFinalityProvider) returns (MsgUnjailFinalityProviderResponse); + // ResumeFinalityProposal handles the proposal of resuming finality. + rpc ResumeFinalityProposal(MsgResumeFinalityProposal) returns (MsgResumeFinalityProposalResponse); } // MsgCommitPubRandList defines a message for committing a list of public randomness for EOTS @@ -103,3 +105,22 @@ message MsgUnjailFinalityProvider { // MsgUnjailFinalityProviderResponse defines the Msg/UnjailFinalityProvider response type message MsgUnjailFinalityProviderResponse {} + +// MsgResumeFinalityProposal is a governance proposal to resume finality from halting +message MsgResumeFinalityProposal { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + // just FYI: cosmos.AddressString marks that this field should use type alias + // for AddressString instead of string, but the functionality is not yet implemented + // in cosmos-proto + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // fp_pks_hex is a list of finality provider public keys to jail + // the public key follows encoding in BIP-340 spec + repeated string fp_pks_hex = 2; + // halting_height is the height where the finality halting begins + uint32 halting_height = 3; +} + +// MsgResumeFinalityProposalResponse is the response to the MsgResumeFinalityProposal message. +message MsgResumeFinalityProposalResponse {} diff --git a/test/e2e/upgrades/v1.json b/test/e2e/upgrades/v1.json index 282a018af..c0ee936ad 100644 --- a/test/e2e/upgrades/v1.json +++ b/test/e2e/upgrades/v1.json @@ -17,4 +17,4 @@ "title": "any title", "summary": "any summary", "expedited": false -} \ No newline at end of file +} diff --git a/x/btcstaking/keeper/genesis.go b/x/btcstaking/keeper/genesis.go index faebc7ee2..df60c060a 100644 --- a/x/btcstaking/keeper/genesis.go +++ b/x/btcstaking/keeper/genesis.go @@ -5,9 +5,10 @@ import ( "fmt" "math" + sdk "github.com/cosmos/cosmos-sdk/types" + bbn "github.com/babylonlabs-io/babylon/types" "github.com/babylonlabs-io/babylon/x/btcstaking/types" - sdk "github.com/cosmos/cosmos-sdk/types" ) // InitGenesis initializes the module's state from a provided genesis state. diff --git a/x/btcstaking/keeper/keeper.go b/x/btcstaking/keeper/keeper.go index 0720bc231..c1575fab8 100644 --- a/x/btcstaking/keeper/keeper.go +++ b/x/btcstaking/keeper/keeper.go @@ -28,7 +28,8 @@ type ( AllowedStakingTxHashesKeySet collections.KeySet[[]byte] btcNet *chaincfg.Params - // the address capable of executing a MsgUpdateParams message. Typically, this + // the address capable of executing a MsgUpdateParams or + // MsgResumeFinalityProposal message. Typically, this // should be the x/gov module account. authority string } diff --git a/x/finality/README.md b/x/finality/README.md index c4f19e6d2..09ecf0bf7 100644 --- a/x/finality/README.md +++ b/x/finality/README.md @@ -421,6 +421,29 @@ message MsgUpdateParams { } ``` +### MsgResumeFinalityProposal + +The `MsgResumeFinalityProposal` message is used for resuming finality in case +of finality halting. It can only be executed via a governance proposal. + +```protobuf +// MsgResumeFinalityProposal is a governance proposal to resume finality from halting +message MsgResumeFinalityProposal { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + // just FYI: cosmos.AddressString marks that this field should use type alias + // for AddressString instead of string, but the functionality is not yet implemented + // in cosmos-proto + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // fp_pks_hex is a list of finality provider public keys to jail + // the public key follows encoding in BIP-340 spec + repeated string fp_pks_hex = 2; + // halting_height is the height where the finality halting begins + uint32 halting_height = 3; +} +``` + ## BeginBlocker Upon `EndBlocker`, the Finality module of each Babylon node will [execute the diff --git a/x/finality/keeper/gov.go b/x/finality/keeper/gov.go new file mode 100644 index 000000000..a5f7561f4 --- /dev/null +++ b/x/finality/keeper/gov.go @@ -0,0 +1,91 @@ +package keeper + +import ( + "errors" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + bbntypes "github.com/babylonlabs-io/babylon/types" + bstypes "github.com/babylonlabs-io/babylon/x/btcstaking/types" +) + +// HandleResumeFinalityProposal handles the resume finality proposal in the following steps: +// 1. check the validity of the proposal +// 2. jail the finality providers from the list and adjust the voting power cache from the +// halting height to the current height +// 3. tally blocks to ensure finality is resumed +func (k Keeper) HandleResumeFinalityProposal(ctx sdk.Context, fpPksHex []string, haltingHeight uint32) error { + // a valid proposal should be + // 1. the halting height along with some parameterized future heights should be indeed non-finalized + // 2. all the fps from the proposal should have missed the vote for the halting height + // TODO introduce a parameter to define the finality has been halting for at least some heights + + params := k.GetParams(ctx) + currentHeight := ctx.HeaderInfo().Height + currentTime := ctx.HeaderInfo().Time + + // jail the given finality providers + fpPks := make([]*bbntypes.BIP340PubKey, 0, len(fpPksHex)) + for _, fpPkHex := range fpPksHex { + fpPk, err := bbntypes.NewBIP340PubKeyFromHex(fpPkHex) + if err != nil { + return fmt.Errorf("invalid finality provider public key %s: %w", fpPkHex, err) + } + fpPks = append(fpPks, fpPk) + + voters := k.GetVoters(ctx, uint64(haltingHeight)) + _, voted := voters[fpPkHex] + if voted { + // all the given finality providers should not have voted for the halting height + return fmt.Errorf("the finality provider %s has voted for height %d", fpPkHex, haltingHeight) + } + + err = k.jailSluggishFinalityProvider(ctx, fpPk) + if err != nil && !errors.Is(err, bstypes.ErrFpAlreadyJailed) { + return fmt.Errorf("failed to jail the finality provider %s: %w", fpPkHex, err) + } + + // update signing info + signInfo, err := k.FinalityProviderSigningTracker.Get(ctx, fpPk.MustMarshal()) + if err != nil { + return fmt.Errorf("the signing info of finality provider %s is not created: %w", fpPkHex, err) + } + signInfo.JailedUntil = currentTime.Add(params.JailDuration) + signInfo.MissedBlocksCounter = 0 + if err := k.DeleteMissedBlockBitmap(ctx, fpPk); err != nil { + return fmt.Errorf("failed to remove the missed block bit map for finality provider %s: %w", fpPkHex, err) + } + err = k.FinalityProviderSigningTracker.Set(ctx, fpPk.MustMarshal(), signInfo) + if err != nil { + return fmt.Errorf("failed to set the signing info for finality provider %s: %w", fpPkHex, err) + } + + k.Logger(ctx).Info( + "finality provider is jailed in the proposal", + "height", haltingHeight, + "public_key", fpPkHex, + ) + } + + // set the all the given finality providers voting power to 0 + for h := uint64(haltingHeight); h <= uint64(currentHeight); h++ { + distCache := k.GetVotingPowerDistCache(ctx, h) + activeFps := distCache.GetActiveFinalityProviderSet() + for _, fpToJail := range fpPks { + if fp, exists := activeFps[fpToJail.MarshalHex()]; exists { + fp.IsJailed = true + k.SetVotingPower(ctx, fpToJail.MustMarshal(), h, 0) + } + } + + distCache.ApplyActiveFinalityProviders(params.MaxActiveFinalityProviders) + + // set the voting power distribution cache of the current height + k.SetVotingPowerDistCache(ctx, h, distCache) + } + + k.TallyBlocks(ctx) + + return nil +} diff --git a/x/finality/keeper/gov_test.go b/x/finality/keeper/gov_test.go new file mode 100644 index 000000000..a3812d5f6 --- /dev/null +++ b/x/finality/keeper/gov_test.go @@ -0,0 +1,110 @@ +package keeper_test + +import ( + "math/rand" + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + + "github.com/babylonlabs-io/babylon/testutil/datagen" + keepertest "github.com/babylonlabs-io/babylon/testutil/keeper" + bbntypes "github.com/babylonlabs-io/babylon/types" + "github.com/babylonlabs-io/babylon/x/finality/keeper" + "github.com/babylonlabs-io/babylon/x/finality/types" +) + +func TestHandleResumeFinalityProposal(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().Unix())) + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + bsKeeper := types.NewMockBTCStakingKeeper(ctrl) + iKeeper := types.NewMockIncentiveKeeper(ctrl) + cKeeper := types.NewMockCheckpointingKeeper(ctrl) + fKeeper, ctx := keepertest.FinalityKeeper(t, bsKeeper, iKeeper, cKeeper) + + haltingHeight := uint64(100) + currentHeight := uint64(110) + + activeFpNum := 3 + activeFpPks := generateNFpPks(t, r, activeFpNum) + setupActiveFps(t, activeFpPks, haltingHeight, fKeeper, ctx) + // set voting power table for each height, only the first fp votes + votedFpPk := activeFpPks[0] + for h := haltingHeight; h <= currentHeight; h++ { + fKeeper.SetBlock(ctx, &types.IndexedBlock{ + Height: h, + AppHash: datagen.GenRandomByteArray(r, 32), + Finalized: false, + }) + dc := types.NewVotingPowerDistCache() + for i := 0; i < activeFpNum; i++ { + fKeeper.SetVotingPower(ctx, activeFpPks[i].MustMarshal(), h, 1) + dc.AddFinalityProviderDistInfo(&types.FinalityProviderDistInfo{ + BtcPk: &activeFpPks[i], + TotalBondedSat: 1, + IsTimestamped: true, + }) + } + dc.ApplyActiveFinalityProviders(uint32(activeFpNum)) + votedSig, err := bbntypes.NewSchnorrEOTSSig(datagen.GenRandomByteArray(r, 32)) + require.NoError(t, err) + fKeeper.SetSig(ctx, h, &votedFpPk, votedSig) + fKeeper.SetVotingPowerDistCache(ctx, h, dc) + } + + // tally blocks and none of them should be finalised + iKeeper.EXPECT().RewardBTCStaking(gomock.Any(), gomock.Any(), gomock.Any()).Return().AnyTimes() + ctx = datagen.WithCtxHeight(ctx, currentHeight) + fKeeper.TallyBlocks(ctx) + for i := haltingHeight; i < currentHeight; i++ { + ib, err := fKeeper.GetBlock(ctx, i) + require.NoError(t, err) + require.False(t, ib.Finalized) + } + + // create a resume finality proposal to jail the last fp + bsKeeper.EXPECT().JailFinalityProvider(ctx, gomock.Any()).Return(nil).AnyTimes() + err := fKeeper.HandleResumeFinalityProposal(ctx, publicKeysToHex(activeFpPks[1:]), uint32(haltingHeight)) + require.NoError(t, err) + + for i := haltingHeight; i < currentHeight; i++ { + ib, err := fKeeper.GetBlock(ctx, i) + require.NoError(t, err) + require.True(t, ib.Finalized) + } +} + +func generateNFpPks(t *testing.T, r *rand.Rand, n int) []bbntypes.BIP340PubKey { + fpPks := make([]bbntypes.BIP340PubKey, 0, n) + for i := 0; i < n; i++ { + fpPk, err := datagen.GenRandomBIP340PubKey(r) + require.NoError(t, err) + fpPks = append(fpPks, *fpPk) + } + + return fpPks +} + +func publicKeysToHex(pks []bbntypes.BIP340PubKey) []string { + hexPks := make([]string, len(pks)) + for i, pk := range pks { + hexPks[i] = pk.MarshalHex() + } + return hexPks +} + +func setupActiveFps(t *testing.T, fpPks []bbntypes.BIP340PubKey, height uint64, fKeeper *keeper.Keeper, ctx sdk.Context) { + for _, fpPk := range fpPks { + signingInfo := types.NewFinalityProviderSigningInfo( + &fpPk, + int64(height), + 0, + ) + err := fKeeper.FinalityProviderSigningTracker.Set(ctx, fpPk, signingInfo) + require.NoError(t, err) + } +} diff --git a/x/finality/keeper/msg_server.go b/x/finality/keeper/msg_server.go index f414a877c..13410bee3 100644 --- a/x/finality/keeper/msg_server.go +++ b/x/finality/keeper/msg_server.go @@ -45,6 +45,20 @@ func (ms msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdatePara return &types.MsgUpdateParamsResponse{}, nil } +// ResumeFinalityProposal handles the proposal for resuming finality from halting +func (ms msgServer) ResumeFinalityProposal(goCtx context.Context, req *types.MsgResumeFinalityProposal) (*types.MsgResumeFinalityProposalResponse, error) { + if ms.authority != req.Authority { + return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, req.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := ms.HandleResumeFinalityProposal(ctx, req.FpPksHex, req.HaltingHeight); err != nil { + return nil, govtypes.ErrInvalidProposalMsg.Wrapf("failed to handle resume finality proposal: %v", err) + } + + return &types.MsgResumeFinalityProposalResponse{}, nil +} + // AddFinalitySig adds a new vote to a given block func (ms msgServer) AddFinalitySig(goCtx context.Context, req *types.MsgAddFinalitySig) (*types.MsgAddFinalitySigResponse, error) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), types.MetricsKeyAddFinalitySig) diff --git a/x/finality/keeper/tallying.go b/x/finality/keeper/tallying.go index 939e67c22..bedb1d9f4 100644 --- a/x/finality/keeper/tallying.go +++ b/x/finality/keeper/tallying.go @@ -107,6 +107,7 @@ func tally(fpSet map[string]uint64, voterBTCPKs map[string]struct{}) bool { votedPower += power } } + return votedPower*3 > totalPower*2 } diff --git a/x/finality/types/codec.go b/x/finality/types/codec.go index 2e978d134..fadf4d2b0 100644 --- a/x/finality/types/codec.go +++ b/x/finality/types/codec.go @@ -11,6 +11,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgCommitPubRandList{}, "finality/MsgCommitPubRandList", nil) cdc.RegisterConcrete(&MsgAddFinalitySig{}, "finality/MsgAddFinalitySig", nil) cdc.RegisterConcrete(&MsgUpdateParams{}, "finality/MsgUpdateParams", nil) + cdc.RegisterConcrete(&MsgResumeFinalityProposal{}, "finality/MsgResumeFinalityProposal", nil) } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { @@ -20,6 +21,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgCommitPubRandList{}, &MsgAddFinalitySig{}, &MsgUpdateParams{}, + &MsgResumeFinalityProposal{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/finality/types/msg.go b/x/finality/types/msg.go index 177e9a817..d8c315f74 100644 --- a/x/finality/types/msg.go +++ b/x/finality/types/msg.go @@ -1,17 +1,19 @@ package types import ( - fmt "fmt" + "fmt" - "github.com/babylonlabs-io/babylon/crypto/eots" - bbn "github.com/babylonlabs-io/babylon/types" "github.com/cometbft/cometbft/crypto/merkle" "github.com/cometbft/cometbft/crypto/tmhash" sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/babylonlabs-io/babylon/crypto/eots" + bbn "github.com/babylonlabs-io/babylon/types" ) // ensure that these message types implement the sdk.Msg interface var ( + _ sdk.Msg = &MsgResumeFinalityProposal{} _ sdk.Msg = &MsgUpdateParams{} _ sdk.Msg = &MsgAddFinalitySig{} _ sdk.Msg = &MsgCommitPubRandList{} diff --git a/x/finality/types/tx.pb.go b/x/finality/types/tx.pb.go index 835433de4..e7ab123fd 100644 --- a/x/finality/types/tx.pb.go +++ b/x/finality/types/tx.pb.go @@ -442,6 +442,111 @@ func (m *MsgUnjailFinalityProviderResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUnjailFinalityProviderResponse proto.InternalMessageInfo +// MsgResumeFinalityProposal is a governance proposal to resume finality from halting +type MsgResumeFinalityProposal struct { + // authority is the address of the governance account. + // just FYI: cosmos.AddressString marks that this field should use type alias + // for AddressString instead of string, but the functionality is not yet implemented + // in cosmos-proto + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // fp_pks_hex is a list of finality provider public keys to jail + // the public key follows encoding in BIP-340 spec + FpPksHex []string `protobuf:"bytes,2,rep,name=fp_pks_hex,json=fpPksHex,proto3" json:"fp_pks_hex,omitempty"` + // halting_height is the height where the finality halting begins + HaltingHeight uint32 `protobuf:"varint,3,opt,name=halting_height,json=haltingHeight,proto3" json:"halting_height,omitempty"` +} + +func (m *MsgResumeFinalityProposal) Reset() { *m = MsgResumeFinalityProposal{} } +func (m *MsgResumeFinalityProposal) String() string { return proto.CompactTextString(m) } +func (*MsgResumeFinalityProposal) ProtoMessage() {} +func (*MsgResumeFinalityProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_2dd6da066b6baf1d, []int{8} +} +func (m *MsgResumeFinalityProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgResumeFinalityProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgResumeFinalityProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgResumeFinalityProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgResumeFinalityProposal.Merge(m, src) +} +func (m *MsgResumeFinalityProposal) XXX_Size() int { + return m.Size() +} +func (m *MsgResumeFinalityProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MsgResumeFinalityProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgResumeFinalityProposal proto.InternalMessageInfo + +func (m *MsgResumeFinalityProposal) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgResumeFinalityProposal) GetFpPksHex() []string { + if m != nil { + return m.FpPksHex + } + return nil +} + +func (m *MsgResumeFinalityProposal) GetHaltingHeight() uint32 { + if m != nil { + return m.HaltingHeight + } + return 0 +} + +// MsgResumeFinalityProposalResponse is the response to the MsgResumeFinalityProposal message. +type MsgResumeFinalityProposalResponse struct { +} + +func (m *MsgResumeFinalityProposalResponse) Reset() { *m = MsgResumeFinalityProposalResponse{} } +func (m *MsgResumeFinalityProposalResponse) String() string { return proto.CompactTextString(m) } +func (*MsgResumeFinalityProposalResponse) ProtoMessage() {} +func (*MsgResumeFinalityProposalResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2dd6da066b6baf1d, []int{9} +} +func (m *MsgResumeFinalityProposalResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgResumeFinalityProposalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgResumeFinalityProposalResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgResumeFinalityProposalResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgResumeFinalityProposalResponse.Merge(m, src) +} +func (m *MsgResumeFinalityProposalResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgResumeFinalityProposalResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgResumeFinalityProposalResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgResumeFinalityProposalResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCommitPubRandList)(nil), "babylon.finality.v1.MsgCommitPubRandList") proto.RegisterType((*MsgCommitPubRandListResponse)(nil), "babylon.finality.v1.MsgCommitPubRandListResponse") @@ -451,61 +556,68 @@ func init() { proto.RegisterType((*MsgUpdateParamsResponse)(nil), "babylon.finality.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgUnjailFinalityProvider)(nil), "babylon.finality.v1.MsgUnjailFinalityProvider") proto.RegisterType((*MsgUnjailFinalityProviderResponse)(nil), "babylon.finality.v1.MsgUnjailFinalityProviderResponse") + proto.RegisterType((*MsgResumeFinalityProposal)(nil), "babylon.finality.v1.MsgResumeFinalityProposal") + proto.RegisterType((*MsgResumeFinalityProposalResponse)(nil), "babylon.finality.v1.MsgResumeFinalityProposalResponse") } func init() { proto.RegisterFile("babylon/finality/v1/tx.proto", fileDescriptor_2dd6da066b6baf1d) } var fileDescriptor_2dd6da066b6baf1d = []byte{ - // 774 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4f, 0x1b, 0x47, - 0x18, 0xf5, 0x62, 0x30, 0x65, 0x6c, 0x81, 0xd8, 0x22, 0x58, 0x0c, 0x5d, 0x1b, 0x17, 0x55, 0x14, - 0x95, 0xdd, 0x62, 0x10, 0x6d, 0xdd, 0x13, 0xae, 0x5a, 0x51, 0x15, 0xab, 0xd6, 0x1a, 0x2e, 0x91, - 0xa2, 0xd5, 0xfe, 0xf2, 0xec, 0x04, 0xef, 0xce, 0x64, 0x66, 0x16, 0xe1, 0x1b, 0xca, 0x29, 0xc7, - 0x1c, 0x72, 0xca, 0x29, 0x7f, 0x02, 0x87, 0x5c, 0x73, 0x8c, 0xc4, 0x11, 0xe5, 0x14, 0x71, 0xb0, - 0x22, 0x38, 0xf0, 0x6f, 0x44, 0xde, 0x5d, 0xdb, 0x18, 0x6c, 0xc5, 0xe4, 0xc0, 0xcd, 0x33, 0xdf, - 0x9b, 0xf9, 0xde, 0xbc, 0xf7, 0x3e, 0x2f, 0x58, 0x36, 0x0d, 0xb3, 0xd9, 0xc0, 0xbe, 0x5a, 0x47, - 0xbe, 0xd1, 0x40, 0xbc, 0xa9, 0x1e, 0x6f, 0xaa, 0xfc, 0x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73, 0xfc, 0xd3, - 0xb0, 0x4b, 0xfa, 0x71, 0x59, 0x65, 0x34, 0x5c, 0xb7, 0x93, 0x09, 0x32, 0x7d, 0xa1, 0x5a, 0x1d, - 0x76, 0xfe, 0x36, 0x2a, 0xfb, 0xcb, 0x28, 0xa8, 0x6e, 0x8f, 0x53, 0x01, 0xcc, 0x0f, 0xc9, 0xc1, - 0x50, 0xba, 0x83, 0xf1, 0xd9, 0x9d, 0x87, 0xe1, 0x3b, 0x14, 0xb2, 0x13, 0xa7, 0x37, 0x67, 0xeb, - 0x42, 0x79, 0xff, 0xfc, 0x4a, 0x16, 0x2e, 0xae, 0x64, 0xe1, 0xf3, 0x95, 0x2c, 0xbc, 0xba, 0x96, - 0x13, 0x17, 0xd7, 0x72, 0xe2, 0xd3, 0xb5, 0x9c, 0x78, 0x52, 0xfc, 0x7a, 0xc2, 0x4e, 0x7a, 0xdf, - 0xb8, 0x30, 0x6c, 0x66, 0x2a, 0xfc, 0xc0, 0x6d, 0x7d, 0x09, 0x00, 0x00, 0xff, 0xff, 0x64, 0x3e, - 0x90, 0x65, 0xa0, 0x07, 0x00, 0x00, + // 858 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0xc6, 0xf9, 0xd1, 0x8c, 0xdd, 0x54, 0x5d, 0xa2, 0x76, 0xe3, 0x06, 0xdb, 0x0d, 0x05, + 0x85, 0x8a, 0xee, 0x92, 0xb4, 0x0a, 0x10, 0x4e, 0x31, 0x02, 0x05, 0x51, 0x0b, 0x6b, 0xdc, 0x5c, + 0x90, 0xd0, 0x6a, 0xd6, 0x3b, 0x9e, 0x1d, 0xec, 0x9d, 0x19, 0x66, 0x66, 0xa3, 0xf8, 0x56, 0x71, + 0xe2, 0xc8, 0x81, 0x13, 0x27, 0x8e, 0x1c, 0x7b, 0xe0, 0xca,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x55, 0x7b, 0xfc, 0xfc, 0xb4, 0x6c, 0xbd, 0x38, 0x2d, 0x5b, 0xff, 0x9e, 0x96, 0xad, 0x9f, + 0xce, 0xca, 0xb9, 0x17, 0x67, 0xe5, 0xdc, 0x3f, 0x67, 0xe5, 0xdc, 0x37, 0xdb, 0xaf, 0x1e, 0xda, + 0xa3, 0xd1, 0x6f, 0x43, 0x3a, 0xbf, 0xc1, 0x62, 0xfa, 0xcf, 0xf0, 0xf0, 0xbf, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x28, 0x5a, 0x21, 0x35, 0xf3, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -530,6 +642,8 @@ type MsgClient interface { // UnjailFinalityProvider defines a method for unjailing a jailed // finality provider, thus it can receive voting power UnjailFinalityProvider(ctx context.Context, in *MsgUnjailFinalityProvider, opts ...grpc.CallOption) (*MsgUnjailFinalityProviderResponse, error) + // ResumeFinalityProposal handles the proposal of resuming finality. + ResumeFinalityProposal(ctx context.Context, in *MsgResumeFinalityProposal, opts ...grpc.CallOption) (*MsgResumeFinalityProposalResponse, error) } type msgClient struct { @@ -576,6 +690,15 @@ func (c *msgClient) UnjailFinalityProvider(ctx context.Context, in *MsgUnjailFin return out, nil } +func (c *msgClient) ResumeFinalityProposal(ctx context.Context, in *MsgResumeFinalityProposal, opts ...grpc.CallOption) (*MsgResumeFinalityProposalResponse, error) { + out := new(MsgResumeFinalityProposalResponse) + err := c.cc.Invoke(ctx, "/babylon.finality.v1.Msg/ResumeFinalityProposal", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // CommitPubRandList commits a list of public randomness for EOTS @@ -588,6 +711,8 @@ type MsgServer interface { // UnjailFinalityProvider defines a method for unjailing a jailed // finality provider, thus it can receive voting power UnjailFinalityProvider(context.Context, *MsgUnjailFinalityProvider) (*MsgUnjailFinalityProviderResponse, error) + // ResumeFinalityProposal handles the proposal of resuming finality. + ResumeFinalityProposal(context.Context, *MsgResumeFinalityProposal) (*MsgResumeFinalityProposalResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -606,6 +731,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) UnjailFinalityProvider(ctx context.Context, req *MsgUnjailFinalityProvider) (*MsgUnjailFinalityProviderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnjailFinalityProvider not implemented") } +func (*UnimplementedMsgServer) ResumeFinalityProposal(ctx context.Context, req *MsgResumeFinalityProposal) (*MsgResumeFinalityProposalResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResumeFinalityProposal not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -683,6 +811,24 @@ func _Msg_UnjailFinalityProvider_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _Msg_ResumeFinalityProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgResumeFinalityProposal) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ResumeFinalityProposal(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/babylon.finality.v1.Msg/ResumeFinalityProposal", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ResumeFinalityProposal(ctx, req.(*MsgResumeFinalityProposal)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "babylon.finality.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -703,6 +849,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UnjailFinalityProvider", Handler: _Msg_UnjailFinalityProvider_Handler, }, + { + MethodName: "ResumeFinalityProposal", + Handler: _Msg_ResumeFinalityProposal_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "babylon/finality/v1/tx.proto", @@ -1043,6 +1193,73 @@ func (m *MsgUnjailFinalityProviderResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } +func (m *MsgResumeFinalityProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgResumeFinalityProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgResumeFinalityProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HaltingHeight != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.HaltingHeight)) + i-- + dAtA[i] = 0x18 + } + if len(m.FpPksHex) > 0 { + for iNdEx := len(m.FpPksHex) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FpPksHex[iNdEx]) + copy(dAtA[i:], m.FpPksHex[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.FpPksHex[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgResumeFinalityProposalResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgResumeFinalityProposalResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgResumeFinalityProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1189,6 +1406,37 @@ func (m *MsgUnjailFinalityProviderResponse) Size() (n int) { return n } +func (m *MsgResumeFinalityProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.FpPksHex) > 0 { + for _, s := range m.FpPksHex { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + if m.HaltingHeight != 0 { + n += 1 + sovTx(uint64(m.HaltingHeight)) + } + return n +} + +func (m *MsgResumeFinalityProposalResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2127,6 +2375,189 @@ func (m *MsgUnjailFinalityProviderResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgResumeFinalityProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgResumeFinalityProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgResumeFinalityProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FpPksHex", 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.FpPksHex = append(m.FpPksHex, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HaltingHeight", wireType) + } + m.HaltingHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HaltingHeight |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgResumeFinalityProposalResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgResumeFinalityProposalResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgResumeFinalityProposalResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0