Skip to content

Commit

Permalink
introduce new version execution_proof_check
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhavyas committed Feb 29, 2024
1 parent 3765fa4 commit 3edb23f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions crates/sp-domains-fraud-proof/src/runtime_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,30 @@ pub trait FraudProofRuntimeInterface {
}

/// Check the execution proof
// TODO: remove before the new network
#[version(1)]
fn execution_proof_check(
&mut self,
pre_state_root: H256,
encoded_proof: Vec<u8>,
execution_method: &str,
call_data: &[u8],
domain_runtime_code: Vec<u8>,
) -> Option<Vec<u8>> {
self.extension::<FraudProofExtension>()
.expect("No `FraudProofExtension` associated for the current context!")
.execution_proof_check(
(Default::default(), Default::default()),
pre_state_root,
encoded_proof,
execution_method,
call_data,
domain_runtime_code,
)
}

/// Check the execution proof with also included domain block id.
#[version(2)]
fn execution_proof_check(
&mut self,
domain_block_id: (BlockNumber, H256),
Expand Down

0 comments on commit 3edb23f

Please sign in to comment.