From 432022cf13f3db2a3fd9dad78316acd1e0db7921 Mon Sep 17 00:00:00 2001 From: refcell Date: Wed, 24 Jul 2024 15:52:19 -0400 Subject: [PATCH 1/2] chore: spruce up the op-test-vectors readme --- Justfile | 5 ++++ README.md | 54 ++++++++++++++++++++++++++++++++++++++++++-- assets/op-tests.png | Bin 0 -> 8678 bytes 3 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 assets/op-tests.png diff --git a/Justfile b/Justfile index a0f8446..10f5d1f 100644 --- a/Justfile +++ b/Justfile @@ -3,11 +3,16 @@ alias t := test alias f := fmt alias l := lint alias b := build +alias opt8n := run # default recipe to display help information default: @just --list +# Runs opt8n +run: + cargo run --bin opt8n + # Run all tests tests: test test-docs diff --git a/README.md b/README.md index c7f5cae..36e8274 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,53 @@ -# op-test-vectors +

+ OP Test Vectors +

-Cli tool for building OP test vectors +

+ Standard Tests for OP Stack Component Implementations. +

+ +

+ CI + Book + License + Book +

+ +

+ What's OP Test Vectors? • + Overview • + Contributing • + Credits +

+ +## What's OP Test Vectors? + +OP Test Vectors 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. + +Test fixtures can be easily generated using the [opt8n](./crates/opt8n) cli tool. + +### Development Status + +`op-test-vectors` is currently in active development, and is not yet ready for use in production. + +## Overview + +**`op-test-vectors`** + +- [`client`](./bin/client): The bare-metal program that runs on top of a [fault proof VM][g-fault-proof-vm]. +- [`host`](./bin/host): The host program that runs natively alongside the FPVM, serving as the [Preimage Oracle][g-preimage-oracle] server. + +## 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 + +`op-test-vectors` 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/op-test-vectors/ +[op-labs]: https://github.com/ethereum-optimism +[worldcoin]: https://github.com/worldcoin +[eth-tests]: https://github.com/ethereum/tests diff --git a/assets/op-tests.png b/assets/op-tests.png new file mode 100644 index 0000000000000000000000000000000000000000..794138999ab45322c3b6a69f9fccf0d786734043 GIT binary patch literal 8678 zcmd6Ni8s{m7ypoLP-g5@mYE?U8VT8rVTQ(S58QAP`-` zzlVhhnCT{Bj(|V#L#)MP5QvTI-$MsVOXmkB=^mS6P@vM@3yZ*j;enQc76?=k&-T}W z5d;zq(nD*R`O~eA-*mIt51HDWJpIWmX%a7GQGt1##uD4rY^0s-Xr&FK4?3 zzQ3Al-v1jEn%pEOMs3>vxqWoncNhvn$&Qj8CGAcoVSru#KmNjT0ujk4D?8nbY1nss zA!rTjgPg}zZ1f;T5yWfKN3SnYA-z!-xGJu_3WD!fn_4MRXS8};y}5v6eUC>i5aa5-pXPc@!yG>h zuZ*r$4jmcQcKq&SWhU$NEKH3e}O3N!gYwrmVfC1qeey+3(^v}y%zqWZCOc_~nnk~E~J zZM|FT6;M+rDOaRJmykn%bH!qJ`n+^GS#S@xrbM?JKpUK*lHn>)0e)F=XEY%^1#|*K z+;}VtJF|&TxQ}Kcfu}B^65xJtxvQ4AN>UdHN%vP9`)DQ<&GbHA?}?2Ie&u=ey%4c}JWKRG|m`3N6R zNfIiLH#k~+B#-8?!A@S*S!W-VS-(f&Kz>MAx8@BP=W+7seqZ-atBQ<_J%PS1nvxqs zB0Nt4dB6~oFxUuOJUoa+PoIPh1x)2dCD6kXH1PCwPbdg9I*RLf{bXgjJ@y8ju>>js z1eHvoKK*XE@hb;&*7LtJj57}JkWeV|-PG4kk(U@Xvsk+MNhIy!07DRWRAEU9i4=6F zu}wX{HhktPj2uC#b1s_RZ{_&l7fC>)X*N>tt$x_pgIKz;Bo>fcEQMVQ{d0JAXr58i zfu&o4MB@0O%C@Rm!P3o3A_*6twS$750tyWvP$Pbex8GeK)4wr}!3v?!e;u@g_NKI| zL_n-M{~JS&gOr07upxIq+;N2^X8}l`21_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UK3FwuOx(PBTFl(5uC}3uH`NlPR!`c7Y0Br_-ecU01zs%w z!OfjF$uZ;)rxexP{8ua1_dFwd@2b3IwksV?90J|4l1NG_y+I{36Eq7nt?NUDX8T=@ zLXT;uU*Rx(Nk~Nz)FcLLtZXhbvRE#3B7fvD^ML7mhR(?TB1i5-O#owK7S>-V?v zyV|pTs8!E76nn8xp`3{WzdF|R9KX0G&^H_Ys<3Ot;Z&)gvX8={k59VW+rWiNDB{3B zSA!A$dZr&6$YYPJIV`vgvPyl4vSpK48)v}&mpkgE&lf#PZA^^$GwO6^y+Z7sCCjQ8 zqxPL*iIg`x+0LaSPHD?y37i>A1N~sD$moI`NJeK5Q1&noDh9%tIFWbr{rBQApl_&a zN?XXiTOW@asxDbn3tBLKZ2M4HR7;G&!=-!aP>R4^S^8j=496@FzKcy`}u_(H5)>mW&vMzUfpR7xwd-!MJ!9tfxJjH*KvzYD5w1s3Gr(Y-zL7eV1|8ndX6sk zOWc!Vy*ZLSa4OgmrCM3pLdvDsF$#Ip|#mFsBx)64Tzfykua3W+48b3MjvupjFNjuCo zXWHtjLYvtgCKmA3>|GlhrKUg4Riq742HTq|A(na71 z-S)kPOO@8O;&REKYJz*I*l}sT=Bz#&U7d1h94Px}8n4a*rWg+m55Rew-8NUU zw7)(k{)BLfh~fNrike&U_Ad%-ObK_IaL0(lP1Jb2>X-Y@aXHOBOPK|z1efXZhD+gd2+8_ngM zL{Cgk;w-Uc*T1QKpVYYu|0Tufw+-9mMH>e)WU|UkSk~^~6&^uLldu1DjPGOPmE<yN1LuIus;7=e17z)ZjM5q+3gw#=NsD5@|D=$9ZSL&Z%E3^ngQ1Ka-MI* z=JOinVKzs}LZi%>b9dBN!W>so{KtWiNVXcw90Te9_g^EtEefN Date: Wed, 24 Jul 2024 15:57:00 -0400 Subject: [PATCH 2/2] fix: remove client + host --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36e8274..0b288a9 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,13 @@ Test fixtures can be easily generated using the [opt8n](./crates/opt8n) cli tool **`op-test-vectors`** -- [`client`](./bin/client): The bare-metal program that runs on top of a [fault proof VM][g-fault-proof-vm]. -- [`host`](./bin/host): The host program that runs natively alongside the FPVM, serving as the [Preimage Oracle][g-preimage-oracle] server. +- [`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` Commands** + +- `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. ## Book