Core (podseq-core)
podseq-core defines the shared types and the traits that every implementation
crate builds against. It also hosts the canonical BlockSigner implementation
(Ed25519BlockSigner) and the Commonware runtime bridge. Interfaces are stable;
any implementation can be swapped without touching consumers.
Types#
| Type | Meaning |
|---|---|
Hash |
32-byte hash identifying a block or header |
BlobId |
256-bit Walrus blob identifier (content-addressed) |
Header |
Sequencer-produced block header |
Block |
A header plus its committed transaction data |
Error |
Typed error enum shared across all crates |
Traits#
DataAvailability#
Posts and retrieves block data from the DA layer (Walrus). A single blob holds a
batch of blocks: one publish stores many blocks under one blob id, and a
fetch returns the whole batch. Callers locate a specific block by height.
pub trait DataAvailability: Send + Sync {
fn publish(&self, blocks: &[Block]) -> impl Future<Output = Result<BlobId, Error>> + Send;
fn fetch(&self, id: &BlobId) -> impl Future<Output = Result<Vec<Block>, Error>> + Send;
}Settlement#
Anchors a block and its blob commitment on the settlement layer (Sui). Called once per block (even when DA is batched) so each height maps to a blob id.
pub trait Settlement: Send + Sync {
fn commit(
&self,
block: &Block,
blob: &BlobId,
) -> impl Future<Output = Result<(), Error>> + Send;
}Async traits return impl Future + Send#
The sequencer runs methods on Tokio tasks that must be Send. Trait async fn does not
impose Send on the returned future, so the core desugars each method to
fn ... -> impl Future<...> + Send. Implementations may still use plain async fn.
Ed25519BlockSigner#
The reference BlockSigner implementation lives here, next to the trait. It
loads an ed25519 key from a suiprivkey file (Bech32 or raw base64) and signs
headers. See Block signing for the production / forced-inclusion
context.