Setup

  1. Please advise the arbitrum nitro local setup guide for a complete breakdown on necessary language and dev dependencies
  2. Ensure that submodules are adequately instantiated before building local artifacts (i.e, git submodule update --init --recursive)

System tests

Two tests have been introduced to assert the end-to-end correctness of both eigenda batch submission/derivation as well as fraud proofs using the extended replay script for eigenda.

## Spinup eigenda proxy locally
./scripts/start-eigenda-proxy.sh

## Run E2E batch submisison/derivation test 
 go test -v -run ^TestEigenDAProxyBatchPosting$ github.com/offchainlabs/nitro/system_tests
 
## Run E2E fraud proof test
make test-go-challenge

NOTE: There is no end-to-end fraud proof test which forces an asserter and challenger to converge on a READPREIMAGE eigenda opcode

Proof integration tests

A) Generating Test Preimages

Test preimages are generated via the create-test-preimages.py script. This script was extended to generate a 128 byte EigenDA preimage which is consumed via the scripts mentioned below.

B) Generating Test Proofs

There are two test scripts (host-io.rs, go.main) which target the READPREIMAGE opcode for EigenDA when compiled to WAVM. Proof states for testing the on-chain (OSP) One-Step-Proof execution and verification of an opcode execution can be generated via the following commands:

## 1 - Generate test preimages

make target/testdata/preimages.bin

## 2 - Generate test proofs

make contracts/test/prover/proofs/rust-host-io.json

make contracts/test/prover/proofs/go.json

## 3 - Generate all test proofs

make -j test-gen-proofs

The proof states are dumped to the contracts/prover/proofs/*.json subdirectory under the following data schema:

{"before": “0x420”, “after”: “0x42”, “proof”: “0x666”}