pub struct AvidMBadEncodingProof {
recovered_poly: Vec<<Keccak256Config as AvidMConfig>::BaseField>,
raw_shares: Vec<(usize, <<Keccak256Config as AvidMConfig>::MerkleTree as MerkleTreeScheme>::MembershipProof)>,
}
Expand description
A proof of incorrect encoding.
When the disperser is malicious, he can disperse an incorrectly encoded block, resulting in a merkle root of
a Merkle tree containing invalid share (i.e. inconsistent with shares from correctly encoded block). Disperser
would disperse them to all replicas with valid Merkle proof against this incorrect root, or else the replicas
won’t even vote if the merkle proof is wrong. By the time of reconstruction, replicas can come together with
at least threshold
shares to interpolate back the original block (in polynomial form), and by recomputing the
corresponding encoded block on this recovered polynomial, we can derive another merkle root of encoded shares.
If the merkle root matches the one dispersed earlier, then the encoding was correct.
If not, this mismatch can serve as a proof of incorrect encoding.
In short, the proof contains the recovered poly (from the received shares) and the merkle proofs (against the wrong root) being distributed by the malicious disperser.
Fields§
§recovered_poly: Vec<<Keccak256Config as AvidMConfig>::BaseField>
The recovered polynomial from VID shares.
The Merkle proofs against the original commitment.
Implementations§
Source§impl AvidMBadEncodingProof
impl AvidMBadEncodingProof
Sourcepub fn verify(
&self,
param: &AvidMParam,
commit: &AvidMCommit,
) -> Result<Result<(), ()>, VidError>
pub fn verify( &self, param: &AvidMParam, commit: &AvidMCommit, ) -> Result<Result<(), ()>, VidError>
Verify a proof of incorrect encoding
Trait Implementations§
Source§impl Clone for AvidMBadEncodingProof
impl Clone for AvidMBadEncodingProof
Source§fn clone(&self) -> AvidMBadEncodingProof
fn clone(&self) -> AvidMBadEncodingProof
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AvidMBadEncodingProof
impl Debug for AvidMBadEncodingProof
Source§impl<'de> Deserialize<'de> for AvidMBadEncodingProof
impl<'de> Deserialize<'de> for AvidMBadEncodingProof
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for AvidMBadEncodingProof
impl Hash for AvidMBadEncodingProof
Source§impl PartialEq for AvidMBadEncodingProof
impl PartialEq for AvidMBadEncodingProof
Source§impl Serialize for AvidMBadEncodingProof
impl Serialize for AvidMBadEncodingProof
impl Eq for AvidMBadEncodingProof
impl StructuralPartialEq for AvidMBadEncodingProof
Auto Trait Implementations§
impl Freeze for AvidMBadEncodingProof
impl RefUnwindSafe for AvidMBadEncodingProof
impl Send for AvidMBadEncodingProof
impl Sync for AvidMBadEncodingProof
impl Unpin for AvidMBadEncodingProof
impl UnwindSafe for AvidMBadEncodingProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more