-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: BTCDelgationResponse
missing staking_time
#197
Conversation
BTCDelgationResponse
missing staking_time
This will need a new release at btc-staker, because it broke the proto for query |
Yep, this will go to the next devnet release as backporting to v0.12.x causes a lot of conflicts due to block height type change |
@@ -251,40 +251,42 @@ message BTCDelegationResponse { | |||
// fp_btc_pk_list is the list of BIP-340 PKs of the finality providers that | |||
// this BTC delegation delegates to | |||
repeated bytes fp_btc_pk_list = 3 [ (gogoproto.customtype) = "github.com/babylonlabs-io/babylon/types.BIP340PubKey" ]; | |||
// staking_time is the number of blocks for which the delegation is locked on BTC chain | |||
uint32 staking_time = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: To try to be more backwards compatible, you can use a new label here, i.e.:
uint32 staking_time = 17;
That way the older versions will be able to handle all the other fields.
In pre-approval flow, the delegation has zero value for both
startHeight
andendHeight
. Therefore, the staking time should not be inferred fromendHeight - startHeight
. Instead, it should be stored seprately. This PR addsstakingTime
toBTCDelegationResponse