Skip to content

sentinel: add multicast publisher worker#3428

Merged
snormore merged 3 commits intomainfrom
snor/sentinel-solana-rpc-validator-list
Apr 2, 2026
Merged

sentinel: add multicast publisher worker#3428
snormore merged 3 commits intomainfrom
snor/sentinel-solana-rpc-validator-list

Conversation

@snormore
Copy link
Copy Markdown
Contributor

@snormore snormore commented Apr 1, 2026

Summary of Changes

  • Add the sentinel binary with a multicast publisher worker that polls for IBRL validators and automatically creates multicast publisher users onchain
  • Validators are discovered via Solana RPC (getVoteAccounts + getClusterNodes) rather than the validator metadata API
  • When --client-filter is set, the validator metadata service enriches with software client info; enrichment failure errors rather than returning unfiltered data
  • Includes retryable RPC error handling with exponential backoff and Prometheus metrics
  • Makes --is-publisher and --not-publisher mutually exclusive on the admin find command

This worker will be used as a library from the offchain repo sentinel instance. An e2e test in this repo will follow in a subsequent PR.

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 3 +702 / -0 +702
Scaffolding 3 +120 / -0 +120
Tests +518 / -0 +518
Config/build 2 +51 / -0 +51

~35% test code; core logic is the poll cycle, Solana RPC reader, and RPC retry/error handling.

Key files (click to expand)
  • crates/sentinel/src/multicast_publisher.rs — sentinel poll loop, ValidatorListReader trait, SolanaRpcValidatorListReader (Solana RPC impl), DZ ledger client for user fetch + publisher creation, metadata enrichment for client filtering
  • crates/sentinel/src/error.rsSentinelError type, retryable RPC error classification, rpc_with_retry with exponential backoff
  • crates/sentinel/src/settings.rs — CLI args (--solana-rpc, --client-filter, --validator-metadata-url, --multicast-group-pubkeys)
  • crates/sentinel/src/main.rs — binary entry point, metrics exporter, graceful shutdown
  • crates/sentinel/src/lib.rs — module registration (error, multicast_publisher, settings)
  • crates/sentinel/Cargo.toml — new dependencies (metrics, tracing, backon, tokio-util, url)

Testing Verification

  • 37 unit tests passing covering: candidate selection, stake-based sorting, client filtering, enrichment error propagation, multi-group independence, creation error resilience, IBRLWithAllocatedIP user type
  • cargo clippy and cargo +nightly fmt clean

@snormore snormore changed the title sentinel: add multicast publisher worker with Solana RPC validator listing sentinel: add multicast publisher worker Apr 1, 2026
@snormore snormore force-pushed the snor/sentinel-solana-rpc-validator-list branch from 44d8b82 to afa9c99 Compare April 1, 2026 13:33
@snormore snormore marked this pull request as ready for review April 1, 2026 13:42
snormore added 2 commits April 1, 2026 15:26
…sting

Add the sentinel binary with a multicast publisher worker that
automatically creates multicast publisher users for IBRL validators.

Validators are discovered via Solana RPC (getVoteAccounts +
getClusterNodes). When --client-filter is set, the validator metadata
service is used to enrich with software client info for filtering;
enrichment failure is treated as an error rather than silently returning
unfiltered data.
@snormore snormore force-pushed the snor/sentinel-solana-rpc-validator-list branch from afa9c99 to 3b9725a Compare April 1, 2026 19:26
@snormore snormore enabled auto-merge (squash) April 1, 2026 22:06
@snormore snormore merged commit dcce482 into main Apr 2, 2026
40 of 41 checks passed
@snormore snormore deleted the snor/sentinel-solana-rpc-validator-list branch April 2, 2026 04:33
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.

2 participants