-
Notifications
You must be signed in to change notification settings - Fork 12
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
backport: Insert inclusion height to early unbonding event #230
backport: Insert inclusion height to early unbonding event #230
Conversation
Closes #225. * added unbonding start height to early unbonding event * changed that early unbonding event is emitted as a tx event
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.
@gitferry could we get this released on current devnet?
@@ -215,8 +215,10 @@ message EventBTCDelgationUnbondedEarly { | |||
// 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]; | |||
// start_height is the start BTC height of the early unbonding | |||
string start_height = 2 [(amino.dont_omitempty) = true]; |
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.
Why is this not a uint32 or uint64? Just curious.
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.
This is for easier parsing for subscribers of the event
if !btcDel.IsUnbondedEarly() { | ||
types.EmitExpiredDelegationEvent(sdkCtx, delEvent.StakingTxHash) | ||
} |
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.
What if it's an early unbond? No event emitted?
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.
It is now emitted during processing undelegate message https://github.com/babylonlabs-io/babylon/pull/228/files#diff-0490899e13cee0223ce9b01147d9ad2753112c4e8118443e1b54684738fc4969R585. The reason we changed the emitting there is because we don't want to save the inclusion height in db considering re-org could happen on Bitcoin. Discussions
No description provided.