Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.17.0"
version = "0.17.1"
edition = "2021"
rust-version = "1.87"
authors = ["init4"]
Expand Down Expand Up @@ -34,19 +34,19 @@ debug = false
incremental = false

[workspace.dependencies]
signet-bundle = { version = "0.17.0", path = "crates/bundle" }
signet-constants = { version = "0.17.0", path = "crates/constants" }
signet-evm = { version = "0.17.0", path = "crates/evm" }
signet-extract = { version = "0.17.0", path = "crates/extract" }
signet-journal = { version = "0.17.0", path = "crates/journal" }
signet-node = { version = "0.17.0", path = "crates/node" }
signet-orders = { version = "0.17.0", path = "crates/orders" }
signet-sim = { version = "0.17.0", path = "crates/sim" }
signet-types = { version = "0.17.0", path = "crates/types" }
signet-tx-cache = { version = "0.17.0", path = "crates/tx-cache" }
signet-zenith = { version = "0.17.0", path = "crates/zenith" }
signet-bundle = { version = "0.17.1", path = "crates/bundle" }
signet-constants = { version = "0.17.1", path = "crates/constants" }
signet-evm = { version = "0.17.1", path = "crates/evm" }
signet-extract = { version = "0.17.1", path = "crates/extract" }
signet-journal = { version = "0.17.1", path = "crates/journal" }
signet-node = { version = "0.17.1", path = "crates/node" }
signet-orders = { version = "0.17.1", path = "crates/orders" }
signet-sim = { version = "0.17.1", path = "crates/sim" }
signet-types = { version = "0.17.1", path = "crates/types" }
signet-tx-cache = { version = "0.17.1", path = "crates/tx-cache" }
signet-zenith = { version = "0.17.1", path = "crates/zenith" }

signet-test-utils = { version = "0.17.0", path = "crates/test-utils" }
signet-test-utils = { version = "0.17.1", path = "crates/test-utils" }

# trevm
trevm = { version = "0.34.2", features = ["full_env_cfg", "asyncdb"] }
Expand Down
14 changes: 14 additions & 0 deletions crates/types/src/primitives/header/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ use std::ops::Deref;
pub struct SignetHeaderV1(Sealed<Header>);

impl SignetHeaderV1 {
/// Construct a [`SignetHeaderV1`] without validating signet header invariants.
///
/// # Safety (logical)
///
/// The caller must ensure the header satisfies V1 invariants: all shared
/// fields at their defaults and both roots equal to [`EMPTY_ROOT_HASH`].
/// Passing an invalid header will not cause UB but will violate type-level
/// expectations that downstream code relies on.
///
/// [`EMPTY_ROOT_HASH`]: alloy::consensus::constants::EMPTY_ROOT_HASH
pub fn new_unchecked(header: Header) -> Self {
Self(Sealed::new(header))
}

/// Consume the wrapper, returning the inner [`Sealed<Header>`].
pub fn into_inner(self) -> Sealed<Header> {
self.0
Expand Down
14 changes: 14 additions & 0 deletions crates/types/src/primitives/header/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ pub struct SignetHeaderV2(Sealed<Header>);

#[allow(deprecated)]
impl SignetHeaderV2 {
/// Construct a [`SignetHeaderV2`] without validating signet header invariants.
///
/// # Safety (logical)
///
/// The caller must ensure the header satisfies V2 invariants: all shared
/// fields at their defaults and both roots **not** equal to
/// [`EMPTY_ROOT_HASH`]. Passing an invalid header will not cause UB but
/// will violate type-level expectations that downstream code relies on.
///
/// [`EMPTY_ROOT_HASH`]: alloy::consensus::constants::EMPTY_ROOT_HASH
pub fn new_unchecked(header: Header) -> Self {
Self(Sealed::new(header))
}

/// Consume the wrapper, returning the inner [`Sealed<Header>`].
pub fn into_inner(self) -> Sealed<Header> {
self.0
Expand Down