Skip to main content

Module sql

Module sql 

Source

Structsยง

ConsensusPruningOptions
Pruning parameters for ephemeral consensus storage.
DecidedLeaf ๐Ÿ”’
Options
Options for database-backed persistence, supporting both Postgres and SQLite.
Persistence
Postgres-backed persistence.
PostgresOptions
Options for Postgres-backed persistence.
PruningOptions
Pruning parameters.
SerializableRetryOptions
Configuration for retrying transactions aborted by PostgreSQL serialization conflicts (error 40001). Under SERIALIZABLE isolation these aborts are expected and safe to retry from scratch.
SqliteOptions

Enumsยง

DataMigration

Constantsยง

DECIDE_GAP_FILL_HORIZON ๐Ÿ”’
How far behind the newest persisted decide an out-of-order (โ€œgap-fillโ€) decide can still arrive. Mirrors DECIDE_BUFFER in hotshot-new-protocol; a leaf missing further behind the watermark than this will never be filled in by consensus.
PG_SERIALIZATION_FAILURE_CODE ๐Ÿ”’
PostgreSQL error code for serialization failures under SERIALIZABLE isolation. Transactions that fail with this code are safe to retry from scratch.
PRUNE_TABLES ๐Ÿ”’

Functionsยง

build_sqlite_path
decide_events_from_chain ๐Ÿ”’
deserialize_authenticated_validator_map ๐Ÿ”’
prune_to_view ๐Ÿ”’
within_gap_fill_horizon ๐Ÿ”’
Whether the height gap directly below the leaf at view can still be filled by a late decide: the missing view (at most view - 1) must be within DECIDE_GAP_FILL_HORIZON of watermark, the newest persisted decide.