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.
- Host: GitHub
- URL: https://github.com/ethereum-optimism/tests
- Owner: ethereum-optimism
- License: mit
- Archived: true
- Created: 2024-06-05T22:01:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-11T18:18:41.000Z (over 1 year ago)
- Last Synced: 2025-04-25T15:58:43.086Z (10 months ago)
- Topics: op-stack, rust, tests
- Language: Rust
- Homepage: https://static.optimism.io/tests
- Size: 26.6 MB
- Stars: 17
- Watchers: 13
- Forks: 13
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Standard Tests for OP Stack Component Implementations.
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