Repository navigation
chore(peering): recommend validators behind sentries (--reserved-only), document the sentry role of RPC nodes and never --reserved-only without a sentry - #12
Merged
Conversation
nol4lej
force-pushed
the
chore/validator-sentry-peering
branch
from
October 22, 2026 01:33
bc7f364 to
20211be
Compare
…), document the sentry role of RPC nodes and never --reserved-only without a sentry
nol4lej
force-pushed
the
chore/validator-sentry-peering
branch
from
October 22, 2026 01:35
20211be to
f8da12a
Compare
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
Recommend running validators behind sentries with
--reserved-only, and document how an RPC node acts as a validator's sentry.Private spends (
private_transfer,unshield) are unsigned, so a node verifies each one's Groth16 proof when it reaches the pool, about 1 ms of CPU per spend. A peer that sends spends with invalid proofs loses too little reputation per transaction to ever be banned. A validator open to any peer pays that verification cost for anyone who connects. Behind sentries, it only receives spends a sentry has already checked: invalid ones are refused at the sentry and never propagated.Changes
testnet/validator/.env.example,mainnet/validator/.env.exampleRESERVED_NODESrecommends--reserved-only --reserved-nodes <sentry>and says why.--reserved-onlywith no sentry listed, which isolates the node. Without a sentry, leave it empty and peer publicly.P2P_PORT: behind sentries, only their IPs need to reach it.testnet/rpc/.env.example,mainnet/rpc/.env.example: the sentry role. List the validator inRESERVED_NODESwithout--reserved-only, so the RPC node stays public.README.md(Validator): when to run behind sentries, both.envlines, and the firewall rule.docs/rpc-node.md:RESERVED_NODESin the.envtable.The compose files are unchanged; they already pass
${RESERVED_NODES}through.Rollout (per host, after merge)
.env:RESERVED_NODES=--reserved-only --reserved-nodes <sentry multiaddr> ..., listing every sentry plus any validator it peers with directly..env:RESERVED_NODES=--reserved-nodes <validator multiaddr>.docker compose up -don each host (notdocker restart, which keeps the old arguments).External validators need their own sentry for the same protection; without one they keep peering publicly.
Testing
python3 -m unittest tests/test_rpc_config.py: 4 tests pass.--reserved-onlywith one sentry; a public node; an outside node that only knows the validator):