Skip to content

ethereum-optimism/tests

Repository files navigation

OP Test Vectors

Standard Tests for OP Stack Component Implementations.

CI Book License Book

What's `ethereum-optimism/tests`OverviewContributingCredits

What's ethereum-optimism/tests?

ethereum-optimism/tests is a portable suite of standardized test fixtures used to test OP Stack component implementations. Test fixtures are static JSON files defined in the fixtures directory.

There are two types of tests:

  • derivation
  • execution

Each has it's own cli tool to generate test fixtures. opt8n can be used to generate execution test fixtures, while opdn generates derivation test fixtures.

Development Status

ethereum-optimism/tests is currently in active development, and is not yet ready for use in production.

Overview

op-test-vectors

A rust crate exposing types used to generate test fixtures in ./fixtures.

op-test-vectors contains two primary modules:

  • execution: Rust types for the execution test fixtures.
  • derivation: Rust types for the derivation test fixtures.

opt8n

A binary to generate execution test fixtures.

opt8n has two subcommands:

  • repl: Spins up a REPL that allows the user to send transactions to and generate a test fixture from those transactions.
  • script: Executes a forge script against an anvil instance and generates the test fixture.

opdn

A binary to generate derivation test fixtures.

opdn has the following subcommands:

  • from-l2: Generates a derivation test fixture from the specified range of L2 blocks.
  • from-l1: Generates a derivation test fixture from the specified range of L1 blocks.
  • info: Outputs the L2 block info including the L1 origin for the given L2 block number.

Book

The book contains an in-depth overview of the project, contributor guidelines, and tutorials for creating your own test fixtures as well as you own test runners.

Credits

ethereum-optimism/tests is inspired by ethereum/tests and built by the collaboration between a number of teams and external contributors including OP Labs and Worldcoin engineers.

About

Standard Tests for OP Stack Component Implementations.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published