BlockStore

org.sigilaris.node.jvm.runtime.block.BlockStore
See theBlockStore companion object
trait BlockStore[F[_], TxRef, ResultRef, Event] extends BlockQuery[F, TxRef, ResultRef, Event]

Mutable store for persisting and retrieving blocks, extending BlockQuery with write operations.

Type parameters

Event

event type

F

effect type

ResultRef

result reference type

TxRef

transaction reference type

Attributes

Companion
object
Source
Store.scala
Graph
Supertypes
trait BlockQuery[F, TxRef, ResultRef, Event]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def putBody(blockId: BlockId, body: BlockBody[TxRef, ResultRef, Event]): EitherT[F, BlockValidationFailure, Unit]

Stores a block body, optionally validating against an existing header.

Stores a block body, optionally validating against an existing header.

Split storage is allowed to receive a body before its header is available. When the header is already present, the write path rejects a mismatched bodyRoot immediately; otherwise getView remains the hydration-time integrity gate once both halves exist.

Value parameters

blockId

the block identifier to associate the body with

body

the block body to persist

Attributes

Returns

Right(()) on success, or Left(failure) on validation error

Source
Store.scala

Stores a block header and returns its computed BlockId.

Stores a block header and returns its computed BlockId.

Value parameters

header

the block header to persist

Attributes

Returns

Right(blockId) after versioned-commitment validation, or Left(failure) without mutating the store

Source
Store.scala
def putView(view: BlockView[TxRef, ResultRef, Event]): EitherT[F, BlockValidationFailure, BlockId]

Validates and stores a complete block view (header + body) atomically.

Validates and stores a complete block view (header + body) atomically.

Value parameters

view

the block view to persist

Attributes

Returns

Right(blockId) on success, or Left(failure) on validation error

Source
Store.scala

Inherited and Abstract methods

def getBody(blockId: BlockId): F[Option[BlockBody[TxRef, ResultRef, Event]]]

Retrieves a block body by the block identifier.

Retrieves a block body by the block identifier.

Value parameters

blockId

the block identifier to look up

Attributes

Returns

Some(body) if found, None otherwise

Inherited from:
BlockQuery
Source
Store.scala
def getHeader(blockId: BlockId): F[Option[BlockHeader]]

Retrieves a block header by its identifier.

Retrieves a block header by its identifier.

Value parameters

blockId

the block identifier to look up

Attributes

Returns

Some(header) if found, None otherwise

Inherited from:
BlockQuery
Source
Store.scala
def getView(blockId: BlockId): EitherT[F, BlockValidationFailure, Option[BlockView[TxRef, ResultRef, Event]]]

Retrieves and validates a combined block view (header + body).

Retrieves and validates a combined block view (header + body).

Value parameters

blockId

the block identifier to look up

Attributes

Returns

Right(Some(view)) if both parts exist and are valid, Right(None) if either part is missing, or Left(failure) if validation fails

Inherited from:
BlockQuery
Source
Store.scala