org.sigilaris.core.application.state
Members list
Type members
Classlikes
Access log for tracking transaction reads and writes.
Access log for tracking transaction reads and writes.
Phase 8: AccessLog accumulates all read and write operations performed by a transaction, enabling efficient conflict detection between concurrent transactions.
The log maps table identifiers (byte prefixes) to sets of accessed keys (full byte keys including prefix). This byte-level approach ensures correct conflict detection across different table types.
ADR-0009 Phase 8 requirements:
- Store table identifier (path + table name encoded as bytes)
- Store accessed keys (full key bytes including table prefix)
- Support conflict detection predicates (W∩W, R∩W)
- Provide size control options for memory management
Value parameters
- reads
-
map from table prefix to set of read key bytes
- writes
-
map from table prefix to set of written key bytes
Attributes
- Companion
- object
- Source
- AccessLog.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Source
- AccessLog.scala
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AccessLog.type
Schema entry defining a table's name and key-value types.
Schema entry defining a table's name and key-value types.
This is both a compile-time marker for type-level schema definitions and a runtime value that can create StateTable instances.
Each Entry requires ByteCodec instances for both key and value types.
Type parameters
- K
-
the key type
- Name
-
the table name (literal String type)
- V
-
the value type
Attributes
- Companion
- object
- Source
- StateTypes.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- StateTypes.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Entry.type
Attributes
- Source
- StateTypes.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
KeyOf.type
State table providing key-value storage with compile-time key safety.
State table providing key-value storage with compile-time key safety.
A StateTable is path-independent - it knows only its schema (name, key type, value type, and codecs). The actual storage location (path/prefix) is determined when the table is mounted into a module.
Key safety is enforced via instance branding: keys are branded with the table's singleton type (self.type), preventing keys from different tables from being mixed at compile time with zero runtime overhead.
Type parameters
- F
-
the effect type
Attributes
- Companion
- object
- Source
- StateTable.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
StateTable[F]
Attributes
- Companion
- trait
- Source
- StateTable.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
StateTable.type
Attributes
- Source
- StateTypes.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
StoreF.type
Combined state for blockchain storage and access logging.
Combined state for blockchain storage and access logging.
Phase 8: Extends MerkleTrieState with AccessLog to track all read/write operations performed during transaction execution.
Value parameters
- accessLog
-
the accumulated access log
- trieState
-
the Merkle trie state
Attributes
- Companion
- object
- Source
- StateTypes.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Source
- StateTypes.scala
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
StoreState.type
Types
Effect type for blockchain operations.
Effect type for blockchain operations.
Wraps an underlying effect F with error handling via EitherT.
Type parameters
- F
-
the base effect type
Attributes
- Source
- StateTypes.scala
Type alias for a single-entry schema tuple.
Type alias for a single-entry schema tuple.
Simplifies common pattern Entry["name", K, V] *: EmptyTuple to EntryTuple["name", K, V].
Type parameters
- K
-
the key type
- N
-
the table name
- V
-
the value type
Attributes
- Source
- Tables.scala
Zero-cost key branding to prevent keys from different tables being mixed.
Zero-cost key branding to prevent keys from different tables being mixed.
Brand is typically the table instance's singleton type (self.type), ensuring compile-time safety with no runtime overhead.
Type parameters
- A
-
the underlying key type
- Brand
-
the phantom type used for branding (usually table instance type)
Attributes
- Source
- StateTypes.scala
Type alias for a single-element string tuple.
Type alias for a single-element string tuple.
Simplifies common pattern "name" *: EmptyTuple to Path["name"].
Type parameters
- S
-
the string literal type
Attributes
- Source
- Tables.scala
Type alias for a two-element string tuple.
Type alias for a two-element string tuple.
Simplifies common pattern "s1" *: "s2" *: EmptyTuple to Path2["s1", "s2"].
Type parameters
- S1
-
the first string literal type
- S2
-
the second string literal type
Attributes
- Source
- Tables.scala
State effect type for blockchain storage operations.
State effect type for blockchain storage operations.
Phase 8 update: Now operates over StoreState (MerkleTrieState + AccessLog) instead of just MerkleTrieState, enabling automatic access logging and conflict detection.
Type parameters
- F
-
the base effect type
Attributes
- Source
- StateTypes.scala
Type-level mapping from an Entry to its corresponding StateTable type.
Type-level mapping from an Entry to its corresponding StateTable type.
This match type converts schema entries (Entry[Name, K, V]) into their runtime StateTable implementations with matching type parameters.
Type parameters
- E
-
the entry type
- F
-
the effect type
Attributes
- Source
- Tables.scala
Type-level mapping from a schema tuple to a tuple of StateTables.
Type-level mapping from a schema tuple to a tuple of StateTables.
Applies TableOf to each entry in the schema tuple, producing a tuple of corresponding StateTable instances.
Example:
type Schema = (Entry["users", String, User], Entry["posts", String, Post])
type Result = Tables[IO, Schema]
// Result = (StateTable[IO]{Name="users", K=String, V=User},
// StateTable[IO]{Name="posts", K=String, V=Post})
Type parameters
- F
-
the effect type
- Schema
-
the schema tuple (tuple of Entry types)
Attributes
- Source
- Tables.scala