Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 34 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,22 @@ mock_failure = true

Available proof types:

| Name | EL | zkVM |
| --------------- | -------- | ------ |
| `ethrex-openvm` | `ethrex` | OpenVM |
| `ethrex-sp1` | `ethrex` | SP1 |
| `ethrex-zisk` | `ethrex` | ZisK |
| `reth-openvm` | `reth` | OpenVM |
| `reth-sp1` | `reth` | SP1 |
| `reth-zisk` | `reth` | ZisK |
| `zesu-zisk` | `zesu` | ZisK |
| Name | EL | zkVM |
| ----------------- | ------------ | ------ |
| `ethrex-openvm` | `ethrex` | OpenVM |
| `ethrex-sp1` | `ethrex` | SP1 |
| `ethrex-zisk` | `ethrex` | ZisK |
| `reth-openvm` | `reth` | OpenVM |
| `reth-sp1` | `reth` | SP1 |
| `reth-zisk` | `reth` | ZisK |
| `zesu-openvm` | `zesu` | OpenVM |
| `zesu-sp1` | `zesu` | SP1 |
| `zesu-zisk` | `zesu` | ZisK |
| `nimbus-sp1` | `nimbus` | SP1 |
| `nimbus-zisk` | `nimbus` | ZisK |
| `nethermind-sp1` | `nethermind` | SP1 |
| `nethermind-zisk` | `nethermind` | ZisK |
| `zilkworm-sp1` | `zilkworm` | SP1 |

## Engine API

Expand All @@ -153,13 +160,13 @@ The CL uses zkboost as its Engine API endpoint at `POST /`.

zkboost also serves these endpoints.

| Method | Endpoint | Purpose |
| ------ | ------------------- | ----------------------------------- |
| `GET` | `/health` | Health check |
| `GET` | `/metrics` | Prometheus metrics |
| Method | Endpoint | Purpose |
| ------ | ------------------- | ------------------------------------ |
| `GET` | `/health` | Health check |
| `GET` | `/metrics` | Prometheus metrics |
| `GET` | `/dashboard` | Built-in dashboard UI (when enabled) |
| `GET` | `/dashboard/state` | Dashboard state JSON snapshot |
| `GET` | `/dashboard/events` | Dashboard SSE event stream |
| `GET` | `/dashboard/state` | Dashboard state JSON snapshot |
| `GET` | `/dashboard/events` | Dashboard SSE event stream |

## Proof Submission

Expand Down Expand Up @@ -187,6 +194,13 @@ The table gives the EIP-8025 proof type of every zkboost proof type.
| `5` | `reth-sp1` |
| `6` | `reth-zisk` |
| `7` | `zesu-zisk` |
| `8` | `nimbus-sp1` |
| `9` | `nimbus-zisk` |
| `10` | `nethermind-sp1` |
| `11` | `nethermind-zisk` |
| `12` | `zilkworm-sp1` |
| `13` | `zesu-openvm` |
| `14` | `zesu-sp1` |

## Mock Beacon Node

Expand All @@ -196,12 +210,12 @@ The table gives the EIP-8025 proof type of every zkboost proof type.
- It verifies the signature and the proof of every submitted envelope. The public values must be the ones of a valid payload.
- A proof that decodes as a `MockProof` passes without a proof verification for any proof type. Every other proof goes to the verifier of its proof type.

| Flag | Description |
| -------------------------- | ------------------------------------------- |
| Flag | Description |
| -------------------------- | ------------------------------------------------------------------------- |
| `--cl-endpoint <URL>` | Beacon API endpoint of the CL whose Engine API requests the mock forwards |
| `--zkboost-endpoint <URL>` | Engine API endpoint of zkboost |
| `--port <u16>` | Port serving the beacon API (default: 3001) |
| `--engine-port <u16>` | Port serving the Engine API to the CL (default: 8551) |
| `--zkboost-endpoint <URL>` | Engine API endpoint of zkboost |
| `--port <u16>` | Port serving the beacon API (default: 3001) |
| `--engine-port <u16>` | Port serving the Engine API to the CL (default: 8551) |

## Observability

Expand Down
4 changes: 1 addition & 3 deletions crates/mock-beacon-node/src/mock_beacon_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,7 @@ mod tests {
let dummy_url = Url::parse("x:").unwrap();
let mock_beacon_node =
MockBeaconNode::new(dummy_url.clone(), dummy_url, DEFAULT_PROOF_ENGINE_JSON).unwrap();
// TODO: add the fixture proof of the zesu guest that ere-guests v0.19.1 re-adds.
for proof_type in ProofType::iter().filter(|proof_type| *proof_type != ProofType::ZesuZisk)
{
for proof_type in ProofType::iter() {
let stateless_validator = proof_type.stateless_validator_kind();
let zkvm = proof_type.zkvm_kind();
let zkvm_version = zkvm.sdk_version();
Expand Down
12 changes: 12 additions & 0 deletions crates/mock-beacon-node/tests/fixture/proof-engine.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"proof_type": 6,
"program_vk": "0x783097a373742236094ead8b832a2cf1e80ec60e7f3b3538b2f6612f9fabc837"
},
{
"proof_type": 7,
"program_vk": "0xe7187dab0ca0dc85d7d5736e14570362eb78fc141cfd39ee9947a85a0c9f30f3"
},
{
"proof_type": 8,
"program_vk": "0x007688ef646ad5d5c57904bdc6dc64be64d1ee0a2a3b30d7c375a2975e702609"
Expand All @@ -43,6 +47,14 @@
{
"proof_type": 12,
"program_vk": "0x004ae5f2938262b0c67f4592246c29be501aac3a305672224f4f058c55d7f51b"
},
{
"proof_type": 13,
"program_vk": "0x00e2a92e3e00580e5f190033dfd75b00a289500300d87f591a00e108f430002eee680d00a5488d4c06030619068000a2c21b53000a2fee4f0036169c2800aaaa8d6c0087fbce5b00328dc26f009fe7de5a004686562400e77e894500a128f20f00674f7c2400b38df01800309c530900a487cf0400725bac510051af497500e4abff6e00a58ac939000775b41a001a76e84100c5e8944400c94e8e1600330e6b39001cacbc5a00ca47cd51001b418e02000fe02a480009a32070002554164500d7069403007d07bf3000290ccf21008726523b00e5fd1112003d03bd4c001c6831680016a3fe4200ad7ec6300028529e3c005710de1700349b6a77004b13962f00cff00054001483f65100ab05ce6b0034174b6000bc041c0900a9b5a11a00b26f160300615de46100935f922800d39e4a2700596ea87000ca5764770023df7b57000b1ee85e004c456d61000bdad13b003de28a5f008584cc2a00033ab1020025f59e4a00c3a9f64a00b8ef166500"
},
{
"proof_type": 14,
"program_vk": "0x00acb8ab1f35266a47ed753af0bd207158245f9514b20862b1a5208871076e3b"
}
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions crates/server/src/http/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
--pt-9: #a3e635;
--pt-10: #c026d3;
--pt-11: #ec4899;
--pt-12: #14b8a6;
--pt-13: #6366f1;
--gas: #94a3b8;
}

Expand Down Expand Up @@ -582,6 +584,8 @@
'nethermind-sp1',
'nethermind-zisk',
'zilkworm-sp1',
'zesu-openvm',
'zesu-sp1',
];
const PROOF_TYPE_HEX = Object.fromEntries(PROOF_TYPE_KEYS.map((key, i) => [key, cssVar(`--pt-${i}`)]));
const PROOF_TYPE_COLORS = Object.fromEntries(
Expand Down
15 changes: 12 additions & 3 deletions crates/types/src/proof_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ pub enum ProofType {
NethermindZisk = 11,
/// Zilkworm with SP1 backend.
ZilkwormSP1 = 12,
/// Zesu with OpenVM backend.
ZesuOpenVM = 13,
/// Zesu with SP1 backend.
ZesuSP1 = 14,
}

impl ProofType {
Expand All @@ -67,7 +71,7 @@ impl ProofType {
StatelessValidatorKind::Ethrex
}
Self::RethSP1 | Self::RethOpenVM | Self::RethZisk => StatelessValidatorKind::Reth,
Self::ZesuZisk => StatelessValidatorKind::Zesu,
Self::ZesuOpenVM | Self::ZesuSP1 | Self::ZesuZisk => StatelessValidatorKind::Zesu,
Self::NimbusSP1 | Self::NimbusZisk => StatelessValidatorKind::Nimbus,
Self::NethermindSP1 | Self::NethermindZisk => StatelessValidatorKind::Nethermind,
Self::ZilkwormSP1 => StatelessValidatorKind::Zilkworm,
Expand All @@ -81,8 +85,9 @@ impl ProofType {
| Self::RethSP1
| Self::NimbusSP1
| Self::NethermindSP1
| Self::ZilkwormSP1 => zkVMKind::SP1,
Self::EthrexOpenVM | Self::RethOpenVM => zkVMKind::OpenVM,
| Self::ZilkwormSP1
| Self::ZesuSP1 => zkVMKind::SP1,
Self::EthrexOpenVM | Self::RethOpenVM | Self::ZesuOpenVM => zkVMKind::OpenVM,
Self::EthrexZisk
| Self::RethZisk
| Self::ZesuZisk
Expand Down Expand Up @@ -111,6 +116,8 @@ impl ProofType {
Self::NethermindSP1 => "nethermind-sp1",
Self::NethermindZisk => "nethermind-zisk",
Self::ZilkwormSP1 => "zilkworm-sp1",
Self::ZesuOpenVM => "zesu-openvm",
Self::ZesuSP1 => "zesu-sp1",
}
}
}
Expand Down Expand Up @@ -138,6 +145,8 @@ impl FromStr for ProofType {
"nethermind-sp1" => Self::NethermindSP1,
"nethermind-zisk" => Self::NethermindZisk,
"zilkworm-sp1" => Self::ZilkwormSP1,
"zesu-openvm" => Self::ZesuOpenVM,
"zesu-sp1" => Self::ZesuSP1,
_ => return Err(ProofTypeParseError(s.to_string())),
})
}
Expand Down
Loading
Loading