Repository navigation
Conversation
Move proof generation into `BatchProver::generate_proof`, with separate network and local implementations. Co-Authored-By: Claude Opus 5.5 <<EMAIL_ADDRESS>>
|
Important Review skippedToo many files! This PR contains 116 files, which is 16 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.
|
The batch DA commitments bind only the L1-only projection of the transaction stream (data_hash) and the L2-only projection (blob), not their interleaving inside a block. The guest executed transactions in whatever order the witness supplied, so a single committed batch could be proven with different postStateRoot / withdrawRoot values (GHSA-fgxm-qqj4-jxv9). Add validate_canonical_order before execution, mirroring the node's validateL1Messages: within a block every L1 message must precede every L2 transaction, and L1 queue indices must be consecutive across the batch. Combined with the per-block num_l1_txs in the blob block context, each block's transaction stream is now uniquely determined by the committed data. Co-Authored-By: Claude Opus 5.5 <<EMAIL_ADDRESS>>
mix_hash (PREVRANDAO) and difficulty (DIFFICULTY) feed the EVM block environment but are not committed by the blob, so a prover could pick arbitrary values and reach a state the L2 network never executed. morph-geth builds L2 headers with both fields zero and always returns 0 for opcode 0x44; reject any other value before execution. Co-Authored-By: Claude Opus 5.5 <<EMAIL_ADDRESS>>
| #[test] | ||
| fn accepts_canonical_order() { | ||
| let blocks = [ | ||
| block(1, vec![l1(0), l1(1), l2(0), l2(1)]), |
| #[test] | ||
| fn accepts_canonical_order() { | ||
| let blocks = [ | ||
| block(1, vec![l1(0), l1(1), l2(0), l2(1)]), |
| fn accepts_canonical_order() { | ||
| let blocks = [ | ||
| block(1, vec![l1(0), l1(1), l2(0), l2(1)]), | ||
| block(2, vec![l2(2)]), |
| block(2, vec![l2(2)]), | ||
| block(3, vec![]), | ||
| block(4, vec![l1(2)]), | ||
| block(5, vec![l1(3), l2(3)]), |
|
|
||
| #[test] | ||
| fn rejects_l1_message_after_l2_tx() { | ||
| for txs in [vec![l2(0), l2(1), l1(0), l1(1)], vec![l1(0), l2(0), l1(1)], vec![l2(0), l1(0)]] |
|
|
||
| #[test] | ||
| fn rejects_l1_message_after_l2_tx() { | ||
| for txs in [vec![l2(0), l2(1), l1(0), l1(1)], vec![l1(0), l2(0), l1(1)], vec![l2(0), l1(0)]] |
|
|
||
| #[test] | ||
| fn rejects_l1_message_after_l2_tx() { | ||
| for txs in [vec![l2(0), l2(1), l1(0), l1(1)], vec![l1(0), l2(0), l1(1)], vec![l2(0), l1(0)]] |
|
|
||
| #[test] | ||
| fn rejects_l1_message_after_l2_tx() { | ||
| for txs in [vec![l2(0), l2(1), l1(0), l1(1)], vec![l1(0), l2(0), l1(1)], vec![l2(0), l1(0)]] |
No description provided.