Skip to content
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

R/index btc height #64

Merged
merged 2 commits into from
Sep 17, 2024
Merged

R/index btc height #64

merged 2 commits into from
Sep 17, 2024

Conversation

maurolacy
Copy link
Collaborator

@maurolacy maurolacy commented Sep 16, 2024

A small refactor that removes BTC height indexing, as the BTC height is only used during slashing, and there's no need to store it in the mean time.

Part of #11, having separate btc-staking and (a new) babylon-finality contracts.

Comment on lines -222 to -224
// Index BTC height at the current height
index_btc_height(deps, env.block.height)?;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems necessary for determining whether BTC delegations are expired due to timelock?

Copy link
Collaborator Author

@maurolacy maurolacy Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. But (if I'm not mistaken) we're currently getting that info from Babylon. So, it's not needed at this point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we decided to let Babylon side or consumer side to determine expiration of BTC delegations? I remember we are trying to figure out an algorithm that is executed by consumer side

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. I think there's an issue for making Babylon forward those undelegations to the Consumers. Let me check.

Copy link
Collaborator Author

@maurolacy maurolacy Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find the issue, but remember that we discussed this at some point. @gusin13?

Copy link
Collaborator Author

@maurolacy maurolacy Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about creating an issue to re-introduce this indexing at some point when it's needed?

Update: #66.

@maurolacy maurolacy merged commit 74c5c0b into main Sep 17, 2024
1 check passed
@maurolacy maurolacy deleted the r/index-btc-height branch September 17, 2024 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants