From 3edb23fc658973bc22f93139c61f191c90025f94 Mon Sep 17 00:00:00 2001 From: vedhavyas Date: Thu, 29 Feb 2024 21:07:51 +0530 Subject: [PATCH] introduce new version `execution_proof_check` --- .../src/runtime_interface.rs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/crates/sp-domains-fraud-proof/src/runtime_interface.rs b/crates/sp-domains-fraud-proof/src/runtime_interface.rs index 473c497824..46c2ad431a 100644 --- a/crates/sp-domains-fraud-proof/src/runtime_interface.rs +++ b/crates/sp-domains-fraud-proof/src/runtime_interface.rs @@ -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, + execution_method: &str, + call_data: &[u8], + domain_runtime_code: Vec, + ) -> Option> { + self.extension::() + .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),