-
Notifications
You must be signed in to change notification settings - Fork 29
feat: Add recover proof cmd #351
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
Conversation
a042bdb to
3afd617
Compare
3afd617 to
fc04528
Compare
51e1cc7 to
7fa6d31
Compare
| fpBtcPk := bbntypes.NewBIP340PubKeyFromBTCPK(fpPk) | ||
|
|
||
| pagination := &sdkquery.PageRequest{ | ||
| Limit: 1, |
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 limit 1?
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.
We can remove the limit but I thought with 1 it's cleaner as we don't need to iterator the commit map and sort them by the start height
itest/babylon/babylon_e2e_test.go
Outdated
| //go:build e2e_babylon | ||
| // +build e2e_babylon | ||
| //go:build e2e_op | ||
| // +build e2e_op |
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.
if we change the build tag here, it should modify in the Makefile as well
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.
Nice find! This is actually a mistake
|
|
||
| Every finality vote must contain the public randomness proof to prove that the | ||
| randomness used in the signature is already committed on Babylon. Loss of | ||
| public randomness proof leads to direct failure of the vote submission. |
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.
We should add here at some point that the fpd must be stoped to run this command, otherwise it keeps the db locked
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.
Good point!
| status and the public randomness merkle proof. Either information loss | ||
| compromised will lead to service halt, but they are recoverable. | ||
|
|
||
| #### 7.3.1 Recover local status of a finality provider |
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.
If there is a loss in the db, the steps are
- Stop the fpd
- recover
fpd recover-rand-proof - Start fpd
- Create finality provider
fpd create-finality-provider - Stop the fpd
- Start the fpd
Is this expected?
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.
I think if the db file is lost, fpd cannot be started due to missing the fp object. So I think the first step should be start fpd and run fpd create-finality-provider. Then stop fpd and run fpd recover-rand-proof. Finaly, restart the fpd
RafilxTenfen
left a comment
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.
a few comments, but good job
it worked like a charm
6dcab3f to
ca80279
Compare
ca80279 to
4ae8abf
Compare
Closes #293. In particular, this PR: - added a new cmd `recover-rand-proof --start-height` which checks the randomness commit on Babylon, re-generate randomness proof, and stores it in db. - to check the randomness commit on babylon, a new query `QueryPublicRandCommitList` is added to babylon consumer client - Note that this cmd currently only works for babylon consumer chain - updated operational doc
Closes #293. In particular, this PR: - added a new cmd `recover-rand-proof --start-height` which checks the randomness commit on Babylon, re-generate randomness proof, and stores it in db. - to check the randomness commit on babylon, a new query `QueryPublicRandCommitList` is added to babylon consumer client - Note that this cmd currently only works for babylon consumer chain - updated operational doc
Closes #293. In particular, this PR:
recover-rand-proof --start-heightwhich checks the randomness commit on Babylon, re-generate randomness proof, and stores it in db.QueryPublicRandCommitListis added to babylon consumer client