eth
eth is the public facade crate for a no_std-first Ethereum
execution-layer protocol workspace.
The crate is intentionally conservative at 0.3.0: it provides explicit
Ethereum primitive domains, bounded decode-budget policy, small first-party
crate boundaries, optional sanitization support, and release evidence before
RPC, signer, EVM, Reth, or P2P integrations become real dependencies.
Current Status
The current release candidate is 0.3.0.
Implemented now:
no_stdfacade with small first-party support crates.- Ethereum domain newtypes for chain, block, gas, nonce, timestamp, address, hash, wei, and transaction type values.
- Constant-time equality composition for fixed-width hash and wei values.
- Bounded decode limits plus stateful cumulative allocation accounting.
- Optional sanitization bridge and derive macros outside the default feature set.
- Release gates for formatting, clippy, tests, packaging, MSRV compatibility, dependency policy, audit, SBOM, and pentest evidence.
Not implemented yet:
- No RPC transport.
- No signer or local key storage.
- No EVM execution adapter.
- No Reth or P2P integration.
- No transaction or block parser yet.
Trust Dashboard
| Area | Status |
|---|---|
| License | EUPL-1.2 |
| MSRV | Rust 1.90.0 |
| Latest verified stable | Rust 1.96.0 |
| Default target | no_std |
| Default features | protocol-core only |
| Default networking/signing | none |
| Unsafe policy | first-party crates use #![forbid(unsafe_code)] |
| Release evidence | local gates, cargo-deny, cargo-audit, SBOM, pentest report |
Install
[]
= "0.3"
Disable defaults explicitly for embedded or freestanding builds:
[]
= { = "0.3", = false }
Optional sanitization support:
[]
= { = "0.3", = ["sanitization"] }
Features
| Feature | Default | Purpose |
|---|---|---|
std |
no | Enables std support in admitted core crates. |
evm |
no | Future explicit EVM adapter boundary. |
rpc |
no | Future explicit RPC trust-policy boundary. |
sanitization |
no | Re-exports optional secret sanitization bridge APIs. |
signer |
no | Future signer isolation boundary. |
reth |
no | Future Reth integration boundary. |
testkit |
no | Test fixtures, conformance helpers, and adversarial inputs. |
Default builds do not enable networking, signing, local key storage, Reth, P2P, or EVM execution.
Primitive Domains
Use explicit Ethereum domains instead of unqualified integers and byte arrays:
use ;
let chain = new;
let block = new;
let gas = new;
let nonce = new;
let address = from;
let hash = B256from;
let value = from_u128;
let tx_type = try_new_typed;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Legacy transactions are not typed EIP-2718 envelopes. Use
TransactionType::LEGACY for APIs that need a legacy domain value, and
try_new_typed for type bytes that will be encoded as typed envelopes.
Constant-Time Composition
B256::ct_eq and Wei::ct_eq return subtle::Choice so compound checks can
use & and | without short-circuiting:
use B256;
let block_hash = B256from;
let expected_block_hash = B256from;
let receipts_root = B256from;
let expected_receipts_root = B256from;
let valid = block_hash.ct_eq
& receipts_root.ct_eq;
assert!;
Convert Choice to bool only at the final trust boundary.
Decode Budgets
Every future untrusted decoder is required to use explicit limits. Use
DecodeAccumulator when more than one allocation can occur:
use ;
let limits = DecodeLimits ;
assert_eq!;
let mut budget = limits.accumulator;
assert_eq!;
assert_eq!;
assert_eq!;
Optional Sanitization
The main facade stays small by default. Applications that handle local secret material can opt into the sanitization bridge:
use ;
let mut key = from_array;
key.secure_sanitize;
assert!;
For derive macros, depend on the support crate directly:
[]
= { = "0.3", = ["derive"] }
Support Crates
Most users should depend on eth. The eth-valkyoth-* crates are published so
the workspace can keep small, auditable boundaries:
| Crate | Default | Purpose |
|---|---|---|
eth-valkyoth-primitives |
yes | Chain, block, gas, nonce, address, hash, wei, and transaction type domains. |
eth-valkyoth-codec |
yes | Bounded exact-consumption wire decoding policy. |
eth-valkyoth-protocol |
yes | Fork-aware validation states and protocol context. |
eth-valkyoth-verify |
yes | Verification boundaries for signatures, proofs, and replay domains. |
eth-valkyoth-sanitization |
no | Optional bridge to the sanitization crate. |
eth-valkyoth-derive |
no | Optional sanitization derive macros. |
eth-valkyoth-evm |
no | Future EVM adapter boundary. |
eth-valkyoth-rpc |
no | Future RPC trust-policy boundary. |
eth-valkyoth-signer |
no | Future signer isolation boundary. |
eth-valkyoth-reth |
no | Future Reth integration boundary. |
eth-valkyoth-testkit |
no | Future fixtures and conformance helpers. |
Rust Version Support
The minimum supported Rust version is Rust 1.90.0. New deployments should use
the latest stable Rust verified by the release gates.
Compatibility evidence for 0.3.0:
| Rust | Local Evidence |
|---|---|
1.90.0 |
cargo check --workspace --all-features |
1.91.0 |
cargo check --workspace --all-features |
1.92.0 |
cargo check --workspace --all-features |
1.93.0 |
cargo check --workspace --all-features |
1.94.0 |
cargo check --workspace --all-features |
1.95.0 |
cargo check --workspace --all-features |
1.96.0 |
full release gate |
License
Licensed under the European Union Public Licence 1.2.