[hackathon] feat: add HostNotifier trait and decouple node from ExExContext#105
Draft
prestwich wants to merge 6 commits intorefactor/preparatory-genericsfrom
Draft
[hackathon] feat: add HostNotifier trait and decouple node from ExExContext#105prestwich wants to merge 6 commits intorefactor/preparatory-genericsfrom
prestwich wants to merge 6 commits intorefactor/preparatory-genericsfrom
Conversation
This was referenced Mar 13, 2026
4 tasks
fdae9f3 to
1654673
Compare
Introduces the signet-node-types crate containing HostNotification, HostNotificationKind, and the HostNotifier trait — the core abstraction layer for host chain events with no reth dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
signet-node is now reth-free. All host chain interaction flows through the HostNotifier trait from signet-node-types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add doc note that `None` means use backend default for `set_backfill_thresholds`, and add comment in node-config noting that RPC config merging moved to the host adapter crate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1654673 to
09aad33
Compare
…ight clamping Remove the introduced chain_name field from SignetNode and its builder. Add committed_chain/reverted_chain shortcuts on HostNotification to avoid reaching through .kind at call sites. Unify load_safe_block_heights and load_finalized_block_heights into a single clamp_host_heights method. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
[Claude Code] Code reviewFound 3 issues:
node-components/crates/node-tests/src/context.rs Lines 151 to 153 in 382521c node-components/crates/node-tests/tests/db.rs Lines 33 to 35 in 382521c
node-components/crates/node/src/alias.rs Lines 1 to 10 in 382521c
node-components/crates/node/src/node.rs Lines 186 to 192 in 382521c 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
- Add implementation guide and rustdoc examples to HostNotifier trait - Add rustdoc examples to HostNotification and HostNotificationKind - Add rustdoc example to SignetNodeBuilder - Use functional combinators in metrics (inspect over if/is_some) - Narrow visibility: on_notification, on_host_revert, start_rpc → pub(crate) - Enforce blob_cacher, serve_config, rpc_config at compile time via type-state builder params (removing runtime ok_or_eyre checks) - Document intentional snapshot semantics on HostNotification - Document unwrap_or(0) safety in on_host_revert Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
signet-node-typescrate withHostNotifiertrait,HostNotification, andHostNotificationKindtypes — no reth dependenciessignet-nodeto be generic overHostNotifierinstead of depending onExExContext<Host>directlysignet-node-config(RPC config moved to host-reth in follow-up PR)SignetNodeBuildernow accepts anyHostNotifierimplementationPR 2 of 5 in the host context adapter refactor.
Precursor: #104
Test plan
cargo clippy -p signet-node-types --all-features --all-targetscargo clippy -p signet-node --all-features --all-targetscargo clippy -p signet-node-config --all-features --all-targetscargo clippy -p signet-node-config --no-default-features --all-targetscargo +nightly fmt🤖 Generated with Claude Code