Skip to content

Conversation

@gballet
Copy link
Owner

@gballet gballet commented Nov 7, 2024

This is a rewrite of #517. It generates the proof against the prestate, before the post state is inserted. This avoids reloading the prestate from disk.

TLDR: Break the proving into two parts:

  1. the Proof part where the proof is build, which is called before IntermediateRoot
  2. the "post state" part, which is created after the intermediate root has been computed.

In the case of the execusion spec test, the pre tree is saved before execution, so there is no need to move things around, just use the new API.

Copy link
Collaborator

@jsign jsign left a comment

Choose a reason for hiding this comment

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

Makes sense, but note the CI is failing.

@jsign jsign requested a review from Copilot December 11, 2024 16:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (2)

cmd/evm/internal/t8ntool/execution.go:374

  • [nitpick] The function name 'Proof' is not very descriptive. Consider renaming it to 'GenerateProof'.
proof, err := trie.Proof(vtrpre, proofTrie, keys, vtrpre.FlatdbNodeResolver)

cmd/evm/internal/t8ntool/execution.go:378

  • [nitpick] The error message 'error adding post values to proof' could be more descriptive. Consider including more context about what went wrong.
err = trie.AddPostValuesToProof(keys, proofTrie, proof)

@gballet gballet force-pushed the proof-building-before-root-computation branch from b7c13cd to b408f09 Compare January 7, 2025 07:39
@gballet gballet force-pushed the proof-building-before-root-computation branch from 9dbe4d4 to fbb80c4 Compare January 8, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants