#[repr(u8)]pub enum PixSuite {
BabyJubJub = 0,
Secp256k1 = 1,
}Expand description
The elliptic curve a PIX deployment instantiates PixSpec over.
Every curve-sized field in the PIX handshake — each coefficient commitment, the commitment proof
of knowledge — is sized by this choice, while the messages carrying them are versioned only by
StartProtocol’s own version byte. Two peers built for different curves therefore agree on the
protocol version and disagree on where every element boundary falls, so this rides in
PixParams to make the disagreement visible in the one field whose size does not depend on
the curve, before either side interprets one that does.
It is not negotiated. The Exit accepts or refuses what the Entry offers; see
PixSpec::PIX_SUITE.
Variants§
BabyJubJub = 0
Baby JubJub, the production default (pix-bjj).
Zero so that a word packed before this field existed decodes as the curve those builds
overwhelmingly ran. See PixParams::try_from_u32.
Secp256k1 = 1
secp256k1, giving Ethereum-shaped deposit addresses (pix-secp256k1).
Implementations§
Source§impl PixSuite
impl PixSuite
Sourcepub const fn try_from_bits(bits: u8) -> Result<Self, InvalidPixParams>
pub const fn try_from_bits(bits: u8) -> Result<Self, InvalidPixParams>
Decodes the two-bit wire form, rejecting the two values no curve claims.
Trait Implementations§
impl Copy for PixSuite
impl Eq for PixSuite
impl StructuralPartialEq for PixSuite
Auto Trait Implementations§
impl Freeze for PixSuite
impl RefUnwindSafe for PixSuite
impl Send for PixSuite
impl Sync for PixSuite
impl Unpin for PixSuite
impl UnsafeUnpin for PixSuite
impl UnwindSafe for PixSuite
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
key and return true if they are equal.§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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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