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

zoneconcierge: replace chain ID with client ID for consumers #22

Closed
wants to merge 4 commits into from

Conversation

SebastianElvis
Copy link
Member

@SebastianElvis SebastianElvis commented Aug 19, 2024

Fixes https://github.com/babylonlabs-io/pm/issues/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 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:

  • 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)

@SebastianElvis SebastianElvis changed the title replace chain ID with client ID for consumers zoneconcierge: replace chain ID with client ID for consumers Aug 19, 2024
@SebastianElvis SebastianElvis marked this pull request as ready for review August 19, 2024 07:39
@KonradStaniec KonradStaniec added consensus breaking change modifies `appHash` of the application api breaking breaks grpc api in non-compatible way labels Aug 19, 2024
Copy link
Collaborator

@KonradStaniec KonradStaniec left a comment

Choose a reason for hiding this comment

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

looks good!

@SebastianElvis
Copy link
Member Author

Putting this PR on hold for now. Another way of resolving this issue is to enforce each chain ID to only have 1 IBC client in record. This is followed by ICS. Will need to investigate further and provide a concrete design

Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

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

Great work!

@KonradStaniec KonradStaniec deleted the branch dev August 27, 2024 05:30
SebastianElvis added a commit that referenced this pull request Aug 27, 2024
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)
@SebastianElvis SebastianElvis deleted the fix-zoneconcierge-clientid branch August 27, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api breaking breaks grpc api in non-compatible way consensus breaking change modifies `appHash` of the application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants