Skip to content

feat: add state replicator crate on top of the engine - #25

Open
bmuddha wants to merge 1 commit into
enginefrom
replicator
Open

feat: add state replicator crate on top of the engine#25
bmuddha wants to merge 1 commit into
enginefrom
replicator

Conversation

@bmuddha

@bmuddha bmuddha commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

What changed

Added authenticated state replication over the engine, including a leader-side
TCP dispatcher, follower client, versioned protocol, snapshot fallback, and
full-stack replication coverage.

Why

Authorized followers need to resume from an exact durable cursor, catch up
without duplicate application, and recover from a snapshot when the requested
stream is no longer retained.

Closes #27.

Impact

  • Both sides sign time-bounded handshakes; dispatchers enforce a follower
    allowlist and clients verify the canonical engine authority.
  • Only nodes holding the canonical authority key can serve as relays;
    distinct-key followers are terminal.
  • The dispatcher streams retained blockstore bytes or the newest complete
    accountsdb snapshot after validating the requested cursor.
  • Transactions, resets, and seals flow through engine replay while block
    boundaries flow through the external pacer to preserve ordering.
  • Received snapshots are staged for restart, and reconnects use bounded retries.

Reviewer notes

The security boundary is the canonical signer plus follower allowlist. The
durability boundary requires a follower to flush before every handshake and to
flush its cursor before dumping volatile state during shutdown.

Follow-up

Transport encryption, key rotation, and dynamic allowlist management remain
outside this change.

@bmuddha
bmuddha force-pushed the engine branch 2 times, most recently from 525819d to 82f61e0 Compare July 15, 2026 19:59
@bmuddha
bmuddha force-pushed the engine branch 2 times, most recently from 5a1e1f0 to 9bdaec8 Compare July 21, 2026 08:51
@bmuddha
bmuddha force-pushed the replicator branch 2 times, most recently from 59811d3 to f9eeb4d Compare July 21, 2026 19:46
@bmuddha
bmuddha force-pushed the replicator branch 2 times, most recently from 55d60f6 to 1be4057 Compare July 22, 2026 20:30
@bmuddha
bmuddha force-pushed the engine branch 2 times, most recently from d900818 to 9b3afe1 Compare July 23, 2026 17:57
@bmuddha
bmuddha force-pushed the replicator branch 2 times, most recently from 996c13e to 80d6710 Compare July 23, 2026 18:53
@bmuddha
bmuddha force-pushed the engine branch 2 times, most recently from 088842b to d059e37 Compare July 23, 2026 19:21
@bmuddha
bmuddha force-pushed the replicator branch 2 times, most recently from 482523d to a16851e Compare July 27, 2026 13:19
@bmuddha
bmuddha marked this pull request as ready for review July 28, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant