-
Notifications
You must be signed in to change notification settings - Fork 29
feat(rollup): sparse pub rand generation #583
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
feat(rollup): sparse pub rand generation #583
Conversation
SebastianElvis
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.
Agree with the approach in general 👍 great work
One nitpick is whether it's possible to further reduce the amount of code copied from default rand committer and finality signature submitter, but this can be improved in the future in a non breaking manner
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.
Pull Request Overview
This PR implements sparse public randomness generation for rollup finality providers to optimize efficiency. The key feature is that instead of generating randomness for every block height, the system now generates randomness only for heights where the finality provider will actually vote (based on the finality signature interval).
- Adds support for interval-based randomness generation across the entire stack
- Implements rollup-specific committers and submitters that use sparse generation
- Updates contract message formats to include interval information
Reviewed Changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| finality-provider/store/pub_rand.go | Adds interval-aware key building and storage methods for sparse randomness |
| finality-provider/service/rollup_rand_committer.go | New randomness committer implementation with sparse generation logic |
| finality-provider/service/rollup_finality_submitter.go | New finality submitter that uses sparse randomness retrieval |
| finality-provider/service/pub_rand_store_adapter.go | Adapter layer for interval-aware storage operations |
| finality-provider/service/fp_instance.go | Minor import reordering |
| eotsmanager/localmanager.go | Implements sparse randomness generation in local EOTS manager |
| eotsmanager/eotsmanager.go | Interface definition for sparse randomness generation |
| eotsmanager/client/rpcclient.go | RPC client implementation for sparse randomness calls |
| bsn/rollup/service/app.go | Updates rollup app to use new sparse committers/submitters |
| bsn/rollup/e2e/rollup_test_manager.go | Updates E2E tests to use sparse implementations |
| bsn/rollup/clientcontroller/msg.go | Updates contract message format with interval support |
| bsn/rollup/clientcontroller/consumer.go | Updates contract interaction methods |
| CHANGELOG.md | Documents the new feature |
Comments suppressed due to low confidence (1)
finality-provider/service/rollup_rand_committer.go:86
- [nitpick] The comment contains a formatting inconsistency with asterisks around 'voting' which is not standard documentation format.
// Sufficient voting randomness, no need to commit
Lazar955
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.
Looks good nice work
KonradStaniec
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.
Nothing critcitical though this whole logic needs much more testing as there is a lot of calculations on intervals which are sprinkled in different places
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
🚨 Bugbot Trial ExpiredYour Bugbot trial has expired. Please purchase a license in the Cursor dashboard to continue using Bugbot. |
🚨 Bugbot Trial ExpiredYour Bugbot trial has expired. Please purchase a license in the Cursor dashboard to continue using Bugbot. |
Bugbot found 1 bugTo see it, activate your membership in the Cursor dashboard. |
also review
contract side impl - babylonlabs-io/rollup-bsn-contracts#110