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

Use Proof_cache_tag.t in Ledger_proof.t #16469

Draft
wants to merge 20 commits into
base: compatible
Choose a base branch
from

Conversation

georgeee
Copy link
Member

Explain your changes:

  • TODO

Explain how you tested your changes:
*

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? None

Implement structure as abstract in statement and proof.

This would be useful to differentiate in proof as in wire types and a
proof as a reference to cache.
This cleans up code. Sexp derivations were not used a lot, and json
alternative exists for dumping to a text format.

Some implications:

* Output of sexp is not supported for dump_blocks
* Sexp is not supported for precomputed blocks
Context: Derivations `compare`, `sexp` are not used in any meangful way.
Derivation `yojson` isn't needed beyond Stable modules (it's used for
logging and for precomputed blocks dumping).

Problem: changing structure of `Transaction_snark.t` to use DB cache for
proofs is complicated because `equal`, `compare`, `sexp` and `json` all
need to be derived for the alternative representation. Running these
methods would become potentially expensive by requiring DB reads, and
hiding this complexity within such trivial methods is undesirable.

Solution: remove unnecessary derivations. Leave `yojson` only for
Stable module types.
Having the two types equal defeats the purpose of type separation.
Currently we store too much of data in the LRU cache
Accept/return state hash instead of `Root_data.Mimimal.t`
Remove `Stable.Latest.t = t` from interfaces. This is a preparation step
for removing the equality in the implementation as well.
@georgeee georgeee force-pushed the georgeee/proof-cache-tag branch from d79a1cd to f42e546 Compare January 20, 2025 22:49
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.

1 participant