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

Include the epoch index in the CompactBlock as well as the block height. #2689

Closed
hdevalence opened this issue Jun 8, 2023 · 2 comments · Fixed by #4100
Closed

Include the epoch index in the CompactBlock as well as the block height. #2689

hdevalence opened this issue Jun 8, 2023 · 2 comments · Fixed by #4100
Assignees
Labels
consensus-breaking breaking change to execution of on-chain data _P-low Priority: low _P-V1 Priority: slated for V1 release
Milestone

Comments

@hdevalence
Copy link
Member

Is your feature request related to a problem? Please describe.

Computing a nullifier for a state fragment requires knowing the position of the fragment. Client implementations need to compute nullifiers of state fragments as they're detected, since nullifiers are used to detect when those state fragments are consumed.

However, our current compact block definition doesn't allow computing the position of the fragments it contains without access to other state (namely, a synchronized SCT instance). Why? The position has three components: (commitment index, block index, epoch index). The commitment index is implicitly specified by the order of the fragment within the message. The block index is just the height. But the epoch index is not included in the compact block, so a client can only get it by cross-referencing with their SCT instance.

If we include the epoch index in the CompactBlock, however, we can statelessly compute positions of any fragment contained in the compact block.

Describe the solution you'd like

Add the epoch index to the compact block with a low (sub-15) field number (to save space, since it will always be present).

@hdevalence
Copy link
Member Author

This would have been good to not lose track of and include in the Testnet 65 changes. Oops!

We should still consider doing this, though.

@hdevalence hdevalence added _P-V1 Priority: slated for V1 release _P-low Priority: low labels Feb 8, 2024
@conorsch conorsch added the consensus-breaking breaking change to execution of on-chain data label Mar 25, 2024
@aubrika aubrika self-assigned this Mar 25, 2024
@conorsch
Copy link
Contributor

This is consensus-breaking, so labeled as such. We're planning to release this week, as soon as tomorrow (#4087). If it lands before then, great.

@aubrika aubrika modified the milestones: Sprint 2, Sprint 3 Mar 25, 2024
@conorsch conorsch modified the milestones: Sprint 3, v1 Mar 25, 2024
@aubrika aubrika modified the milestones: v1, Sprint 3 Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus-breaking breaking change to execution of on-chain data _P-low Priority: low _P-V1 Priority: slated for V1 release
Projects
Archived in project
Status: Future
Development

Successfully merging a pull request may close this issue.

3 participants