An open API service indexing awesome lists of open source software.

https://github.com/ethereum-optimism/tests

Standard Tests for OP Stack Component Implementations.
https://github.com/ethereum-optimism/tests

op-stack rust tests

Last synced: 10 months ago
JSON representation

Standard Tests for OP Stack Component Implementations.

Awesome Lists containing this project

README

          


OP Test Vectors


Standard Tests for OP Stack Component Implementations.


CI
Book
License
Book


What's `ethereum-optimism/tests`
Overview
Contributing
Credits

## 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](./fixtures) directory.

There are two types of tests:
- `derivation`
- `execution`

Each has it's own cli tool to generate test fixtures. [opt8n](./bin/opt8n) can be used to generate execution test fixtures, while [opdn](./bin/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](./fixtures/).

`op-test-vectors` contains two primary modules:

- [`execution`](./crates/op-test-vectors/src/execution.rs): Rust types for the execution test fixtures.
- [`derivation`](./crates/op-test-vectors/src/derivation.rs): 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][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][eth-tests] and built by the collaboration between a number of teams and external contributors including [OP Labs][op-labs] and [Worldcoin engineers][worldcoin].

[book]: https://ethereum-optimism.github.io/tests/
[op-labs]: https://github.com/ethereum-optimism
[worldcoin]: https://github.com/worldcoin
[eth-tests]: https://github.com/ethereum/tests