Skip to main content

IntelAction

Enum IntelAction 

Source
pub enum IntelAction {
    SubnetRegister {
        schema: Vec<u8>,
        tier: u8,
        gas_limit: u64,
    },
    NeuronRegister {
        subnet_id: u32,
        role: u8,
        hotkey: Vec<u8>,
        bond: u64,
        gas_limit: u64,
    },
    SetWeightsCommit {
        subnet_id: u32,
        commit: [u8; 32],
        gas_limit: u64,
    },
    SetWeightsReveal {
        subnet_id: u32,
        uids: Vec<u32>,
        weights: Vec<u32>,
        nonce: [u8; 32],
        gas_limit: u64,
    },
    NeuronClaim {
        gas_limit: u64,
    },
    NeuronDeregister {
        subnet_id: u32,
        uid: u32,
        gas_limit: u64,
    },
    ValidationProof {
        subnet_id: u32,
        beacon_ack: [u8; 32],
        gas_limit: u64,
    },
}
Expand description

A Blockle VM action carried by a transaction. Gas is prepaid: consensus requires fee >= gas_limit * gas_price, whether or not execution succeeds or uses less. Blockle Intelligence actions (height-gated at ChainParams::intel_activation_height; see docs/BLOCKLE-INTELLIGENCE.md §3). Wrapped in ContractAction::Intel so they ride the existing contract-action rails (fees, gas, refunds) without touching base-tx rules. Additive: old nodes decode the unknown tag as malformed, so these are inherently a height-activated fork — rejected below H_INTEL, accepted at/above it.

Variants§

§

SubnetRegister

Register a subnet (a task market). tier = verifiability tier (0 checkable, 1 redundant/reference, 2 subjective). schema describes the task.

Fields

§schema: Vec<u8>
§tier: u8
§gas_limit: u64
§

NeuronRegister

Register a neuron (miner role=0 / validator role=1) in a subnet, locking a bond of BLOCK (from inputs; recoverable later via Unbond). hotkey is the serving/identity key.

Fields

§subnet_id: u32
§role: u8
§hotkey: Vec<u8>
§bond: u64
§gas_limit: u64
§

SetWeightsCommit

Validator commits a hash of its weight vector for the epoch (commit-reveal §5.4).

Fields

§subnet_id: u32
§commit: [u8; 32]
§gas_limit: u64
§

SetWeightsReveal

Validator reveals the weights committed last epoch. uids are miner UIDs and weights the matching fixed-point weights (0..1_000_000). The reveal is accepted only if sha256(canonical(uids,weights) ‖ nonce) equals the stored commit.

Fields

§subnet_id: u32
§uids: Vec<u32>
§weights: Vec<u32>
§nonce: [u8; 32]
§gas_limit: u64
§

NeuronClaim

Pay out the sender’s accrued intelligence emission to a new BLOCK output.

Fields

§gas_limit: u64
§

NeuronDeregister

Deregister (unbond) a neuron the sender owns, identified by (subnet_id, uid). The remaining (post-slash) bond is refunded to the owner and the neuron is retired. Height-gated separately (not active until the unbond height) and subject to a one-epoch cooldown after registration so a validator cannot register, vote, and flee within a single epoch.

Fields

§subnet_id: u32
§uid: u32
§gas_limit: u64
§

ValidationProof

Proof-of-validation (liveness): a validator acknowledges the current epoch’s in-node beacon (beacon_ack must equal it), proving it is live against fresh, unpredictable randomness. Validators that reveal weights but skip this each epoch are excluded from emission and have their bond slashed.

Fields

§subnet_id: u32
§beacon_ack: [u8; 32]
§gas_limit: u64

Implementations§

Source§

impl IntelAction

Source

pub fn gas_limit(&self) -> u64

Source

pub fn value(&self) -> u64

BLOCK moved from inputs into locked state (the neuron bond). Weight/claim actions move no BLOCK in (claim pays OUT via a payout).

Trait Implementations§

Source§

impl Clone for IntelAction

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IntelAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for IntelAction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for IntelAction

Source§

impl PartialEq for IntelAction

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for IntelAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for IntelAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.