Skip to content

Commit

Permalink
Removes TautologyVerifier from public interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Aug 21, 2023
1 parent 8020fe2 commit ed1c912
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
14 changes: 0 additions & 14 deletions src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,17 +382,3 @@ impl Verifier for RequisiteVerifier {
Ok(())
}
}

/// Passes all inputs. Used to mark executables as unverified.
#[derive(Debug)]
pub struct TautologyVerifier {}
impl Verifier for TautologyVerifier {
fn verify(
_prog: &[u8],
_config: &Config,
_sbpf_version: &SBPFVersion,
_function_registry: &FunctionRegistry<usize>,
) -> std::result::Result<(), VerifierError> {
Ok(())
}
}
14 changes: 13 additions & 1 deletion tests/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use solana_rbpf::{
assembler::assemble,
ebpf,
elf::{Executable, FunctionRegistry, SBPFVersion},
verifier::{RequisiteVerifier, TautologyVerifier, Verifier, VerifierError},
verifier::{RequisiteVerifier, Verifier, VerifierError},
vm::{BuiltinProgram, Config, TestContextObject},
};
use std::sync::Arc;
Expand All @@ -40,6 +40,18 @@ pub enum VerifierTestError {
Rejected(String),
}

struct TautologyVerifier {}
impl Verifier for TautologyVerifier {
fn verify(
_prog: &[u8],
_config: &Config,
_sbpf_version: &SBPFVersion,
_function_registry: &FunctionRegistry<usize>,
) -> std::result::Result<(), VerifierError> {
Ok(())
}
}

struct ContradictionVerifier {}
impl Verifier for ContradictionVerifier {
fn verify(
Expand Down

0 comments on commit ed1c912

Please sign in to comment.