-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add skeleton for proving blocks valid because valid successors
- Loading branch information
1 parent
99e8da6
commit a79bc42
Showing
3 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use crate::models::blockchain::block::BFieldCodec; | ||
use crate::models::blockchain::block::Deserialize; | ||
use crate::models::blockchain::block::GetSize; | ||
use crate::models::blockchain::block::Serialize; | ||
use crate::models::blockchain::shared::Hash; | ||
use crate::models::consensus::SecretWitness; | ||
use crate::models::consensus::SupportedClaim; | ||
use crate::triton_vm::program::Program; | ||
use tasm_lib::triton_vm::program::NonDeterminism; | ||
use tasm_lib::twenty_first::shared_math::b_field_element::BFieldElement; | ||
use tasm_lib::twenty_first::util_types::mmr::mmr_membership_proof::MmrMembershipProof; | ||
|
||
#[derive(Debug, Clone, BFieldCodec, GetSize, PartialEq, Eq, Serialize, Deserialize)] | ||
pub struct MmrMembershipWitness { | ||
pub membership_proof: MmrMembershipProof<Hash>, | ||
} | ||
|
||
impl SecretWitness for MmrMembershipWitness { | ||
fn nondeterminism(&self) -> NonDeterminism<BFieldElement> { | ||
todo!() | ||
} | ||
|
||
fn subprogram(&self) -> Program { | ||
todo!() | ||
} | ||
} | ||
|
||
#[derive(Debug, Clone, BFieldCodec, GetSize, PartialEq, Eq, Serialize, Deserialize)] | ||
pub struct MmrMembership { | ||
supported_claim: SupportedClaim<MmrMembershipWitness>, | ||
} |