You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### 7. `batch_proofs_status` Does Not Auto-Update in Shadow Testing
740
+
741
+
**Symptom**: After all batches in a bundle reached `proving_status=4` (verified), the bundle's `batch_proofs_status` remained `1` (Pending). The coordinator's cron job that normally updates this was not running in the shadow testing setup.
742
+
743
+
**Impact**: Bundles could not be scheduled for bundle proof generation because `Assign()` requires `batch_proofs_status == 2` (Ready).
744
+
745
+
**Fix**: Manually update when all constituent batches are verified:
746
+
```sql
747
+
UPDATE bundle SET batch_proofs_status =2WHERE index =<bundle_index>;
748
+
```
749
+
750
+
**Why this happens**: The coordinator background cron (`cron.UpdateBundleProofsStatus`) is either not enabled or relies on production-specific infrastructure (e.g., message queue, scheduler) that is absent in shadow testing.
751
+
752
+
#### 8. Prover 1 Entered Failure Loop After Config Change
753
+
754
+
**Symptom**: After changing `supported_proof_types` from `[1,2,3]` to `[3]` (Bundle only), Prover 1 was assigned a chunk task, rejected it, and entered a loop:
755
+
```
756
+
ERROR: cannot submit valid proof for a prover task twice
757
+
ERROR: CoordinatorEmptyProofData: get empty prover task
758
+
```
759
+
760
+
**Root Cause**: The prover received a chunk task from the coordinator but its config said it only supports Bundle proofs. It failed the task, but the coordinator kept reassigning it.
761
+
762
+
**Fix**:
763
+
1. Revert config to `supported_proof_types: [1, 2, 3]`
failed to verify proof: data did not match any variant of untagged enum ProofEnum
773
+
```
774
+
775
+
**Root Cause**: The `libzkp.so` shared library was built on May 19 against an older zkvm-prover (`f18523c`). The new prover (`ed3b964`, OpenVM 1.6.0) changed the `Proof<SC>` bincode serialization format. Old `libzkp.so` could not deserialize new proofs.
776
+
777
+
**Fix**: Rebuild `libzkp-c` and replace `libzkp.so`:
**Initial suspicion**: GORM was corrupting PostgreSQL `bytea` fields.
793
+
794
+
**Verification**: Standalone Go test confirmed GORM correctly maps `bytea` → `[]byte`.
795
+
796
+
**Actual root cause**: The `json.Unmarshal` in Go succeeded (it produced a valid `OpenVMBatchProof` struct). The failure was in Rust `libzkp::gen_universal_task` when it tried to bincode-deserialize the inner `StarkProof`. The error message bubbled up from Rust → CGO → Go, but the Go layer's `json.Unmarshal` log was the most visible symptom.
797
+
798
+
**Lesson**: When seeing deserialization errors in a Go/Rust hybrid system, verify which layer actually fails. Don't assume the first logged error is the root cause.
799
+
800
+
### Next Step: Real On-Chain Finalize
801
+
802
+
All 5 bundle proofs are coordinator-verified. The next step is to attempt real on-chain finalization via the relayer:
803
+
804
+
1. Ensure `ZkEvmVerifierPostFeynman` is deployed with digests matching the new proofs
805
+
2. Register verifier on `MultipleVersionRollupVerifier`
806
+
3. Ensure batches are committed on-chain (`committedBatches[endBatchIndex] != 0`)
807
+
4. Start relayer to call `finalizeBundlePostEuclidV2`
808
+
809
+
⚠️ **Current Anvil state**: `lastCommittedBatchIndex = 0`, `lastFinalizedBatchIndex = 0`. The batches were never committed on this Anvil fork. The relayer must first commit batches before finalizing bundles.
810
+
811
+
### Post-Proving Checklist
812
+
813
+
-[ ] All chunks/batches/bundles have `proving_status = 4`
814
+
-[ ] All bundles have `batch_proofs_status = 2`
815
+
-[ ]`libzkp.so` matches prover revision
816
+
-[ ] Coordinator asset hashes match prover circuit hashes
817
+
-[ ] Verifier digests extracted from new proofs match on-chain verifier
818
+
-[ ]`committedBatches[endBatchIndex]` is non-zero for all target batches
819
+
-[ ] Relayer config has `enable_test_env_bypass_features` in correct location (if needed for other tests)
820
+
821
+
---
822
+
823
+
## 2026-06-04: Bundle 13451 `VerificationFailed` — `L1MessageQueueV2` State Mismatch on Anvil Fork
824
+
825
+
### What Happened
826
+
827
+
After successfully proving bundles 13450–13454 with OpenVM 1.6.0, bundle 13450 finalized on-chain successfully. Bundle 13451 failed with:
Manual `cast call` to the verifier contract with DB-extracted public inputs reproduced the same error.
834
+
835
+
### Root Cause
836
+
837
+
The Anvil fork block (10979334) was at a boundary where `L1MessageQueueV2.nextCrossDomainMessageIndex = 1091255`. Bundle 13451's `totalL1MessagesPoppedOverall = 1091256`, so the contract queried `getMessageRollingHash(1091255)`. On Anvil this returned `0x0` because no message had been appended at that index yet. In production, `getMessageRollingHash(1091255) = 0xb9954a9f...`.
838
+
839
+
The proof was generated with the production `messageQueueHash` (embedded in `bundle_pi_hash`), but the on-chain contract recomputed `publicInputs` using Anvil's stale `0x0` value. This mismatch caused `VerificationFailed` even though the proof structure and SNARK were internally valid.
840
+
841
+
**The coordinator verifies SNARK self-consistency (proof matches its own instances), NOT that the instances match on-chain state.**
842
+
843
+
### Diagnosis Steps
844
+
845
+
1.**Verify the error is from the verifier, not the contract**:
> **Shadow fork state can diverge from production in subtle ways.** Even when `ScrollChain.committedBatches` and `finalizedStateRoots` look correct, peripheral contracts like `L1MessageQueueV2` may have different state at the fork block. Always verify that *all* contract inputs used in `publicInputs` computation match the values the proof was generated with.
973
+
974
+
### Pre-Finalize Checklist (Updated)
975
+
976
+
-[ ] Anvil forked at `last_real_finalize_block + 1`
977
+
-[ ]`lastFinalizedBatchIndex` set to `<first_target_batch - 1>`
978
+
-[ ]`lastCommittedBatchIndex` set to real Sepolia value (≥ last target batch)
979
+
-[ ] All end-batch indices have non-zero `committedBatches` hashes
980
+
-[ ]`L1MessageQueueV2.nextUnfinalizedQueueIndex` set to pre-finalization value
981
+
-[ ]`L1MessageQueueV2.nextCrossDomainMessageIndex` ≥ post-finalization value
982
+
-[ ]**`L1MessageQueueV2.messageRollingHashes` synced from production for all indices needed by target bundles**
983
+
-[ ]**Verify slot numbers with `forge inspect`** before `anvil_setStorageAt`
984
+
-[ ] Sender balances > 0 on Anvil
985
+
-[ ]**Finalize sender is authorized prover** (`isProver[sender] == true`)
986
+
-[ ] Verifier digests match proofs
987
+
-[ ] Relayer started with `--config <path>` and `--min-codec-version 10`
988
+
-[ ] Target bundles/batches reset to `rollup_status = 1`
0 commit comments