Skip to content

feat: integrate journal chain into node#146

Draft
Fraser999 wants to merge 1 commit into
mainfrom
fraser/eng-2015/add-journal-chain
Draft

feat: integrate journal chain into node#146
Fraser999 wants to merge 1 commit into
mainfrom
fraser/eng-2015/add-journal-chain

Conversation

@Fraser999
Copy link
Copy Markdown
Contributor

@Fraser999 Fraser999 commented May 20, 2026

Wires signet-journal-chain into SignetNode: every committed block is encoded as a Journal::V1, pushed into a store-less chain task, and streamed out over the new /journal WebSocket.

Blocked on https://github.com/init4tech/journal-service/pull/22. Stays in draft until that lands; the [patch.crates-io] entry will be removed from the workspace manifest at that point.

Summary

  • New JournalConfig in signet-node-config (env-var configurable; defaults 64 MiB / 200 entries / 100-journal subscriber lag).
  • SignetNode owns the chain handle, a bounded mpsc sender, and an in-memory rolling previous_journal_hash. Main loop uses tokio::select! to observe the chain ingestion task alongside host notifications.
  • signet-rpc serving layer takes an Option<JournalChainHandle>. When set, HTTP and WS transports merge journal_router and shut down via a shared CancellationToken with a 5s watchdog.

Follow-up (ENG-2017)

previous_journal_hash is in-memory only - not persisted, not rewound on revert. First journal after any restart or host revert is rejected by the chain. Ten reorg tests are #[ignore]d until this is fixed.

@Fraser999 Fraser999 requested a review from a team as a code owner May 20, 2026 15:05
Copy link
Copy Markdown
Contributor Author

Fraser999 commented May 20, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Fraser999 Fraser999 marked this pull request as draft May 20, 2026 15:07
@Fraser999 Fraser999 changed the title integrate journal chain into node feat: integrate journal chain into node May 20, 2026
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