-
Notifications
You must be signed in to change notification settings - Fork 38
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
[wip] [tracking] Using reth and revm in our stack #761
Comments
Thanks Aatif, @wborgeaud -- could you comment on the difference in the smts? I think now is the time to cut to the more vanilla implementation. |
Comment from @paulgoleary in stand-up today was that Hermez compatibility is NOT what we mean by "SMT support".
|
Thanks Aatif. It's been noted elsewhere but worth doc'ing here that it is not a goal of this work (afaik) to be compatible with the Hermez SMT. In fact, we should be as standard as possible. A related point is that we expect that the REVM zkVM compilation path (e.g. Succinct RSP) to also be a viable proving stack for use in the CDK. This emphasizes the need to be as standard 'as possible' since one of the major benefits of the approach is the ability to compile the 'standard' REVM directly to a prover. |
Because of time/resource constraints, we'd probably want to stick with Hermez SMT for now (we had actually targeted a more optimized version first, but then reverted for easier compatibility during transition Hermez -> Zero prover). Given that we also need to target cdk-erigon (which uses hermez'), we probably would want to stick to this one here (though there were some discussions about tweaking the internals, see point below on
They do not have a given
Agreed on this. You mention this being |
Closed #790 |
We're playing with the idea of (also) using
reth
andrevm
in the same places we usejerigon
.This issue charts a path for this integration.
fraktal-zkp/zeth
Folks on the team have seen the
zeth
prototype stack successfully prove transactions with ourzk_evm
.This consists of:
zero_bin
to handle the new client: permalinkrevm
to allow it to collect execution traces: comparisonreth
to plumb the traces: comparisonrevm-inspectors
to juggle dependencies.SMT support
We would want our
zeth
client to support using SMTs as the "world" storage.I'm aware of two SMT "flavours": a "standard SMT", described in this post, and a "modified SMT" used in practice by Hermez.
It is NOT clear what the differences are, but it has been noted that they are not compatible.
It is NOT clear at this time which we want to target for this work.
SMTs also use a dense binary serialization format.
scroll-tech
has a fork ofreth
, broken down in paradigmxyz/reth#11830, which abstracts over storage formats for their own zktrie structure.We should be able to build off this work for our needs.
We may want to use their
zktrie
directly, but note that we'd need to pull in a go toolchain into our repo.If not, revm's
trait Host
is the right level to target.Strawman decision/workstream
Validate native tracers with reth #790
validate using native tracers for reth. We need to write in a zero tracer for (efficient) witness extraction, and according to Arnau, there are some edge cases where native tracing is not appropriate.Repro of zeth demo #777
Check in a test with the above into
zk_evm
CI. (medium, low risk (because we already do similar things in CI, right?))zk_evm
.Do we want to own/collaborate/drive/fund work on
zeth
?0xPolygonZero
] Should we fork the above repo, or start from scratch?Note that
fraktal-zkp/zeth
does not list its license.paradigmxyz/reth
andbluealloy/revm
both list MIT licenses.revm
reth
looks like it'll be a necessity for the plumbing work - existing execution extension and other APIs are not sufficient to get the traces we need.reth
is reasonably open to external contributions.trait Database
, so we may not need to fork it, but we will need to change the code inreth
that runs the interpreter.reth
, with changes as outlined above producing the same snapshot aszeth
(medium, low risk - we're building off proven work).reth
with our changes. Likely to be mired in API discussion, so we'll need a viable plan to keep our branch current. (medium, low risk but long tail)Our current SMT library is unsuitable for use in a client, and probably needs to be rewritten, or heavily refactored to be used in the way we'd need: smt_trie API should be suitable for trace_decoder #706 (medium, low risk, nonblocking).
spike: start introducing an SMT into
DatabaseState
abstraction paradigmxyz/reth#11786, and note the key APIs that might need tweakingSecondary objective to ramp up on reth/revm for future SP1/RISV/proving work.
The text was updated successfully, but these errors were encountered: