-
Notifications
You must be signed in to change notification settings - Fork 11
Support fetching witnesses via eth-tx-proof #33
Comments
@cpubot Will you be tackling this in the near future? Someone from my team or myself can take over if you're busy, just let me know! :) |
Yeah if someone from your side needs it @Nashtare feel free to grab this. |
I would be happy to pick this up if no one has already been assigned? In the future we plan to build a tracer integration for reth so I think this would be a good introductory issue to pick up. I would be doing this work on behalf of Fractal who intends to use the Type 1 EVM in the future. |
@frisitano Thank you for offering to tackle this, that'd be great! Note that |
@Nashtare Sure thing, I've made a start on this. |
Ok, just wanting to let you know that the refactor PR mentioned above (#15) is merged back in. |
I now have #51 working on blocks produced by erigon devnet including smart contract interactions but for mainnet blocks I run into a
|
@frisitano Which blocks are you trying to prove? The current |
@Nashtare I'm proving block number 17735424 which is a Shanghai block. I'm using an alchemy rpc to source the witness data for both |
This is quite specific to the internals of the zk-evm arithmetization, so may be tough to dive into if you're not familiar with how the whole kernel logic behaves. I can try looking at it a bit more later today |
@frisitano Just FYI, we're experiencing some bugs on |
@Nashtare Certainly. Please find the logs attached. Command:
|
Cycle 116868, ctx=0, pc=ecrecover, instruction=Dup(1), stack=[87308623151916798375216749502438337832795253495607303634714898271170639627676, 28, 56296191302052192061477373449743179050685448427087360131414109079395239272403, 3825636757570036313773666492659193980943799342832065023943496369727278541227, 60042, 45179, 0, 128, 2, 1] EDIT: Nevermind, still looking into the txn failure. |
The mismatch is actually surprising. The memory cell that should contain the cumulative gas used post txn execution, i.e. typically the gas used by this txn as it is the first one, is instead set with the txn gas limit. The gas used is correctly computed within the kernel. Would you happen to have your |
In regards to versions: |
Hmm interesting, |
Good catch. I can confirm the transaction receipt object returned by the rpc has the correct gas value that you quoted. I'll investigate and locate where this discrepancy arises and report back. |
@Nashtare the erroneous value was associated with bad mapping on the adapter I built. I've fixed it and that is no longer an issue. However, now I am experiencing the following issue which I believe is related to state root consistency checks at the end of the kernel. See log extract below:
I've compared the transaction traces for this transaction with the state diff here and the data looks consistent so I'm not sure why it would yield a different state root. |
I've attached the |
I fixed issues related to gas and storage slot deletions. I'm working through the transactions iteratively and fixing bugs as I go. Will keep this issue updated with progress. |
After some changes (I still need to push them) I have been able to successfully prove block |
Awesome! As for |
Done with #81 |
Currently
zero-bin
allows fetching block trace data from a Erigon instance with the proper witness APIs as well as loading this trace data from a file and kicking off proofs.To enable easier integration testing, as well as to give users a nice way to target chains which do not yet have the proper trace APIs, we would like to integrate the code from eth-tx-proof into zero-bin such that we can fetch information from an existing RPC node and kick off the proving process for a block or transaction.
The text was updated successfully, but these errors were encountered: