Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation Inputs wiring #2604

Merged
merged 38 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2a40398
Support simpler capture and replay of ValidatorInputs
eljobe Aug 7, 2024
7113c52
Fix the deserialization of the UserWasm data
eljobe Aug 7, 2024
f424256
Print the End global state
eljobe Aug 7, 2024
3eed9bf
Remove two calls to recordBlock
eljobe Aug 7, 2024
0e49165
Merge branch 'master' into inputs-wiring
eljobe Aug 8, 2024
ec7a386
A few small changes bundled together in here.
eljobe Aug 8, 2024
e52eda4
Merge branch 'master' into inputs-wiring
eljobe Aug 9, 2024
457267e
Merge branch 'master' into inputs-wiring
eljobe Aug 12, 2024
2c540cf
Merge branch 'master' into inputs-wiring
eljobe Aug 14, 2024
95c6024
Merge branch 'master' into inputs-wiring
eljobe Aug 15, 2024
d379969
Merge branch 'master' into inputs-wiring
eljobe Aug 20, 2024
e9bf293
Use the strongly-typed rawdb.Target
eljobe Aug 20, 2024
e547683
Merge branch 'master' into inputs-wiring
eljobe Aug 22, 2024
39cd0a7
Finish wiring the json file writing everywhere.
eljobe Aug 22, 2024
20b6790
Merge branch 'master' into inputs-wiring
eljobe Aug 22, 2024
1a353b2
Add a hacky sleep
eljobe Aug 23, 2024
1056e22
Merge branch 'master' into inputs-wiring
eljobe Aug 29, 2024
25af47f
Ensure the inbox tracker has the desired message.
eljobe Aug 29, 2024
e0d70e6
Remove commented out code.
eljobe Aug 29, 2024
bc25dde
Separate the writer for validaiton inputs from the json.
eljobe Aug 29, 2024
62498a9
Merge branch 'master' into inputs-wiring
eljobe Aug 29, 2024
2f98f82
Merge branch 'master' into inputs-wiring
joshuacolvin0 Aug 30, 2024
9bca417
Merge branch 'master' into inputs-wiring
eljobe Aug 30, 2024
2f2c31c
Merge branch 'master' into inputs-wiring
eljobe Aug 31, 2024
37d4307
Merge branch 'master' into inputs-wiring
eljobe Sep 3, 2024
3042894
Merge branch 'master' into inputs-wiring
eljobe Sep 4, 2024
8faa8d3
Merge branch 'master' into inputs-wiring
eljobe Sep 6, 2024
984a7f1
Fix broken imports of ethdb and rawdb
eljobe Sep 18, 2024
646e6ad
Merge branch 'master' into inputs-wiring
eljobe Sep 18, 2024
c45d80f
Update Cargo.lock
eljobe Sep 18, 2024
f9e6eea
Address review feedback
eljobe Sep 18, 2024
9f0fff0
Merge branch 'master' into inputs-wiring
eljobe Sep 18, 2024
614d631
Remove commented out implementation.
eljobe Sep 18, 2024
f9bcefb
Merge branch 'master' into inputs-wiring
eljobe Sep 23, 2024
faed5a9
Merge branch 'master' into inputs-wiring
eljobe Sep 25, 2024
e20d793
Merge branch 'master' into inputs-wiring
eljobe Sep 28, 2024
c550c7e
Switch to funcional options for the inputs.Writer
eljobe Sep 28, 2024
ea47d46
Fix two last instances of system-specific paths
eljobe Sep 28, 2024
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
78 changes: 7 additions & 71 deletions arbitrator/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions arbitrator/arbutil/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::{
borrow::Borrow,
fmt,
ops::{Deref, DerefMut},
str::FromStr,
};

// These values must be kept in sync with `arbutil/preimage_type.go`,
Expand Down Expand Up @@ -83,6 +84,21 @@ impl From<usize> for Bytes32 {
}
}

impl FromStr for Bytes32 {
type Err = hex::FromHexError;

fn from_str(s: &str) -> Result<Self, Self::Err> {
let trimmed = match s.strip_prefix("0x") {
Some(t) => t,
None => s,
};
let bytes = hex::decode(trimmed)?;
let mut b = [0u8; 32];
b.copy_from_slice(&bytes);
eljobe marked this conversation as resolved.
Show resolved Hide resolved
Ok(Self(b))
}
}

impl TryFrom<&[u8]> for Bytes32 {
type Error = std::array::TryFromSliceError;

Expand Down
5 changes: 0 additions & 5 deletions arbitrator/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name = "bench"
version = "0.1.0"
edition = "2021"

[lib]
name = "bench"
path = "src/lib.rs"

[[bin]]
name = "benchbin"
path = "src/bin.rs"
Expand All @@ -20,7 +16,6 @@ clap = { version = "4.4.8", features = ["derive"] }
gperftools = { version = "0.2.0", optional = true }
serde = { version = "1.0.130", features = ["derive", "rc"] }
serde_json = "1.0.67"
serde_with = { version = "3.8.1", features = ["base64"] }

[features]
counters = []
Expand Down
6 changes: 3 additions & 3 deletions arbitrator/bench/src/bin.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{path::PathBuf, time::Duration};

use bench::prepare::*;
use clap::Parser;
use eyre::bail;

Expand All @@ -10,11 +9,12 @@ use gperftools::profiler::PROFILER;
#[cfg(feature = "heapprof")]
use gperftools::heap_profiler::HEAP_PROFILER;

use prover::machine::MachineStatus;

#[cfg(feature = "counters")]
use prover::{machine, memory, merkle};

use prover::machine::MachineStatus;
use prover::prepare::prepare_machine;

#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Args {
Expand Down
2 changes: 0 additions & 2 deletions arbitrator/bench/src/lib.rs

This file was deleted.

76 changes: 0 additions & 76 deletions arbitrator/bench/src/parse_input.rs

This file was deleted.

2 changes: 1 addition & 1 deletion arbitrator/prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ num = "0.4"
rustc-demangle = "0.1.21"
serde = { version = "1.0.130", features = ["derive", "rc"] }
serde_json = "1.0.67"
serde_with = { version = "3.8.1", features = ["base64"] }
sha3 = "0.9.1"
static_assertions = "1.1.0"
structopt = "0.3.23"
serde_with = "1.12.1"
parking_lot = "0.12.1"
lazy_static.workspace = true
itertools = "0.10.5"
Expand Down
2 changes: 2 additions & 0 deletions arbitrator/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pub mod machine;
/// cbindgen:ignore
pub mod memory;
pub mod merkle;
pub mod parse_input;
pub mod prepare;
mod print;
pub mod programs;
mod reinterpret;
Expand Down
Loading
Loading