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

Unify HistoryCommitmentRequest assertion metadata #697

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

PlasmaPower
Copy link
Collaborator

No description provided.

PlasmaPower and others added 2 commits October 25, 2024 13:28
This is not a 100% endorsement of these tests correctly testing the
correct implementation. It is more a snapshot at which they are
once again exercising the current implementation on the branch.
The problem with using the claimed assertion's `AfterState.Batch` is
that, in the case of assertions which overflow the maximum number of
blocks for an assertion, the `AfterState.Batch` will be lower than the
actual upper limit on batches. And, if a history commitment is
calculated based on that lower limit, it might not include all of the
blocks to which the assertion should commit.
collectMachineHashes := api.JsonCollectMachineHashes{
WasmModuleRoot: cfg.WasmModuleRoot,
FromBatch: 1 / zero,
FromBatch: cfg.FromState.Batch,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't we also need to add FromPosInBatch here? I don't really know where JsonCollectMachineHashes is used

@@ -441,7 +441,7 @@ func (p *HistoryCommitmentProvider) OneStepProofData(

// Compute the exact start point of where we need to execute
// the machine from the inputs, and figure out, in what increments, we need to do so.
machineIndex, err := p.computeMachineStartIndex(startHeights)
machineIndex, err := p.computeMachineStartIndex(startHeights, Height(assertionMetadata.FromState.PosInBatch))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not convinced this is right. Why is the PosInBatch relevant to the opcode index we need?

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.

2 participants