这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@gitferry
Copy link
Member

@gitferry gitferry commented Feb 18, 2025

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

@gitferry gitferry force-pushed the gai/recover-rand-proof branch from a042bdb to 3afd617 Compare February 19, 2025 07:53
@gitferry gitferry force-pushed the gai/recover-rand-proof branch from 3afd617 to fc04528 Compare February 19, 2025 08:12
@gitferry gitferry force-pushed the gai/recover-rand-proof branch from 51e1cc7 to 7fa6d31 Compare February 19, 2025 11:45
@gitferry gitferry marked this pull request as ready for review February 19, 2025 12:01
fpBtcPk := bbntypes.NewBIP340PubKeyFromBTCPK(fpPk)

pagination := &sdkquery.PageRequest{
Limit: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

why limit 1?

Copy link
Member Author

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

//go:build e2e_babylon
// +build e2e_babylon
//go:build e2e_op
// +build e2e_op
Copy link
Contributor

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

Copy link
Member Author

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.
Copy link
Contributor

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

Copy link
Member Author

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
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

@RafilxTenfen RafilxTenfen left a 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

@gitferry gitferry force-pushed the gai/recover-rand-proof branch from 6dcab3f to ca80279 Compare February 21, 2025 07:49
@gitferry gitferry force-pushed the gai/recover-rand-proof branch from ca80279 to 4ae8abf Compare February 21, 2025 08:04
@gitferry gitferry merged commit aae4976 into main Feb 21, 2025
18 checks passed
@gitferry gitferry deleted the gai/recover-rand-proof branch February 21, 2025 08:36
gitferry added a commit that referenced this pull request Feb 21, 2025
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
gitferry added a commit that referenced this pull request Feb 21, 2025
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
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.

Add randomness proof recover support

3 participants