Skip to content

Stateless: Witness generation, clearing of witness keys and db persist and get helpers #3458

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

Merged
merged 10 commits into from
Jul 9, 2025

Conversation

bhartnett
Copy link
Contributor

Changes in this PR:

  • Implemented function to build/generate witnesses using the witness keys in the ledger.
  • Refactored/renamed stateless files into better structure.
  • Created Witness type which doesn't store the full bytecode or headers, only the hashes which will be used to store the witness in the database without data duplication. The reasoning here is that code is already stored by codeHash and headers are already stored separately.
  • Added support to clear the witness keys when calling persist on the ledger.
  • Added functions to persist and get witnesses from the database.
  • Added more unit tests.

ledger,
witness_types

{.push raises: [].}
Copy link
Contributor

Choose a reason for hiding this comment

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

We normally put this already before the imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, does that change the behavior of the {.push raises: [].} statement?

@bhartnett bhartnett merged commit d93ffb3 into master Jul 9, 2025
14 checks passed
@bhartnett bhartnett deleted the stateless-witness-generation branch July 9, 2025 00:53
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