Sigil documentation
ReferenceRust referencesigil-node

sigil-node · executor_dao

Source declarations, signatures and documentation for executor_dao.

Source: sigil/node/sigil-node/src/executor_dao.rs. SHA-256: 5fb53b93a7badced6af96dc9e66c28245afa6b85287dcfbb7a3c2c2f2c0eca79.

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.

Module condition:

#[cfg(feature = "dao-validators")]

executor_dao::DaoValidatorContext

Per-block bundle of GAL snapshots covering every protected transaction. Built async ahead of execution; consumed sync inside [crate::executor::execute_transaction].

The bundle is keyed by transaction hash so each protected tx looks up its own snapshot. There is no fallback to a "default" snapshot or to local checks; if a tx isn't covered, execution fails with [DaoValidatorError::Internal] mapped to a Failed receipt — the consensus layer that produced the block must populate the context for every protected tx in it.

#[cfg(feature = "dao-validators")]
#[derive(Debug, Clone, Default)]
pub struct DaoValidatorContext {

}

Source line: 72.

executor_dao::DaoValidatorContext::empty

Empty context. Protected transactions will fail closed.

#[cfg(feature = "dao-validators")]
pub fn empty() -> Self;

Source line: 79.

executor_dao::DaoValidatorContext::from_state

Build the production context directly from execution state.

This path is synchronous and deterministic: it reads the current DAO epoch/block, active mandates, labor contracts, and validator-agent registry from ExecutionState; it performs no resolver/GAL I/O and no wall-clock/RNG access. Tx-specific contexts built by for_transactions still override this default snapshot when supplied explicitly by proposer/validator tests.

#[cfg(feature = "dao-validators")]
pub fn from_state(state: &dyn ExecutionState) -> Result<Self, NodeError>;

Source line: 91.

executor_dao::DaoValidatorContext::for_transactions

Build a context covering every protected transaction in transactions. Async because it talks to the GAL.

verifier runs the full GAL trust path (Rules 1–7) per DID. gal provides raw revocation lookups for actor / counterparty. snapshot_block should equal the chain's current finalized block height at the time of snapshot construction; consensus replay must use the same value.

#[cfg(feature = "dao-validators")]
pub async fn for_transactions<V, G>(
        transactions: &[SignedTransaction],
        verifier: &V,
        gal: &G,
        snapshot_block: u64,
        state: &dyn ExecutionState,
    ) -> Result<Self, DaoValidatorError>
    where
        V: IssuerVerifier + ?Sized,
        G: SigilGalSource + ?Sized,;

Source line: 155.

executor_dao::DaoValidatorContext::snapshot_for

Look up the pre-built snapshot for a given transaction.

#[cfg(feature = "dao-validators")]
pub fn snapshot_for(&self, tx_hash: &SigilHash) -> Option<&GalSnapshot>;

Source line: 184.

executor_dao::DaoValidatorContext::len

Number of snapshots in the bundle (for diagnostics).

#[cfg(feature = "dao-validators")]
pub fn len(&self) -> usize;

Source line: 191.

executor_dao::DaoValidatorContext::is_empty

True if the bundle covers no transactions.

#[cfg(feature = "dao-validators")]
pub fn is_empty(&self) -> bool;

Source line: 196.

executor_dao::execute_record_mandate_spend

Execute RecordMandateSpend. Runs validate_mandate_spend first; only mutates state on success.

#[cfg(feature = "dao-validators")]
pub fn execute_record_mandate_spend(
    sender_did: &str,
    data: &RecordMandateSpendData,
    fee: u64,
    ctx: &DaoValidatorContext,
    tx_hash: &SigilHash,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 368.

executor_dao::execute_release_milestone_payment

Execute ReleaseMilestonePayment. Runs validate_labor_contract_release first; only mutates state on success (mark milestone Paid, increment mandate spent_amount).

#[cfg(feature = "dao-validators")]
pub fn execute_release_milestone_payment(
    sender_did: &str,
    data: &ReleaseMilestonePaymentData,
    fee: u64,
    ctx: &DaoValidatorContext,
    tx_hash: &SigilHash,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 471.

executor_dao::execute_revoke_mandate

Execute RevokeMandate. Runs validate_cascade_revoke against a synthetic RevocationRecord representing the in-flight revocation; only mutates state on success (mandate.status = Revoked).

#[cfg(feature = "dao-validators")]
pub fn execute_revoke_mandate(
    sender_did: &str,
    data: &RevokeMandateData,
    fee: u64,
    ctx: &DaoValidatorContext,
    tx_hash: &SigilHash,
    state: &dyn ExecutionState,
) -> Result<(u64, Vec<StateChange>, Vec<Event>), NodeError>;

Source line: 623.

executor_dao::dao_failure_minimum_gas

Minimum gas charged when execution of a protected tx fails.

#[cfg(feature = "dao-validators")]
pub const fn dao_failure_minimum_gas() -> u64;

Source line: 736.

executor_dao::GuardedResolverIssuerVerifier

IssuerVerifier adapter that runs the live GAL trust path through any oas_resolve::SigilGuardedResolver. This is the only adapter production builds use; tests inside this module use the same adapter wrapping a MemoryGalSource + InMemoryResolver pair.

#[cfg(feature = "dao-validators")]
pub struct GuardedResolverIssuerVerifier<R, G>
where
    R: oas_resolve::resolver::Resolver,
    G: SigilGalSource, {

}

Source line: 748.

executor_dao::GuardedResolverIssuerVerifier<R, G>::new

Wrap a fully-configured SigilGuardedResolver.

#[cfg(feature = "dao-validators")]
pub fn new(resolver: oas_resolve::SigilGuardedResolver<R, G>) -> Self;

Source line: 762.

On this page