Skip to content

Commit

Permalink
Revert "Fault proof part 1 (risc0#824)" (risc0#902)
Browse files Browse the repository at this point in the history
This reverts commit 9fc1e65.
  • Loading branch information
flaub authored Sep 21, 2023
1 parent 9fc1e65 commit fe1d5f6
Show file tree
Hide file tree
Showing 30 changed files with 45 additions and 553 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ jobs:
- run: cargo test -F $FEATURE -F profiler
- run: cargo test --workspace -F $FEATURE --tests -- --ignored --test-threads 1
- run: cargo test -F $FEATURE -F disable-dev-mode -p risc0-r0vm
- run: cargo test -F $FEATURE -F enable-fault-proof -p risc0-zkvm -- tests::memory_io tests::memory_access
if: matrix.device == 'cpu'
- run: cargo check -F $FEATURE --benches
- run: cargo check -p risc0-build
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"Cargo.toml",
"bonsai/examples/governance/Cargo.toml",
"examples/Cargo.toml",
"risc0/fault/guest/Cargo.toml",
"risc0/zkvm/methods/guest/Cargo.toml",
"risc0/zkvm/methods/std/Cargo.toml"
]
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ members = [
"risc0/circuit/rv32im",
"risc0/circuit/rv32im-sys",
"risc0/core",
"risc0/fault",
"risc0/r0vm",
"risc0/sys",
"risc0/tools",
Expand Down
4 changes: 1 addition & 3 deletions bonsai/rest-api-mock/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ impl Prover {
anyhow::anyhow!("failed to build executor environment: {:?}", e)
})?;
let mut exec = Executor::new(env, mem_img)?;
let session = exec
.run()
.context("Executor failed to generate a successful session")?;
let session = exec.run()?;

let receipt = Receipt {
inner: InnerReceipt::Fake,
Expand Down
7 changes: 3 additions & 4 deletions bonsai/sdk/src/alpha.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ pub mod responses {
pub receipt_url: Option<String>,
/// Session Error message
///
/// If the session is not `RUNNING` or `SUCCEEDED`, this is the error
/// raised from within bonsai, otherwise it is [None].
/// If the session is not `RUNNING` or `SUCCEEDED`, this is the error raised from within bonsai,
/// otherwise it is [None].
pub error_msg: Option<String>,
/// Session Proving State
///
Expand Down Expand Up @@ -163,8 +163,7 @@ pub mod responses {
pub output: Option<SnarkReceipt>,
/// Snark Error message
///
/// If the SNARK status is not `RUNNING` or `SUCCEEDED`, this is the
/// error raised from within bonsai.
/// If the SNARK status is not `RUNNING` or `SUCCEEDED`, this is the error raised from within bonsai.
pub error_msg: Option<String>,
}
}
Expand Down
4 changes: 2 additions & 2 deletions risc0/cargo-risczero/src/commands/build_guest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,15 @@ mod test {
let tester = Tester::new("risc0/zkvm/methods/guest/Cargo.toml");
tester.compare_image_id(
"risc0_zkvm_methods_guest/multi_test",
"b01dfc8bfe0a8bc637a64b58e843fe9ebe0c11da300d4dbacbc8f92f61a5e986",
"c094a8253e33eefda14e0a3b96f192ab30d8f35cc640191cf0533e9371c8c74a",
);
tester.compare_image_id(
"risc0_zkvm_methods_guest/hello_commit",
"c7c399c25ecf26b79e987ed060efce1f0836a594ad1059b138b6ed2f123dad38",
);
tester.compare_image_id(
"risc0_zkvm_methods_guest/slice_io",
"a51a4b747f18b7e5f36a016bdd6f885e8293dbfca2759d6667a6df8edd5f2489",
"f5c6e9ed4296aff0db991f612794115010422465187a049ed72fb719ab94dcd9",
);
}
}
15 changes: 0 additions & 15 deletions risc0/fault/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion risc0/fault/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions risc0/fault/build.rs

This file was deleted.

10 changes: 0 additions & 10 deletions risc0/fault/guest/Cargo.toml

This file was deleted.

33 changes: 0 additions & 33 deletions risc0/fault/guest/src/bin/fault_checker.rs

This file was deleted.

18 changes: 0 additions & 18 deletions risc0/fault/src/lib.rs

This file was deleted.

8 changes: 0 additions & 8 deletions risc0/zkp/src/verify/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ pub enum VerificationError {
JournalDigestMismatch,
UnexpectedExitCode,
InvalidHashSuite,
FaultStateMismatch,
ValidFaultReceipt,
}

impl fmt::Debug for VerificationError {
Expand All @@ -68,12 +66,6 @@ impl fmt::Display for VerificationError {
}
VerificationError::UnexpectedExitCode => write!(f, "Unexpected exit_code"),
VerificationError::InvalidHashSuite => write!(f, "Invalid hash suite"),
VerificationError::FaultStateMismatch => {
write!(f, "Fault checker generated incorrect guest state")
}
VerificationError::ValidFaultReceipt => {
write!(f, "Receipt is a valid fault proof")
}
}
}
}
Expand Down
8 changes: 2 additions & 6 deletions risc0/zkvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
libm = "0.2"
risc0-zkp = { workspace = true }
risc0-zkvm-platform = { workspace = true }
rrs-lib = "0.1"
serde = { version = "1.0", default-features = false, features = [
"alloc",
"derive",
Expand Down Expand Up @@ -68,6 +67,7 @@ num-traits = { version = "0.2", default-features = false, optional = true }
prost = { version = "0.12", optional = true }
rand = { version = "0.8", optional = true }
rayon = { version = "1.5", optional = true }
rrs-lib = { version = "0.1", optional = true }
sha2 = { version = "0.10", optional = true }
tempfile = "3"
thiserror = { version = "1.0", optional = true }
Expand Down Expand Up @@ -106,7 +106,6 @@ dual = []
metal = ["prove", "risc0-circuit-rv32im/metal", "risc0-zkp/metal"]
default = ["client", "prove"]
disable-dev-mode = []
fault-proof = []
profiler = [
"dep:addr2line",
"dep:gimli",
Expand All @@ -116,7 +115,6 @@ profiler = [
]
prove = [
"client",
"fault-proof",
"dep:addr2line",
"dep:bincode",
"dep:bytes",
Expand All @@ -130,6 +128,7 @@ prove = [
"dep:protobuf-src",
"dep:rand",
"dep:rayon",
"dep:rrs-lib",
"dep:sha2",
"dep:thiserror",
"dep:typetag",
Expand All @@ -145,6 +144,3 @@ std = [
"risc0-zkp/std",
"serde/std",
]

# this is a temporary feature that will be removed after proof of fault becomes more stable
enable-fault-proof = []
17 changes: 0 additions & 17 deletions risc0/zkvm/methods/guest/Cargo.lock

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

Binary file removed risc0/zkvm/src/fault_checker.elf
Binary file not shown.
24 changes: 0 additions & 24 deletions risc0/zkvm/src/fault_ids.rs

This file was deleted.

76 changes: 0 additions & 76 deletions risc0/zkvm/src/fault_monitor.rs

This file was deleted.

Loading

0 comments on commit fe1d5f6

Please sign in to comment.