Skip to main content

Module server

Module server 

Source
Expand description

Generic and production vote commitment tree servers.

GenericTreeServer is a single parameterised struct that backs both the production server (TreeServer, KV-backed) and the in-memory test/POC server. The only difference between the two is the shard store implementation they use.

SyncableServer wraps GenericTreeServer and adds per-block leaf tracking (blocks, pending_leaves, pending_start) needed to implement crate::sync_api::TreeSyncApi. This is a sync-protocol concern, not a tree concern, so it lives in a separate wrapper rather than on the core tree type. MemoryTreeServer is a convenience alias for SyncableServer<MemoryShardStore<…>>.

In production, TreeServer is backed by a KvShardStore so all shard reads/writes go directly to the Cosmos KV store through Go callbacks, giving ShardTree true lazy loading.

Structs§

GenericTreeServer
An append-only Poseidon Merkle tree server backed by any shardtree::store::ShardStore.
SyncableServer
A GenericTreeServer augmented with per-block leaf tracking for the crate::sync_api::TreeSyncApi.

Enums§

AppendFromKvError
Error returned by TreeServer::append_from_kv.
CheckpointError
Error returned by GenericTreeServer::checkpoint and SyncableServer::checkpoint.

Type Aliases§

MemoryTreeServer
In-memory vote commitment tree for tests and the POC helper server.
TreeServer
Production vote commitment tree backed by the Cosmos KV store.