Sigil documentation
ReferenceRust referencesigil-state

sigil-state · partitions

Source declarations, signatures and documentation for partitions.

Source: sigil/node/sigil-state/src/partitions/mod.rs. SHA-256: 150d5ca65e23ccf2e8607c4e6ad656a0167491fc740eff22e1327b779959eb42.

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.

partitions::CONSENSUS

Well-known system partition names.

pub const CONSENSUS: &str;

Source line: 7.

partitions::STAKES

pub const STAKES: &str;

Source line: 8.

partitions::IDENTITY

pub const IDENTITY: &str;

Source line: 9.

partitions::MARS

pub const MARS: &str;

Source line: 10.

partitions::GOVERNANCE

pub const GOVERNANCE: &str;

Source line: 11.

partitions::COMPUTE

pub const COMPUTE: &str;

Source line: 12.

partitions::TOWER

Tower coordination chain state (validator registry, slots, committees, finality).

pub const TOWER: &str;

Source line: 14.

partitions::GAL

Global Anchor Layer state (MARS-S shard assignments, topology, root anchors).

pub const GAL: &str;

Source line: 16.

partitions::NOVA

Nova metaverse world state (parcel ownership, buildings, avatars, zones).

pub const NOVA: &str;

Source line: 18.

partitions::PartitionedState

Organization-partitioned state. Each partition is independent -- zero cross-partition contention thanks to [DashMap] sharded locking.

System partitions

  • consensus: validator set, epoch data
  • stakes: staking balances, delegations
  • identity: OAS identity state
  • mars: MARS anchoring state
  • governance: proposals, votes
  • compute: compute provider state
  • tower: Tower coordination chain state
  • gal: Global Anchor Layer (MARS-S sharding) state
  • nova: Nova metaverse world state

Organization partitions

Per-organization partitions are named org_{did} and created on demand.

#[derive(Debug)]
pub struct PartitionedState {

}

Source line: 39.

partitions::Partition

A single state partition backed by a [CommitmentTree].

#[derive(Debug, Clone)]
pub struct Partition {
pub name: String,
pub tree: CommitmentTree,
pub dirty: bool
}

Source line: 45.

partitions::PartitionedState::new

Create a new partitioned state with the well-known system partitions pre-created (empty).

pub fn new() -> Self;

Source line: 65.

partitions::PartitionedState::partition

Get or create a partition by name. Returns a mutable reference.

Organization partitions are created on-demand with the naming convention org_{did}.

pub fn partition(&self, name: &str) -> RefMut<'_, String, Partition>;

Source line: 79.

partitions::PartitionedState::insert

Insert a key-value pair into a specific partition.

pub fn insert(&self, partition: &str, key: &[u8], value: &[u8]);

Source line: 86.

partitions::PartitionedState::get

Get a value from a specific partition.

pub fn get(&self, partition: &str, key: &[u8]) -> Option<Vec<u8>>;

Source line: 93.

partitions::PartitionedState::delete

Delete a key from a specific partition.

pub fn delete(&self, partition: &str, key: &[u8]);

Source line: 99.

partitions::PartitionedState::partition_root

Get the root hash for a specific partition.

pub fn partition_root(&self, partition: &str) -> Option<[u8; 32]>;

Source line: 106.

partitions::PartitionedState::partition_names

List all partition names (sorted for determinism).

pub fn partition_names(&self) -> Vec<String>;

Source line: 112.

partitions::PartitionedState::has_partition

Check if a partition exists.

pub fn has_partition(&self, name: &str) -> bool;

Source line: 119.

partitions::PartitionedState::partition_count

Total number of partitions.

pub fn partition_count(&self) -> usize;

Source line: 124.

On this page