Sigil documentation
ReferenceRust referencesigil-node

sigil-node · admission

Source declarations, signatures and documentation for admission.

Source: sigil/node/sigil-node/src/admission.rs. SHA-256: 538ddd68a7841720c7bb7a69dc963e026f45d41371f3525cb0ff087d5b3b115a.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

admission::AdmissionRejectReason

Stable, bounded transaction rejection reasons shared across RPC, mempool, consensus, and executor prechecks.

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AdmissionRejectReason {
    ChainId,
    Signature,
    SignerPolicy,
    Replay,
    Nonce,
    GasBounds,
    Hash,
}

Source line: 14.

admission::NoncePolicy

How a state-backed admission call should compare the submitted nonce to the current account nonce.

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum NoncePolicy {
    /// Require `tx.nonce == state_nonce`; used by the executor and proposal
    /// validation because they are final safety boundaries.
    Exact,
    /// Require `tx.nonce >= state_nonce`; used by RPC/mempool admission so a
    /// sender can queue future nonces while stale nonces still fail closed.
    AtLeastCurrent,
    /// Skip nonce lookup. This is only for stateless transports/tests.
    Skip,
}

Source line: 27.

admission::PrecheckContext

Shared admission/precheck configuration.

#[derive(Debug, Clone, Copy)]
pub struct PrecheckContext<'a> {

}

Source line: 40.

admission::PrecheckContext<'a>::new

pub fn new(expected_chain_id: &'a str) -> Self;

Source line: 49.

admission::PrecheckContext<'a>::unbound

pub fn unbound() -> Self;

Source line: 59.

admission::PrecheckContext<'a>::with_tx_index

pub fn with_tx_index(mut self, tx_index: u32) -> Self;

Source line: 69.

admission::PrecheckContext<'a>::with_max_tx_gas

pub fn with_max_tx_gas(mut self, max_tx_gas: u64) -> Self;

Source line: 74.

admission::PrecheckContext<'a>::with_min_gas_price

pub fn with_min_gas_price(mut self, min_gas_price: u64) -> Self;

Source line: 79.

admission::PrecheckContext<'a>::with_nonce_policy

pub fn with_nonce_policy(mut self, nonce_policy: NoncePolicy) -> Self;

Source line: 84.

admission::AdmissionReject

Detailed rejection object. The public reason is stable; the message keeps enough context for logs and JSON-RPC errors without leaking signature-oracle detail.

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct AdmissionReject {

}

Source line: 94.

admission::AdmissionReject::reason

pub fn reason(&self) -> AdmissionRejectReason;

Source line: 107.

admission::AdmissionReject::public_message

pub fn public_message(&self) -> &str;

Source line: 111.

admission::AdmissionReject::rpc_error_code

pub fn rpc_error_code(&self) -> i32;

Source line: 115.

admission::AdmissionReject::into_node_error

pub fn into_node_error(self, partial_receipts: Vec<Receipt>) -> NodeError;

Source line: 122.

admission::precheck_transaction

Run the shared transaction admission checks. Passing state enables replay and nonce checks according to ctx.nonce_policy; passing None still checks chain ID, signature, signer policy, hashability, and gas bounds.

pub fn precheck_transaction(
    tx: &SignedTransaction,
    state: Option<&dyn ExecutionState>,
    ctx: PrecheckContext<'_>,
) -> Result<SigilHash, AdmissionReject>;

Source line: 398.

On this page