From 1d65bd7e55859ee22dfac95f6a08e388b9c8b199 Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Wed, 27 Nov 2024 14:36:47 +1100 Subject: [PATCH] fix proto --- proto/babylon/btcstaking/v1/packet.proto | 46 +-- .../clientcontroller/cosmwasm/msg.go | 16 +- test/e2e/bcd_consumer_integration_test.go | 2 +- x/btcstaking/keeper/grpc_query.go | 5 +- .../types/btc_staking_consumer_events.go | 1 + x/btcstaking/types/packet.pb.go | 324 +++++++++--------- 6 files changed, 204 insertions(+), 190 deletions(-) diff --git a/proto/babylon/btcstaking/v1/packet.proto b/proto/babylon/btcstaking/v1/packet.proto index ba492bf1..e69bf550 100644 --- a/proto/babylon/btcstaking/v1/packet.proto +++ b/proto/babylon/btcstaking/v1/packet.proto @@ -99,29 +99,29 @@ message ActiveBTCDelegation { // BTCUndelegationInfo provides all necessary info about the undeleagation message BTCUndelegationInfo { - // unbonding_tx is the transaction which will transfer the funds from staking - // output to unbonding output. Unbonding output will usually have lower timelock - // than staking output. - bytes unbonding_tx = 1; - // delegator_unbonding_sig is the signature on the unbonding tx - // by the delegator (i.e., SK corresponding to btc_pk). - // It effectively proves that the delegator wants to unbond and thus - // Babylon will consider this BTC delegation unbonded. Delegator's BTC - // on Bitcoin will be unbonded after timelock. - bytes delegator_unbonding_sig = 2; - // covenant_unbonding_sig_list is the list of signatures on the unbonding tx - // by covenant members - repeated SignatureInfo covenant_unbonding_sig_list = 3; - // slashing_tx is the unbonding slashing tx - bytes slashing_tx = 4; - // delegator_slashing_sig is the signature on the slashing tx - // by the delegator (i.e., SK corresponding to btc_pk). - // It will be a part of the witness for the unbonding tx output. - bytes delegator_slashing_sig = 5; - // covenant_slashing_sigs is a list of adaptor signatures on the - // unbonding slashing tx by each covenant member - // It will be a part of the witness for the staking tx output. - repeated CovenantAdaptorSignatures covenant_slashing_sigs = 6; + // unbonding_tx is the transaction which will transfer the funds from staking + // output to unbonding output. Unbonding output will usually have lower timelock + // than staking output. + bytes unbonding_tx = 1; + // slashing_tx is the slashing tx for unbonding transactions + // It is partially signed by SK corresponding to btc_pk, but not signed by + // finality provider or covenant yet. + bytes slashing_tx = 2; + // delegator_slashing_sig is the signature on the slashing tx + // by the delegator (i.e., SK corresponding to btc_pk). + // It will be a part of the witness for the unbonding tx output. + bytes delegator_slashing_sig = 3; + // covenant_slashing_sigs is a list of adaptor signatures on the slashing tx + // by each covenant member + // It will be a part of the witness for the staking tx output. + repeated CovenantAdaptorSignatures covenant_slashing_sigs = 4; + // covenant_unbonding_sig_list is the list of signatures on the unbonding tx + // by covenant members + // It must be provided after processing undelegate message by Babylon + repeated SignatureInfo covenant_unbonding_sig_list = 5; + // delegator_unbonding_info is the information about transaction which spent + // the staking output + DelegatorUnbondingInfo delegator_unbonding_info = 6; } // SlashedBTCDelegation is an IBC packet sent from Babylon to consumer diff --git a/test/e2e/bcd_consumer_integration/clientcontroller/cosmwasm/msg.go b/test/e2e/bcd_consumer_integration/clientcontroller/cosmwasm/msg.go index f103065f..097d14c7 100644 --- a/test/e2e/bcd_consumer_integration/clientcontroller/cosmwasm/msg.go +++ b/test/e2e/bcd_consumer_integration/clientcontroller/cosmwasm/msg.go @@ -92,12 +92,16 @@ type SignatureInfo struct { } type BtcUndelegationInfo struct { - UnbondingTx []byte `json:"unbonding_tx"` - DelegatorUnbondingSig []byte `json:"delegator_unbonding_sig"` - CovenantUnbondingSigs []SignatureInfo `json:"covenant_unbonding_sig_list"` - SlashingTx []byte `json:"slashing_tx"` - DelegatorSlashingSig []byte `json:"delegator_slashing_sig"` - CovenantSlashingSigs []CovenantAdaptorSignatures `json:"covenant_slashing_sigs"` + UnbondingTx []byte `json:"unbonding_tx"` + SlashingTx []byte `json:"slashing_tx"` + DelegatorSlashingSig []byte `json:"delegator_slashing_sig"` + CovenantSlashingSigs []*CovenantAdaptorSignatures `json:"covenant_slashing_sigs"` + CovenantUnbondingSigList []*SignatureInfo `json:"covenant_unbonding_sig_list"` + DelegatorUnbondingInfo *DelegatorUnbondingInfo `json:"delegator_unbonding_info"` +} + +type DelegatorUnbondingInfo struct { + SpendStakeTx []byte `json:"spend_stake_tx"` } type ActiveBtcDelegation struct { diff --git a/test/e2e/bcd_consumer_integration_test.go b/test/e2e/bcd_consumer_integration_test.go index 243ad518..a8f83173 100644 --- a/test/e2e/bcd_consumer_integration_test.go +++ b/test/e2e/bcd_consumer_integration_test.go @@ -247,7 +247,7 @@ func (s *BCDConsumerIntegrationTestSuite) Test5ActivateDelegation() { }, time.Second*30, time.Second) // Assert delegation details - s.Empty(dataFromContract.Delegations[0].UndelegationInfo.DelegatorUnbondingSig) + s.Empty(dataFromContract.Delegations[0].UndelegationInfo) s.Equal(activeDel.BtcPk.MarshalHex(), dataFromContract.Delegations[0].BtcPkHex) s.Len(dataFromContract.Delegations[0].FpBtcPkList, 2) s.Equal(activeDel.FpBtcPkList[0].MarshalHex(), dataFromContract.Delegations[0].FpBtcPkList[0]) diff --git a/x/btcstaking/keeper/grpc_query.go b/x/btcstaking/keeper/grpc_query.go index 74df4c03..6a69ed87 100644 --- a/x/btcstaking/keeper/grpc_query.go +++ b/x/btcstaking/keeper/grpc_query.go @@ -67,6 +67,8 @@ func (k Keeper) FinalityProvider(c context.Context, req *types.QueryFinalityProv } ctx := sdk.UnwrapSDKContext(c) + currBlockHeight := uint64(ctx.BlockHeight()) + fp, err := k.GetFinalityProvider(ctx, key) if err != nil { // Try in the btcstkconsumer module @@ -80,13 +82,12 @@ func (k Keeper) FinalityProvider(c context.Context, req *types.QueryFinalityProv return nil, err } // FPs for consumers are not stored in the voting power table - fpResp := types.NewFinalityProviderResponse(fp, 0) + fpResp := types.NewFinalityProviderResponse(fp, currBlockHeight) return &types.QueryFinalityProviderResponse{FinalityProvider: fpResp}, nil } return nil, err } - currBlockHeight := uint64(ctx.BlockHeight()) fpResp := types.NewFinalityProviderResponse(fp, currBlockHeight) return &types.QueryFinalityProviderResponse{FinalityProvider: fpResp}, nil } diff --git a/x/btcstaking/types/btc_staking_consumer_events.go b/x/btcstaking/types/btc_staking_consumer_events.go index aac73e20..973bf763 100644 --- a/x/btcstaking/types/btc_staking_consumer_events.go +++ b/x/btcstaking/types/btc_staking_consumer_events.go @@ -69,6 +69,7 @@ func CreateActiveBTCDelegationEvent(activeDel *BTCDelegation) (*BTCStakingConsum DelegatorSlashingSig: delegatorUnbondingSlashingSigBytes, CovenantUnbondingSigList: activeDel.BtcUndelegation.CovenantUnbondingSigList, CovenantSlashingSigs: activeDel.BtcUndelegation.CovenantSlashingSigs, + DelegatorUnbondingInfo: activeDel.BtcUndelegation.DelegatorUnbondingInfo, }, ParamsVersion: activeDel.ParamsVersion, }, diff --git a/x/btcstaking/types/packet.pb.go b/x/btcstaking/types/packet.pb.go index 0c50e9b1..fe056eef 100644 --- a/x/btcstaking/types/packet.pb.go +++ b/x/btcstaking/types/packet.pb.go @@ -473,25 +473,25 @@ type BTCUndelegationInfo struct { // output to unbonding output. Unbonding output will usually have lower timelock // than staking output. UnbondingTx []byte `protobuf:"bytes,1,opt,name=unbonding_tx,json=unbondingTx,proto3" json:"unbonding_tx,omitempty"` - // delegator_unbonding_sig is the signature on the unbonding tx - // by the delegator (i.e., SK corresponding to btc_pk). - // It effectively proves that the delegator wants to unbond and thus - // Babylon will consider this BTC delegation unbonded. Delegator's BTC - // on Bitcoin will be unbonded after timelock. - DelegatorUnbondingSig []byte `protobuf:"bytes,2,opt,name=delegator_unbonding_sig,json=delegatorUnbondingSig,proto3" json:"delegator_unbonding_sig,omitempty"` - // covenant_unbonding_sig_list is the list of signatures on the unbonding tx - // by covenant members - CovenantUnbondingSigList []*SignatureInfo `protobuf:"bytes,3,rep,name=covenant_unbonding_sig_list,json=covenantUnbondingSigList,proto3" json:"covenant_unbonding_sig_list,omitempty"` - // slashing_tx is the unbonding slashing tx - SlashingTx []byte `protobuf:"bytes,4,opt,name=slashing_tx,json=slashingTx,proto3" json:"slashing_tx,omitempty"` + // slashing_tx is the slashing tx for unbonding transactions + // It is partially signed by SK corresponding to btc_pk, but not signed by + // finality provider or covenant yet. + SlashingTx []byte `protobuf:"bytes,2,opt,name=slashing_tx,json=slashingTx,proto3" json:"slashing_tx,omitempty"` // delegator_slashing_sig is the signature on the slashing tx // by the delegator (i.e., SK corresponding to btc_pk). // It will be a part of the witness for the unbonding tx output. - DelegatorSlashingSig []byte `protobuf:"bytes,5,opt,name=delegator_slashing_sig,json=delegatorSlashingSig,proto3" json:"delegator_slashing_sig,omitempty"` - // covenant_slashing_sigs is a list of adaptor signatures on the - // unbonding slashing tx by each covenant member + DelegatorSlashingSig []byte `protobuf:"bytes,3,opt,name=delegator_slashing_sig,json=delegatorSlashingSig,proto3" json:"delegator_slashing_sig,omitempty"` + // covenant_slashing_sigs is a list of adaptor signatures on the slashing tx + // by each covenant member // It will be a part of the witness for the staking tx output. - CovenantSlashingSigs []*CovenantAdaptorSignatures `protobuf:"bytes,6,rep,name=covenant_slashing_sigs,json=covenantSlashingSigs,proto3" json:"covenant_slashing_sigs,omitempty"` + CovenantSlashingSigs []*CovenantAdaptorSignatures `protobuf:"bytes,4,rep,name=covenant_slashing_sigs,json=covenantSlashingSigs,proto3" json:"covenant_slashing_sigs,omitempty"` + // covenant_unbonding_sig_list is the list of signatures on the unbonding tx + // by covenant members + // It must be provided after processing undelegate message by Babylon + CovenantUnbondingSigList []*SignatureInfo `protobuf:"bytes,5,rep,name=covenant_unbonding_sig_list,json=covenantUnbondingSigList,proto3" json:"covenant_unbonding_sig_list,omitempty"` + // delegator_unbonding_info is the information about transaction which spent + // the staking output + DelegatorUnbondingInfo *DelegatorUnbondingInfo `protobuf:"bytes,6,opt,name=delegator_unbonding_info,json=delegatorUnbondingInfo,proto3" json:"delegator_unbonding_info,omitempty"` } func (m *BTCUndelegationInfo) Reset() { *m = BTCUndelegationInfo{} } @@ -534,37 +534,37 @@ func (m *BTCUndelegationInfo) GetUnbondingTx() []byte { return nil } -func (m *BTCUndelegationInfo) GetDelegatorUnbondingSig() []byte { +func (m *BTCUndelegationInfo) GetSlashingTx() []byte { if m != nil { - return m.DelegatorUnbondingSig + return m.SlashingTx } return nil } -func (m *BTCUndelegationInfo) GetCovenantUnbondingSigList() []*SignatureInfo { +func (m *BTCUndelegationInfo) GetDelegatorSlashingSig() []byte { if m != nil { - return m.CovenantUnbondingSigList + return m.DelegatorSlashingSig } return nil } -func (m *BTCUndelegationInfo) GetSlashingTx() []byte { +func (m *BTCUndelegationInfo) GetCovenantSlashingSigs() []*CovenantAdaptorSignatures { if m != nil { - return m.SlashingTx + return m.CovenantSlashingSigs } return nil } -func (m *BTCUndelegationInfo) GetDelegatorSlashingSig() []byte { +func (m *BTCUndelegationInfo) GetCovenantUnbondingSigList() []*SignatureInfo { if m != nil { - return m.DelegatorSlashingSig + return m.CovenantUnbondingSigList } return nil } -func (m *BTCUndelegationInfo) GetCovenantSlashingSigs() []*CovenantAdaptorSignatures { +func (m *BTCUndelegationInfo) GetDelegatorUnbondingInfo() *DelegatorUnbondingInfo { if m != nil { - return m.CovenantSlashingSigs + return m.DelegatorUnbondingInfo } return nil } @@ -836,75 +836,76 @@ func init() { } var fileDescriptor_3ed0d17ad14d6c0e = []byte{ - // 1085 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0xe2, 0x56, - 0x10, 0xc7, 0x40, 0xb2, 0xcb, 0x40, 0xb2, 0xc9, 0x4b, 0xb2, 0xb1, 0x76, 0x5b, 0x36, 0x65, 0xff, - 0x28, 0xda, 0xee, 0x42, 0x93, 0xae, 0x7a, 0xa9, 0x7a, 0x08, 0x64, 0x23, 0xa2, 0x6e, 0x13, 0x6a, - 0x48, 0x2b, 0xf5, 0x62, 0xf9, 0xcf, 0x03, 0x9e, 0x30, 0x7e, 0x96, 0xdf, 0x83, 0x90, 0x2f, 0x51, - 0xf5, 0xd0, 0x4f, 0xd4, 0x53, 0x8f, 0xab, 0x5e, 0xda, 0x63, 0x95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x43, 0x92, 0xfc, 0x0c, 0x49, 0xbe, 0x81, 0x9c, 0xc7, - 0x3d, 0x75, 0x05, 0x13, 0x5a, 0x54, 0xc7, 0x96, 0xcf, 0x79, 0xf7, 0xbc, 0xdb, 0xe2, 0x42, 0x50, - 0x0c, 0x54, 0xef, 0x34, 0xb4, 0xc0, 0x8e, 0x3c, 0x83, 0xa2, 0x15, 0x0d, 0x80, 0xce, 0x6c, 0xf5, - 0x61, 0x9c, 0x51, 0x34, 0x13, 0x76, 0xe5, 0x9f, 0x3c, 0x6c, 0xcd, 0x69, 0x69, 0x60, 0x18, 0x04, - 0xa0, 0xbe, 0x8e, 0x09, 0x17, 0x43, 0xc3, 0x50, 0x74, 0x74, 0x37, 0xed, 0x59, 0x6e, 0x3f, 0x87, - 0xf5, 0x88, 0xd1, 0xde, 0x40, 0x77, 0x98, 0x90, 0xc8, 0xaa, 0x82, 0x56, 0xec, 0x06, 0x6c, 0x6e, - 0x0d, 0x3e, 0x30, 0x21, 0xc9, 0x67, 0x50, 0x12, 0xd2, 0xf0, 0xa5, 0xde, 0xa7, 0xac, 0xd7, 0x97, - 0x58, 0x95, 0x35, 0xad, 0x88, 0xb2, 0x26, 0x8a, 0xc8, 0xa7, 0x00, 0xd4, 0xb5, 0x63, 0x40, 0x1e, - 0x01, 0x05, 0xea, 0xda, 0x91, 0xfa, 0x29, 0x14, 0x24, 0x97, 0x86, 0xa3, 0x0b, 0x43, 0x62, 0x8d, - 0xf2, 0xda, 0x43, 0x14, 0xb4, 0x0d, 0xb4, 0x8d, 0x6a, 0xa4, 0xcb, 0x89, 0xba, 0xba, 0xa7, 0xec, - 0x97, 0xb4, 0x42, 0x24, 0xe9, 0x4c, 0xf0, 0x85, 0x01, 0xd3, 0x22, 0xfd, 0x03, 0xd4, 0x43, 0x2c, - 0xea, 0x4c, 0xc8, 0x3b, 0x78, 0x6c, 0x87, 0x05, 0xe1, 0xbe, 0x3e, 0x85, 0x0a, 0xd6, 0xc3, 0x32, - 0x96, 0xb4, 0xed, 0xa9, 0xb6, 0x1d, 0x29, 0xdb, 0xac, 0x47, 0x2e, 0x60, 0x2d, 0x18, 0x5c, 0xd7, - 0x70, 0x65, 0x80, 0x15, 0x6a, 0x01, 0x39, 0xfb, 0xc5, 0x82, 0xd6, 0x35, 0x22, 0xec, 0x91, 0x6d, - 0x78, 0x81, 0x27, 0xd6, 0x73, 0x0d, 0x39, 0xf2, 0xa9, 0xd0, 0x4a, 0xb1, 0x9b, 0x36, 0xeb, 0x09, - 0xf2, 0x06, 0x48, 0xfc, 0x18, 0x3e, 0x92, 0xde, 0x48, 0xea, 0xcc, 0x9e, 0xa8, 0x80, 0x05, 0xd9, - 0x88, 0x34, 0xe7, 0xa8, 0x38, 0xb5, 0x27, 0xe4, 0x25, 0xac, 0x87, 0xac, 0xc7, 0xc7, 0xb1, 0x21, - 0x55, 0xd7, 0x10, 0xb9, 0x36, 0x95, 0x76, 0xd8, 0x90, 0x92, 0x1f, 0x61, 0x73, 0xe4, 0xda, 0xd3, - 0xa6, 0xeb, 0xcc, 0xed, 0x72, 0x75, 0x1d, 0xa9, 0xb6, 0x68, 0xfc, 0xeb, 0x9d, 0xc6, 0x45, 0xca, - 0xe4, 0xd4, 0xed, 0x72, 0x6d, 0x63, 0x34, 0x23, 0x09, 0xe2, 0x7b, 0x86, 0x6f, 0x0c, 0x85, 0x3e, - 0xa6, 0x3e, 0xce, 0xc2, 0xa3, 0x30, 0x7e, 0x28, 0xfd, 0x21, 0x14, 0x56, 0x7e, 0xcd, 0xe1, 0x4a, - 0x9b, 0x75, 0x18, 0x10, 0x23, 0x95, 0x7e, 0xc8, 0xae, 0x52, 0x3c, 0xc8, 0x61, 0x73, 0xbe, 0x82, - 0xdd, 0xa4, 0x39, 0x09, 0x38, 0xe8, 0x4e, 0x16, 0xd1, 0x3b, 0x53, 0xf5, 0x45, 0xac, 0x0d, 0xda, - 0x63, 0xc1, 0xd3, 0x69, 0x7b, 0x6e, 0x99, 0x85, 0x2c, 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x6e, - 0xdd, 0xed, 0xef, 0xef, 0xdc, 0x6d, 0x65, 0xd9, 0xbb, 0xdd, 0xcc, 0xdc, 0xba, 0xdc, 0xf5, 0x07, - 0xb0, 0x42, 0x83, 0xea, 0xd5, 0xcf, 0x7e, 0xbf, 0x2e, 0x2b, 0x1f, 0xaf, 0xcb, 0xca, 0xdf, 0xd7, - 0x65, 0xe5, 0x97, 0x9b, 0x72, 0xe6, 0xe3, 0x4d, 0x39, 0xf3, 0xd7, 0x4d, 0x39, 0xf3, 0xd3, 0xbb, - 0x1e, 0x93, 0xfd, 0x91, 0x59, 0xb5, 0xf8, 0xb0, 0x16, 0x45, 0x72, 0x0c, 0x53, 0xbc, 0x65, 0x3c, - 0xfe, 0x5b, 0x9b, 0xa4, 0xbf, 0x18, 0xe5, 0x95, 0x47, 0x85, 0xb9, 0x8a, 0x9f, 0x8a, 0x5f, 0xfe, - 0x1b, 0x00, 0x00, 0xff, 0xff, 0x54, 0xdd, 0x92, 0x14, 0xd6, 0x0a, 0x00, 0x00, + // 1097 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0x16, 0x25, 0xd9, 0x89, 0x46, 0xb2, 0xe3, 0xac, 0xf3, 0x43, 0x24, 0xad, 0xe2, 0x2a, 0x3f, + 0x30, 0xd2, 0x58, 0xaa, 0xdd, 0xdc, 0x8a, 0x1e, 0x2c, 0x39, 0x86, 0x8c, 0xa6, 0xb6, 0x4a, 0xc9, + 0x2d, 0xd0, 0x0b, 0xc1, 0x9f, 0x15, 0xb5, 0x10, 0xc5, 0x25, 0xb8, 0x2b, 0x59, 0x7e, 0x89, 0xa2, + 0xcf, 0x54, 0xa0, 0x40, 0x8f, 0x41, 0x2f, 0xed, 0xb1, 0xb0, 0xdf, 0xa2, 0xa7, 0x82, 0x43, 0x52, + 0xa4, 0x65, 0xc9, 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 0x9a, 0x57, 0x56, 0x5c, 0xf3, 0xed, 0xdc, 0x8d, 0x45, 0xff, 0xc3, 0xad, + 0x45, 0xaf, 0xac, 0xba, 0xe8, 0xdb, 0xb9, 0x1b, 0xab, 0xbe, 0x79, 0x0f, 0xd6, 0x68, 0x98, 0xbd, + 0xe6, 0xe9, 0x1f, 0x57, 0x55, 0xe5, 0xd3, 0x55, 0x55, 0xf9, 0xe7, 0xaa, 0xaa, 0xfc, 0x7a, 0x5d, + 0xcd, 0x7d, 0xba, 0xae, 0xe6, 0xfe, 0xbe, 0xae, 0xe6, 0x7e, 0x7e, 0xef, 0x30, 0x39, 0x18, 0x9b, + 0x75, 0x8b, 0x8f, 0x1a, 0x71, 0x24, 0xd7, 0x30, 0xc5, 0x1e, 0xe3, 0xc9, 0xdf, 0xc6, 0x34, 0xfb, + 0x89, 0x29, 0x2f, 0x7d, 0x2a, 0xcc, 0x75, 0xfc, 0xb6, 0xfc, 0xfa, 0xbf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x5b, 0xda, 0xf4, 0xa1, 0x07, 0x0b, 0x00, 0x00, } func (m *ConsumerIBCPacket) Marshal() (dAtA []byte, err error) { @@ -1278,6 +1279,32 @@ func (m *BTCUndelegationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.DelegatorUnbondingInfo != nil { + { + size, err := m.DelegatorUnbondingInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPacket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.CovenantUnbondingSigList) > 0 { + for iNdEx := len(m.CovenantUnbondingSigList) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CovenantUnbondingSigList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPacket(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } if len(m.CovenantSlashingSigs) > 0 { for iNdEx := len(m.CovenantSlashingSigs) - 1; iNdEx >= 0; iNdEx-- { { @@ -1289,7 +1316,7 @@ func (m *BTCUndelegationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintPacket(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x22 } } if len(m.DelegatorSlashingSig) > 0 { @@ -1297,34 +1324,13 @@ func (m *BTCUndelegationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.DelegatorSlashingSig) i = encodeVarintPacket(dAtA, i, uint64(len(m.DelegatorSlashingSig))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x1a } if len(m.SlashingTx) > 0 { i -= len(m.SlashingTx) copy(dAtA[i:], m.SlashingTx) i = encodeVarintPacket(dAtA, i, uint64(len(m.SlashingTx))) i-- - dAtA[i] = 0x22 - } - if len(m.CovenantUnbondingSigList) > 0 { - for iNdEx := len(m.CovenantUnbondingSigList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CovenantUnbondingSigList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPacket(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.DelegatorUnbondingSig) > 0 { - i -= len(m.DelegatorUnbondingSig) - copy(dAtA[i:], m.DelegatorUnbondingSig) - i = encodeVarintPacket(dAtA, i, uint64(len(m.DelegatorUnbondingSig))) - i-- dAtA[i] = 0x12 } if len(m.UnbondingTx) > 0 { @@ -1728,16 +1734,6 @@ func (m *BTCUndelegationInfo) Size() (n int) { if l > 0 { n += 1 + l + sovPacket(uint64(l)) } - l = len(m.DelegatorUnbondingSig) - if l > 0 { - n += 1 + l + sovPacket(uint64(l)) - } - if len(m.CovenantUnbondingSigList) > 0 { - for _, e := range m.CovenantUnbondingSigList { - l = e.Size() - n += 1 + l + sovPacket(uint64(l)) - } - } l = len(m.SlashingTx) if l > 0 { n += 1 + l + sovPacket(uint64(l)) @@ -1752,6 +1748,16 @@ func (m *BTCUndelegationInfo) Size() (n int) { n += 1 + l + sovPacket(uint64(l)) } } + if len(m.CovenantUnbondingSigList) > 0 { + for _, e := range m.CovenantUnbondingSigList { + l = e.Size() + n += 1 + l + sovPacket(uint64(l)) + } + } + if m.DelegatorUnbondingInfo != nil { + l = m.DelegatorUnbondingInfo.Size() + n += 1 + l + sovPacket(uint64(l)) + } return n } @@ -2995,7 +3001,7 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorUnbondingSig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SlashingTx", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -3022,16 +3028,16 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorUnbondingSig = append(m.DelegatorUnbondingSig[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorUnbondingSig == nil { - m.DelegatorUnbondingSig = []byte{} + m.SlashingTx = append(m.SlashingTx[:0], dAtA[iNdEx:postIndex]...) + if m.SlashingTx == nil { + m.SlashingTx = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CovenantUnbondingSigList", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorSlashingSig", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPacket @@ -3041,31 +3047,31 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthPacket } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthPacket } if postIndex > l { return io.ErrUnexpectedEOF } - m.CovenantUnbondingSigList = append(m.CovenantUnbondingSigList, &SignatureInfo{}) - if err := m.CovenantUnbondingSigList[len(m.CovenantUnbondingSigList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.DelegatorSlashingSig = append(m.DelegatorSlashingSig[:0], dAtA[iNdEx:postIndex]...) + if m.DelegatorSlashingSig == nil { + m.DelegatorSlashingSig = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashingTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CovenantSlashingSigs", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPacket @@ -3075,31 +3081,31 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthPacket } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPacket } if postIndex > l { return io.ErrUnexpectedEOF } - m.SlashingTx = append(m.SlashingTx[:0], dAtA[iNdEx:postIndex]...) - if m.SlashingTx == nil { - m.SlashingTx = []byte{} + m.CovenantSlashingSigs = append(m.CovenantSlashingSigs, &CovenantAdaptorSignatures{}) + if err := m.CovenantSlashingSigs[len(m.CovenantSlashingSigs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorSlashingSig", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CovenantUnbondingSigList", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPacket @@ -3109,29 +3115,29 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthPacket } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthPacket } if postIndex > l { return io.ErrUnexpectedEOF } - m.DelegatorSlashingSig = append(m.DelegatorSlashingSig[:0], dAtA[iNdEx:postIndex]...) - if m.DelegatorSlashingSig == nil { - m.DelegatorSlashingSig = []byte{} + m.CovenantUnbondingSigList = append(m.CovenantUnbondingSigList, &SignatureInfo{}) + if err := m.CovenantUnbondingSigList[len(m.CovenantUnbondingSigList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CovenantSlashingSigs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DelegatorUnbondingInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3158,8 +3164,10 @@ func (m *BTCUndelegationInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CovenantSlashingSigs = append(m.CovenantSlashingSigs, &CovenantAdaptorSignatures{}) - if err := m.CovenantSlashingSigs[len(m.CovenantSlashingSigs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.DelegatorUnbondingInfo == nil { + m.DelegatorUnbondingInfo = &DelegatorUnbondingInfo{} + } + if err := m.DelegatorUnbondingInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex