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

chore(ADR-024): Rebase to main #48

Closed
wants to merge 7 commits into from

Conversation

gitferry
Copy link
Member

@gitferry gitferry commented Sep 2, 2024

No description provided.

SebastianElvis and others added 7 commits August 28, 2024 08:26
Subsumes #22 

---

Fixes babylonlabs-io/pm#12

This PR replaces the chain ID with the client ID for consumers in the
BTC timestamping protocol. This is in line with [the IBC security
model](https://tutorials.cosmos.network/academy/3-ibc/1-what-is-ibc.html)
where each IBC light client corresponds to a chain, and with the BTC
staking integration implementation.

The PR includes:

- renaming all chain ID to consumer ID, same as BTC staking integration
does
- using client ID to identify {epoch, finalised} chain info
- changing all queries, fuzz tests, e2e tests, and doc accordingly

TODO before merging the PR:

- [x] wait until @gitferry verifies we can do software upgrade with
empty DB and updated DB schema

Plan after the PR:

- Fixing compatiblity with BE/FE (need arch decisions here)
Add codeowners files to the repository
- Load signed `MsgCreateFinalityProvider` from json string
- Add finality providers in upgrade
- Check finality providers in e2e upgrade signet 

Same as #28
…ed pub rand (#23)

This closes the second part of #8. In particular, this PR:
* Implemented `HasTimestampedPubRand` in the finality keeper to check
whether a pub rand at a given height is BTC-timestamped
* Added expected finality keeper to btcstaking keeper so that
`HasTimestampedPubRand` can be called within the module
* When signing voting power to fps in `btcstaking`'s begin blocker, if
the fp does not have timestamped pub rand, voting power will not be
assigned

Note that this PR introduced circular dependency between the btc staking
module and finality module, which should be addressed by moving the
voting power table to the finality module, tracked by issue #24
This PR fixed some issues in assigning the voting power, in particular
* even if no new delegations are included, we should also update the
cache about the timestamping status
* fixed return value of `HasTimestampedPubRand`
* e2e tests are fixed
* added table-driven tests for the voting table
@gitferry gitferry requested a review from a team as a code owner September 2, 2024 14:30
@gitferry gitferry closed this Sep 2, 2024
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.

4 participants