From c7eddc9671d9def4a07e13a25bb09a904ff90a9d Mon Sep 17 00:00:00 2001 From: KonradStaniec Date: Wed, 30 Oct 2024 13:35:57 +0100 Subject: [PATCH] Add more info to staking creation event (#238) Fixes: https://github.com/babylonlabs-io/babylon/issues/237 - Adding `PkScript` makes is possible to listen to confirmation event using lnd libraries (and therefore btc lightclients) - Addinng `StakingOutputIndex` makes it possible to identify staking output as utxo i.e tuple (hash, idx) --- CHANGELOG.md | 5 + proto/babylon/btcstaking/v1/events.proto | 20 +- x/btcstaking/types/btc_delegation.go | 10 + x/btcstaking/types/events.go | 2 + x/btcstaking/types/events.pb.go | 307 +++++++++++++++-------- 5 files changed, 236 insertions(+), 108 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cbf80d56..c2bcd70c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * [#235](https://github.com/babylonlabs-io/babylon/pull/235) Change default values for iavl cache when using `testnet` command +### API Breaking + +* [238](https://github.com/babylonlabs-io/babylon/pull/238) Add additional data +to delegation creation event + ## v0.14.1 ### API Breaking diff --git a/proto/babylon/btcstaking/v1/events.proto b/proto/babylon/btcstaking/v1/events.proto index 3815c6a6a..1c7634681 100644 --- a/proto/babylon/btcstaking/v1/events.proto +++ b/proto/babylon/btcstaking/v1/events.proto @@ -147,26 +147,30 @@ message EventBTCDelegationCreated { // staking_tx_hash is the hash of the staking tx. // It uniquely identifies a BTC delegation string staking_tx_hash = 1 [(amino.dont_omitempty) = true]; + // staking_output_pk_script is the hex encoded PK script of the staking output + string staking_output_pk_script = 2 [(amino.dont_omitempty) = true]; + // staking_output_index is the index of the staking output in the staking tx + string staking_output_index = 3 [(amino.dont_omitempty) = true]; // version of the params used to validate the delegation - string params_version = 2 [(amino.dont_omitempty) = true]; + string params_version = 4 [(amino.dont_omitempty) = true]; // finality_provider_btc_pks_hex is the list of hex str of Bitcoin secp256k1 PK of // the finality providers that this BTC delegation delegates to // the PK follows encoding in BIP-340 spec - repeated string finality_provider_btc_pks_hex = 3 [(amino.dont_omitempty) = true]; + repeated string finality_provider_btc_pks_hex = 5 [(amino.dont_omitempty) = true]; // staker_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the staker that // creates this BTC delegation the PK follows encoding in BIP-340 spec - string staker_btc_pk_hex = 4 [(amino.dont_omitempty) = true]; + string staker_btc_pk_hex = 6 [(amino.dont_omitempty) = true]; // staking_time is the timelock of the staking tx specified in the BTC script - string staking_time = 5 [(amino.dont_omitempty) = true]; + string staking_time = 7 [(amino.dont_omitempty) = true]; // staking_amount is the total amount of BTC stake in this delegation // quantified in satoshi - string staking_amount = 6 [(amino.dont_omitempty) = true]; + string staking_amount = 8 [(amino.dont_omitempty) = true]; // unbonding_time is the time is timelock on unbonding tx chosen by the staker - string unbonding_time = 7 [(amino.dont_omitempty) = true]; + string unbonding_time = 9 [(amino.dont_omitempty) = true]; // unbonding_tx is hex encoded bytes of the unsigned unbonding tx - string unbonding_tx = 8 [(amino.dont_omitempty) = true]; + string unbonding_tx = 10 [(amino.dont_omitempty) = true]; // new_state of the BTC delegation - string new_state = 9 [(amino.dont_omitempty) = true]; + string new_state = 11 [(amino.dont_omitempty) = true]; } // EventCovenantSignatureReceived is the event emitted when a covenant committee diff --git a/x/btcstaking/types/btc_delegation.go b/x/btcstaking/types/btc_delegation.go index 6986ade86..e9a877a26 100644 --- a/x/btcstaking/types/btc_delegation.go +++ b/x/btcstaking/types/btc_delegation.go @@ -162,6 +162,16 @@ func (d *BTCDelegation) MustGetStakingTxHash() chainhash.Hash { return txHash } +func (d *BTCDelegation) MustGetStakingTx() *wire.MsgTx { + stakingTx, err := bbn.NewBTCTxFromBytes(d.StakingTx) + + if err != nil { + panic(err) + } + + return stakingTx +} + func (d *BTCDelegation) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(d.StakerAddr); err != nil { return fmt.Errorf("invalid staker address: %s - %w", d.StakerAddr, err) diff --git a/x/btcstaking/types/events.go b/x/btcstaking/types/events.go index 268fe2d45..837442fdd 100644 --- a/x/btcstaking/types/events.go +++ b/x/btcstaking/types/events.go @@ -93,6 +93,8 @@ func NewBtcDelCreationEvent( ) *EventBTCDelegationCreated { return &EventBTCDelegationCreated{ StakingTxHash: stakingTxHash, + StakingOutputPkScript: hex.EncodeToString(btcDel.MustGetStakingTx().TxOut[btcDel.StakingOutputIdx].PkScript), + StakingOutputIndex: strconv.FormatUint(uint64(btcDel.StakingOutputIdx), 10), ParamsVersion: strconv.FormatUint(uint64(btcDel.ParamsVersion), 10), FinalityProviderBtcPksHex: btcDel.FinalityProviderKeys(), StakerBtcPkHex: btcDel.BtcPk.MarshalHex(), diff --git a/x/btcstaking/types/events.pb.go b/x/btcstaking/types/events.pb.go index 9f371dfba..5d393d9e9 100644 --- a/x/btcstaking/types/events.pb.go +++ b/x/btcstaking/types/events.pb.go @@ -704,26 +704,30 @@ type EventBTCDelegationCreated struct { // staking_tx_hash is the hash of the staking tx. // It uniquely identifies a BTC delegation StakingTxHash string `protobuf:"bytes,1,opt,name=staking_tx_hash,json=stakingTxHash,proto3" json:"staking_tx_hash,omitempty"` + // staking_output_pk_script is the hex encoded PK script of the staking output + StakingOutputPkScript string `protobuf:"bytes,2,opt,name=staking_output_pk_script,json=stakingOutputPkScript,proto3" json:"staking_output_pk_script,omitempty"` + // staking_output_index is the index of the staking output in the staking tx + StakingOutputIndex string `protobuf:"bytes,3,opt,name=staking_output_index,json=stakingOutputIndex,proto3" json:"staking_output_index,omitempty"` // version of the params used to validate the delegation - ParamsVersion string `protobuf:"bytes,2,opt,name=params_version,json=paramsVersion,proto3" json:"params_version,omitempty"` + ParamsVersion string `protobuf:"bytes,4,opt,name=params_version,json=paramsVersion,proto3" json:"params_version,omitempty"` // finality_provider_btc_pks_hex is the list of hex str of Bitcoin secp256k1 PK of // the finality providers that this BTC delegation delegates to // the PK follows encoding in BIP-340 spec - FinalityProviderBtcPksHex []string `protobuf:"bytes,3,rep,name=finality_provider_btc_pks_hex,json=finalityProviderBtcPksHex,proto3" json:"finality_provider_btc_pks_hex,omitempty"` + FinalityProviderBtcPksHex []string `protobuf:"bytes,5,rep,name=finality_provider_btc_pks_hex,json=finalityProviderBtcPksHex,proto3" json:"finality_provider_btc_pks_hex,omitempty"` // staker_btc_pk_hex is the hex str of Bitcoin secp256k1 PK of the staker that // creates this BTC delegation the PK follows encoding in BIP-340 spec - StakerBtcPkHex string `protobuf:"bytes,4,opt,name=staker_btc_pk_hex,json=stakerBtcPkHex,proto3" json:"staker_btc_pk_hex,omitempty"` + StakerBtcPkHex string `protobuf:"bytes,6,opt,name=staker_btc_pk_hex,json=stakerBtcPkHex,proto3" json:"staker_btc_pk_hex,omitempty"` // staking_time is the timelock of the staking tx specified in the BTC script - StakingTime string `protobuf:"bytes,5,opt,name=staking_time,json=stakingTime,proto3" json:"staking_time,omitempty"` + StakingTime string `protobuf:"bytes,7,opt,name=staking_time,json=stakingTime,proto3" json:"staking_time,omitempty"` // staking_amount is the total amount of BTC stake in this delegation // quantified in satoshi - StakingAmount string `protobuf:"bytes,6,opt,name=staking_amount,json=stakingAmount,proto3" json:"staking_amount,omitempty"` + StakingAmount string `protobuf:"bytes,8,opt,name=staking_amount,json=stakingAmount,proto3" json:"staking_amount,omitempty"` // unbonding_time is the time is timelock on unbonding tx chosen by the staker - UnbondingTime string `protobuf:"bytes,7,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` + UnbondingTime string `protobuf:"bytes,9,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` // unbonding_tx is hex encoded bytes of the unsigned unbonding tx - UnbondingTx string `protobuf:"bytes,8,opt,name=unbonding_tx,json=unbondingTx,proto3" json:"unbonding_tx,omitempty"` + UnbondingTx string `protobuf:"bytes,10,opt,name=unbonding_tx,json=unbondingTx,proto3" json:"unbonding_tx,omitempty"` // new_state of the BTC delegation - NewState string `protobuf:"bytes,9,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"` + NewState string `protobuf:"bytes,11,opt,name=new_state,json=newState,proto3" json:"new_state,omitempty"` } func (m *EventBTCDelegationCreated) Reset() { *m = EventBTCDelegationCreated{} } @@ -766,6 +770,20 @@ func (m *EventBTCDelegationCreated) GetStakingTxHash() string { return "" } +func (m *EventBTCDelegationCreated) GetStakingOutputPkScript() string { + if m != nil { + return m.StakingOutputPkScript + } + return "" +} + +func (m *EventBTCDelegationCreated) GetStakingOutputIndex() string { + if m != nil { + return m.StakingOutputIndex + } + return "" +} + func (m *EventBTCDelegationCreated) GetParamsVersion() string { if m != nil { return m.ParamsVersion @@ -1249,85 +1267,88 @@ func init() { } var fileDescriptor_74118427820fff75 = []byte{ - // 1241 bytes of a gzipped FileDescriptorProto + // 1290 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcb, 0x6f, 0xdb, 0xc6, - 0x13, 0x36, 0x25, 0x3f, 0xd7, 0x79, 0x38, 0xfc, 0xe5, 0x17, 0xc8, 0x6a, 0xa2, 0x38, 0xca, 0x03, - 0x6e, 0xd0, 0x48, 0x79, 0xf8, 0xd0, 0xab, 0x64, 0xcb, 0x91, 0x52, 0xc3, 0x55, 0x29, 0x3b, 0x40, - 0x7b, 0x21, 0x96, 0xe4, 0x58, 0xda, 0x8a, 0xda, 0x25, 0xc8, 0xa5, 0x2c, 0xdd, 0x0b, 0xf4, 0x9a, - 0x73, 0x81, 0xde, 0x7b, 0x6b, 0xff, 0x8b, 0xf6, 0x52, 0x20, 0x97, 0x02, 0x45, 0x0f, 0x45, 0x11, - 0x1f, 0xfa, 0x5f, 0x14, 0x05, 0x77, 0x97, 0x94, 0x68, 0x53, 0x89, 0x5d, 0x24, 0x17, 0xc3, 0xdc, - 0xf9, 0x66, 0xbe, 0x99, 0x6f, 0x76, 0x66, 0x21, 0x54, 0xb6, 0xb0, 0x35, 0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xcb, 0x10, 0x75, 0x87, 0xda, 0x20, - 0x72, 0x58, 0x7d, 0xfa, 0x78, 0x06, 0xc3, 0x19, 0xdf, 0x86, 0xf2, 0x33, 0x92, 0x08, 0xe5, 0x6f, - 0x16, 0xd1, 0x75, 0x41, 0xd4, 0x66, 0xc7, 0xe0, 0xef, 0x90, 0x80, 0xab, 0x8a, 0x09, 0x42, 0x41, - 0xe4, 0x06, 0x8e, 0x79, 0xe4, 0x29, 0xa2, 0xe6, 0x0c, 0xa2, 0xac, 0x00, 0xf2, 0xb0, 0x23, 0x43, - 0x9c, 0xbe, 0x58, 0xcd, 0x39, 0x63, 0x45, 0x45, 0xdf, 0xf5, 0xf4, 0x23, 0xb4, 0xf2, 0x35, 0x26, - 0xae, 0x64, 0xca, 0x09, 0xa6, 0xe7, 0x17, 0x66, 0x7a, 0x21, 0x22, 0x64, 0x10, 0x2d, 0xcb, 0xd8, - 0xbb, 0x9e, 0xee, 0xa2, 0xd5, 0x90, 0x4e, 0x98, 0xf2, 0x82, 0xa9, 0x75, 0x61, 0xa6, 0x43, 0x15, - 0x23, 0x83, 0x0b, 0xc5, 0xf1, 0x77, 0x3d, 0xbd, 0x8b, 0xae, 0x47, 0x53, 0xe3, 0x80, 0x2b, 0xaf, - 0x83, 0x19, 0x8a, 0x18, 0xe2, 0x6e, 0xaf, 0x3e, 0xdd, 0x7a, 0x1b, 0xed, 0xac, 0x6b, 0xd8, 0x9c, - 0x33, 0xae, 0x59, 0xdc, 0xde, 0x01, 0x77, 0xea, 0xb0, 0xd8, 0x53, 0xab, 0x6d, 0x86, 0xd6, 0x7a, - 0x13, 0xe5, 0xbc, 0xbe, 0xe8, 0xe0, 0xa5, 0xfa, 0xa7, 0x7f, 0xfc, 0x79, 0x7b, 0xab, 0x4b, 0x78, - 0x2f, 0xb4, 0x2a, 0x36, 0x1b, 0x54, 0x55, 0x12, 0x2e, 0xb6, 0x82, 0x47, 0x84, 0xc5, 0x9f, 0x55, - 0x3e, 0xf6, 0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0x24, 0x3f, 0xf7, 0xfb, 0x49, 0x7e, 0xee, 0xab, 0x33, 0x2c, 0xfa, + 0xc1, 0xe4, 0x4f, 0x47, 0xb9, 0xf5, 0x8d, 0x45, 0xf9, 0x2b, 0xf0, 0xe9, 0xbf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x85, 0xad, 0xdc, 0x00, 0xd4, 0x0e, 0x00, 0x00, } func (m *EventFinalityProviderCreated) Marshal() (dAtA []byte, err error) { @@ -1834,42 +1855,42 @@ func (m *EventBTCDelegationCreated) MarshalToSizedBuffer(dAtA []byte) (int, erro copy(dAtA[i:], m.NewState) i = encodeVarintEvents(dAtA, i, uint64(len(m.NewState))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x5a } if len(m.UnbondingTx) > 0 { i -= len(m.UnbondingTx) copy(dAtA[i:], m.UnbondingTx) i = encodeVarintEvents(dAtA, i, uint64(len(m.UnbondingTx))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x52 } if len(m.UnbondingTime) > 0 { i -= len(m.UnbondingTime) copy(dAtA[i:], m.UnbondingTime) i = encodeVarintEvents(dAtA, i, uint64(len(m.UnbondingTime))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x4a } if len(m.StakingAmount) > 0 { i -= len(m.StakingAmount) copy(dAtA[i:], m.StakingAmount) i = encodeVarintEvents(dAtA, i, uint64(len(m.StakingAmount))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x42 } if len(m.StakingTime) > 0 { i -= len(m.StakingTime) copy(dAtA[i:], m.StakingTime) i = encodeVarintEvents(dAtA, i, uint64(len(m.StakingTime))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x3a } if len(m.StakerBtcPkHex) > 0 { i -= len(m.StakerBtcPkHex) copy(dAtA[i:], m.StakerBtcPkHex) i = encodeVarintEvents(dAtA, i, uint64(len(m.StakerBtcPkHex))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x32 } if len(m.FinalityProviderBtcPksHex) > 0 { for iNdEx := len(m.FinalityProviderBtcPksHex) - 1; iNdEx >= 0; iNdEx-- { @@ -1877,7 +1898,7 @@ func (m *EventBTCDelegationCreated) MarshalToSizedBuffer(dAtA []byte) (int, erro copy(dAtA[i:], m.FinalityProviderBtcPksHex[iNdEx]) i = encodeVarintEvents(dAtA, i, uint64(len(m.FinalityProviderBtcPksHex[iNdEx]))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x2a } } if len(m.ParamsVersion) > 0 { @@ -1885,6 +1906,20 @@ func (m *EventBTCDelegationCreated) MarshalToSizedBuffer(dAtA []byte) (int, erro copy(dAtA[i:], m.ParamsVersion) i = encodeVarintEvents(dAtA, i, uint64(len(m.ParamsVersion))) i-- + dAtA[i] = 0x22 + } + if len(m.StakingOutputIndex) > 0 { + i -= len(m.StakingOutputIndex) + copy(dAtA[i:], m.StakingOutputIndex) + i = encodeVarintEvents(dAtA, i, uint64(len(m.StakingOutputIndex))) + i-- + dAtA[i] = 0x1a + } + if len(m.StakingOutputPkScript) > 0 { + i -= len(m.StakingOutputPkScript) + copy(dAtA[i:], m.StakingOutputPkScript) + i = encodeVarintEvents(dAtA, i, uint64(len(m.StakingOutputPkScript))) + i-- dAtA[i] = 0x12 } if len(m.StakingTxHash) > 0 { @@ -2403,6 +2438,14 @@ func (m *EventBTCDelegationCreated) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } + l = len(m.StakingOutputPkScript) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.StakingOutputIndex) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } l = len(m.ParamsVersion) if l > 0 { n += 1 + l + sovEvents(uint64(l)) @@ -3959,6 +4002,70 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { m.StakingTxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakingOutputPkScript", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StakingOutputPkScript = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakingOutputIndex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StakingOutputIndex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ParamsVersion", wireType) } @@ -3990,7 +4097,7 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { } m.ParamsVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FinalityProviderBtcPksHex", wireType) } @@ -4022,7 +4129,7 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { } m.FinalityProviderBtcPksHex = append(m.FinalityProviderBtcPksHex, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StakerBtcPkHex", wireType) } @@ -4054,7 +4161,7 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { } m.StakerBtcPkHex = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StakingTime", wireType) } @@ -4086,7 +4193,7 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { } m.StakingTime = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field StakingAmount", wireType) } @@ -4118,7 +4225,7 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { } m.StakingAmount = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) } @@ -4150,7 +4257,7 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { } m.UnbondingTime = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTx", wireType) } @@ -4182,7 +4289,7 @@ func (m *EventBTCDelegationCreated) Unmarshal(dAtA []byte) error { } m.UnbondingTx = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field NewState", wireType) }