Skip to content

Commit 70bd7a0

Browse files
authored
fix: re-export Platform (#62)
* fix: re-export Platform * chore: drop nethermind-zisk
1 parent e7db767 commit 70bd7a0

8 files changed

Lines changed: 7 additions & 81 deletions

File tree

.github/scripts/fetch-elf-for-republish.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env bash
22
#
33
# Fetches the prebuilt guest ELF for <guest> listed in artifact-registry.json,
4-
# verifies its sha256, and writes OUTPUT_DIR/stateless-validator-<guest>.elf. When
5-
# the entry sets "archive_elf_path", that member is extracted from the downloaded
6-
# gzip tar archive; otherwise the download is the raw ELF.
4+
# verifies its sha256, and writes OUTPUT_DIR/stateless-validator-<guest>.elf.
75
#
86
# Usage: fetch-elf-for-republish.sh <el>-<zkvm>
97
# REGISTRY artifact-registry.json (default: artifact-registry.json)
@@ -25,12 +23,6 @@ curl -fsSL --proto '=https' --tlsv1.2 --retry 3 "$(entry url)" -o "$WORKSPACE/do
2523
echo "$(entry sha256) $WORKSPACE/download" | sha256sum -c -
2624

2725
OUT="$OUTPUT_DIR/stateless-validator-$GUEST.elf"
28-
ARCHIVE_ELF_PATH="$(entry archive_elf_path)"
29-
if [ -n "$ARCHIVE_ELF_PATH" ]; then
30-
tar -xzf "$WORKSPACE/download" -C "$WORKSPACE" "$ARCHIVE_ELF_PATH"
31-
mv "$WORKSPACE/$ARCHIVE_ELF_PATH" "$OUT"
32-
else
33-
mv "$WORKSPACE/download" "$OUT"
34-
fi
26+
mv "$WORKSPACE/download" "$OUT"
3527

3628
echo "Prepared $OUT"

.github/workflows/integration-test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
- sp1
2929
- zisk
3030
include:
31-
- { zkvm: zisk, external: true, guest: nethermind }
3231
- { zkvm: zisk, external: true, guest: zesu }
3332
- { zkvm: zisk, guest: ethrex, ere_profile: ethrex }
3433
steps:

artifact-registry.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
"el_version": "bal-devnet-7-2026-06-24",
55
"url": "https://github.com/Consensys/zesu-zkvm/releases/download/bal-devnet-7-2026-06-24/stateless-validator-zesu-zisk.elf",
66
"sha256": "3ed03dce984ca476ee18fa96a4102176931c9863a01496b4a7e46fd601824dfc"
7-
},
8-
"nethermind-zisk": {
9-
"el_version": "zisk-guest-r7",
10-
"url": "https://github.com/NethermindEth/nethermind/releases/download/zisk-guest-r7/nethermind-guest-zisk-r7.tar.gz",
11-
"sha256": "15a6f5078ea5be9d35666e161969e44dda6d689775813cf417e781892ae70dd0",
12-
"archive_elf_path": "nethermind"
137
}
148
},
159
"stateless_validator_static_library": {},

crates/stateless-validator-ethrex/src/guest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use alloc::{format, vec::Vec};
44

5-
use ere_platform_core::Platform;
5+
pub use ere_platform_core::Platform;
66
use ethrex_guest_program::{
77
common::ExecutionError,
88
l1::{DecodedEip8025, validate_eip8025_canonical_execution, validate_eip8025_execution},

crates/stateless-validator-reth/src/guest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use alloc::{format, vec::Vec};
44

5-
use ere_platform_core::Platform;
5+
pub use ere_platform_core::Platform;
66
use reth_stateless::{stateless_validation_with_trie, validation::StatelessValidationError};
77
use reth_tries::zeth::SparseState;
88
use stateless_validator_common::{

crates/stateless-validator-test/src/execution.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ pub enum GuestKind {
2626
Reth,
2727
/// The zesu guest.
2828
Zesu,
29-
/// The nethermind guest.
30-
Nethermind,
3129
}
3230

3331
impl GuestKind {
@@ -37,7 +35,6 @@ impl GuestKind {
3735
Self::Ethrex => "ethrex",
3836
Self::Reth => "reth",
3937
Self::Zesu => "zesu",
40-
Self::Nethermind => "nethermind",
4138
}
4239
}
4340
}

crates/stateless-validator-test/src/execution/zkvm.rs

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
//! Helpers for compiling guest programs and asserting their zkVM execution.
22
3-
use std::{
4-
collections::BTreeMap,
5-
fs,
6-
io::Read,
7-
path::{Path, PathBuf},
8-
sync::LazyLock,
9-
};
3+
use std::{collections::BTreeMap, fs, path::PathBuf, sync::LazyLock};
104

115
use dashmap::DashMap;
126
use ere_dockerized::{
137
Compiler, CompilerKind, DockerizedCompiler, DockerizedzkVM, DockerizedzkVMConfig, Elf, Input,
148
ProverResource, zkVMKind,
159
};
1610
use serde::Deserialize;
17-
use stateless_validator_common::guest::{
18-
StatelessInput, input::new_payload_request::NewPayloadRequest,
19-
};
2011

2112
use crate::{
2213
execution::{ExecutionFailure, GuestKind, run_execution},
@@ -37,7 +28,7 @@ pub fn resolve_guest(guest_kind: GuestKind, zkvm_kind: zkVMKind) -> Elf {
3728
ELF.entry((guest_kind, zkvm_kind))
3829
.or_insert_with(|| match guest_kind {
3930
GuestKind::Ethrex | GuestKind::Reth => compile_guest(guest_kind, zkvm_kind),
40-
GuestKind::Zesu | GuestKind::Nethermind => download_guest(guest_kind, zkvm_kind),
31+
GuestKind::Zesu => download_guest(guest_kind, zkvm_kind),
4132
})
4233
.clone()
4334
}
@@ -65,7 +56,6 @@ pub fn download_guest(guest_kind: GuestKind, zkvm_kind: zkVMKind) -> Elf {
6556
#[derive(Deserialize)]
6657
struct GuestSoure {
6758
url: String,
68-
archive_elf_path: Option<String>,
6959
}
7060

7161
let registry = {
@@ -84,27 +74,7 @@ pub fn download_guest(guest_kind: GuestKind, zkvm_kind: zkVMKind) -> Elf {
8474
.bytes()
8575
.unwrap()
8676
.to_vec();
87-
match &source.archive_elf_path {
88-
Some(archive_elf_path) => Elf(extract_elf_from_tar_gz(&bytes, archive_elf_path)),
89-
None => Elf(bytes),
90-
}
91-
}
92-
93-
/// Extracts the entry at `archive_elf_path` from a gzip-compressed tar archive.
94-
/// Some prebuilt guests, such as the nethermind ZisK release, distribute the ELF
95-
/// inside a `.tar.gz` under an extensionless name recorded as `archive_elf_path`
96-
/// in the registry.
97-
fn extract_elf_from_tar_gz(bytes: &[u8], archive_elf_path: &str) -> Vec<u8> {
98-
let mut archive = tar::Archive::new(flate2::read::GzDecoder::new(bytes));
99-
for entry in archive.entries().unwrap() {
100-
let mut entry = entry.unwrap();
101-
if entry.path().unwrap().as_ref() == Path::new(archive_elf_path) {
102-
let mut buf = Vec::new();
103-
entry.read_to_end(&mut buf).unwrap();
104-
return buf;
105-
}
106-
}
107-
panic!("{archive_elf_path} not found in archive")
77+
Elf(bytes)
10878
}
10979

11080
/// Initializes a CPU-backed zkVM for `elf`.
@@ -128,25 +98,6 @@ pub fn run_stateless_validator_execution(
12898
let elf = resolve_guest(guest_kind, zkvm_kind);
12999
let zkvm = init_zkvm(zkvm_kind, elf);
130100
run_execution(preset_fixtures(preset), &|input| {
131-
let input = match guest_kind {
132-
GuestKind::Nethermind => nethermind_input(input)?,
133-
_ => input,
134-
};
135101
Ok(zkvm.execute(&Input::new().with_stdin(input))?.0.to_vec())
136102
})
137103
}
138-
139-
/// Rewrites the schema prefix of `ElectraFulu` variant payload to `0x0000`.
140-
/// Reference: https://github.com/NethermindEth/nethermind/blob/zisk-guest-r7/src/Nethermind/Nethermind.Stateless.Executor/IO/InputDecoder.cs#L16-L23.
141-
fn nethermind_input(stateless_input_bytes: Vec<u8>) -> anyhow::Result<Vec<u8>> {
142-
let stateless_input = StatelessInput::from_schema_prefixed_ssz(&stateless_input_bytes)
143-
.map_err(|err| anyhow::anyhow!("decode stateless_input: {err:?}"))?;
144-
let schema_id = match &stateless_input.new_payload_request {
145-
NewPayloadRequest::ElectraFulu(_) => [0x00, 0x00],
146-
NewPayloadRequest::Gloas(_) => [0x00, 0x01],
147-
_ => anyhow::bail!("nethermind r7 supports only ElectraFulu (V3) and Gloas (V4) payloads"),
148-
};
149-
let mut stateless_input_bytes = stateless_input_bytes;
150-
stateless_input_bytes[0..2].copy_from_slice(&schema_id);
151-
Ok(stateless_input_bytes)
152-
}

crates/stateless-validator-test/tests/zkvm_execution.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,3 @@ declare_test!(Reth, Zisk, EestBalDevnet7, failures = 38);
7676
declare_test!(Zesu, Zisk, EestBalDevnet7, failures = 121);
7777
// Should be fixed by https://github.com/Consensys/zesu/pull/70.
7878
declare_test!(Zesu, Zisk, RpcGlamsterdamDevnet5, failures = 50);
79-
80-
// Nethermind
81-
82-
declare_test!(Nethermind, Zisk, RpcBpo2);
83-
declare_test!(Nethermind, Zisk, RpcGlamsterdamDevnet5);
84-
// Nethermind divergences + ZisK `zkvm-interface` impl bug.
85-
declare_test!(Nethermind, Zisk, EestBalDevnet7, failures = 614);

0 commit comments

Comments
 (0)