Repository navigation
refactor(privval)!: remove the socket and gRPC remote signer - #1647
Conversation
Tenderdash now supports two private-validator backends: the file PV and the Dash Core signer. No Dash deployment uses the generic remote signer: dashmate renders an empty priv-validator.laddr and signs through core-rpc-host. Removed: the privval socket protocol (signer client/server, dialer and listener endpoints, socket dialers/listeners, the privval copy of the secret connection, the retry client, protocol messages), privval/grpc, cmd/priv_val_server, the proto/tendermint/privval package, the priv-validator laddr/TLS configuration and the --priv-validator-laddr flag, the gRPC branch of show-validator, the tcp/unix/grpc e2e privval modes and the remote signer documentation. P2P keeps its own secret connection in internal/p2p/conn. BREAKING CHANGE: a non-empty [priv-validator] laddr now fails configuration validation and node startup with an error pointing to core-rpc-host or the file PV. The client-certificate-file, client-key-file and root-ca-file keys are ignored. The tendermint.privval protobuf package and its PrivValidatorAPI gRPC service are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… environment TM_PRIV_VALIDATOR_LADDR was silently ignored once laddr left the config template, because viper only reads environment overrides for known keys. Bind it explicitly so ValidateBasic rejects it like a config.toml value. Also drop the unused Dash Core mock signer stub tied to the removed dialer endpoint, the stale privval.sock cleanup in the e2e entrypoints, and the signerEndpoint wording in RemoteSignerError. Co-Authored-By: Claude Opus 5.5 <[email protected]>
It has no callers and was built on the removed dialer endpoint; the e2e Dash Core mock lives in test/e2e/pkg/mockcoreserver. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
✅ Final review complete — no blockers (commit a19cce0) · triage: critical |
|
Ready for review — files with no dedicated owner: lklimek or shumkov. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The PR removes the socket and gRPC remote signer, updates configuration and runtime selection, and adjusts the related e2e and documentation paths. All build, test, lint, proto, and vulnerability checks are successful; the review and PR Hygiene checks remain pending.
🟡 3 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
2 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Generated full nodes using the file protocol fail startup without Dash Core RPC
Impact: A randomly generated full node that selects the file protocol receives no core-rpc-host and exits during startup before it can participate in the e2e network.
test/e2e/runner/setup.go:256-258
The generator assigns PrivvalProtocol to every node, including full nodes, and can choose file at test/e2e/generator/generate.go:313. MakeConfig sets CoreRPCHost only for dashcore, while node.makeNode rejects every full node whose host is empty because full-node light-client verification requires Dash Core. Set the host for full nodes independently of their signing protocol, or constrain generated full nodes to dashcore.
if node.Mode == e2e.ModeFull || node.PrivvalProtocol == e2e.ProtocolDashCore {
cfg.PrivValidator.CoreRPCHost = "127.0.0.1:19998"
}
source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.2-astra (phase2-reviewer: general)
🟡 Suggestion: The service-lifecycle audit still lists deleted signer services
Impact: Developers consulting the lifecycle audit are told that SignerServer and signer listener/dialer endpoints still exist, despite those components being removed by this PR.
docs/architecture/service-lifecycle.md:68
The cancellation compatibility table retains a row for SignerServer and signer listener/dialer endpoints, but the corresponding implementations and generic signer protocol were deleted. Remove this row or replace it with the lifecycle behavior of the remaining file-PV and Dash Core signer components.
source: muse-spark-1.3-contributor (phase1-reviewer: general); gpt-6.2-astra (phase2-reviewer: general)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-astra (agent: phase2-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.2-sol(effort low) — This is a large, cross-cutting removal that directly changes validator signing and key-handling behavior across privval, node startup, configuration, CLI, and wire/protocol definitions. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-astra— general (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `cmd/tenderdash/commands/show_validator.go`:
- [SUGGESTION] cmd/tenderdash/commands/show_validator.go:41-46: `show-validator` always prints `null` instead of the validator key
Impact: Any operator running `show-validator` with a valid file-based validator gets `null` with exit status 0 instead of the BLS public key.
The command validates the ProTxHash but never assigns `pubKey`; `jsontypes.Marshal` explicitly returns JSON `null` for a nil value without an error. After obtaining the first quorum hash, retrieve the corresponding public key and fail when no quorum key is available.
In `test/e2e/runner/setup.go`:
- [SUGGESTION] test/e2e/runner/setup.go:256-258: Generated full nodes using the file protocol fail startup without Dash Core RPC
Impact: A randomly generated full node that selects the file protocol receives no `core-rpc-host` and exits during startup before it can participate in the e2e network.
The generator assigns `PrivvalProtocol` to every node, including full nodes, and can choose `file` at `test/e2e/generator/generate.go:313`. `MakeConfig` sets `CoreRPCHost` only for `dashcore`, while `node.makeNode` rejects every full node whose host is empty because full-node light-client verification requires Dash Core. Set the host for full nodes independently of their signing protocol, or constrain generated full nodes to `dashcore`.
In `docs/architecture/service-lifecycle.md`:
- [SUGGESTION] docs/architecture/service-lifecycle.md:68: The service-lifecycle audit still lists deleted signer services
Impact: Developers consulting the lifecycle audit are told that `SignerServer` and signer listener/dialer endpoints still exist, despite those components being removed by this PR.
The cancellation compatibility table retains a row for `SignerServer` and signer listener/dialer endpoints, but the corresponding implementations and generic signer protocol were deleted. Remove this row or replace it with the lifecycle behavior of the remaining file-PV and Dash Core signer components.
| _, err = pv.GetProTxHash(ctx) | ||
| if err != nil { | ||
| return fmt.Errorf("can't get proTxHash: %w", err) | ||
| } | ||
|
|
||
| bz, err := jsontypes.Marshal(pubKey) |
There was a problem hiding this comment.
🟡 Suggestion: show-validator always prints null instead of the validator key
Impact: Any operator running show-validator with a valid file-based validator gets null with exit status 0 instead of the BLS public key.
The command validates the ProTxHash but never assigns pubKey; jsontypes.Marshal explicitly returns JSON null for a nil value without an error. After obtaining the first quorum hash, retrieve the corresponding public key and fail when no quorum key is available.
| _, err = pv.GetProTxHash(ctx) | |
| if err != nil { | |
| return fmt.Errorf("can't get proTxHash: %w", err) | |
| } | |
| bz, err := jsontypes.Marshal(pubKey) | |
| quorumHash, err := pv.GetFirstQuorumHash(ctx) | |
| if err != nil { | |
| return fmt.Errorf("can't get quorum hash: %w", err) | |
| } | |
| if quorumHash == nil { | |
| return fmt.Errorf("can't get pubkey: no quorum hash available") | |
| } | |
| pubKey, err = pv.GetPubKey(ctx, quorumHash) | |
| if err != nil { | |
| return fmt.Errorf("can't get pubkey: %w", err) | |
| } |
source: muse-spark-1.3-contributor (phase1-reviewer: general)
|
Policy satisfied — this can merge. |
TL;DR: Tenderdash now signs only with a local key file or through Dash Core. The generic remote signer (socket and gRPC) is removed, and a config that still selects it stops the node with a clear message.
User story
As a Dash node operator, I want Tenderdash to offer only the signing options Dash uses, so its configuration has no unused paths to misconfigure.
Scenario
Base flow
Actual behavior
Tenderdash still carries a third, generic remote-signer option with its own network protocols, settings, a separate server program and certificates. No Dash deployment uses it: dashmate always leaves it empty and signs through Dash Core.
Expected behavior
The remote-signer option is gone. A node configured with a key file or Dash Core works exactly as before. A node whose configuration still names a remote signer address does not start, and tells the operator to use Dash Core or the key file.
Detailed discussion
What was done
privval/grpc,cmd/priv_val_serverand theproto/tendermint/privvalpackage (PrivValidatorAPI);PrivValidatorConfiglosesladdr, the TLS file keys and their helpers; the toml template block and the--priv-validator-laddrflag are dropped.[priv-validator] laddrnow failsValidateBasic. The same check runs innode.NewandnewDefaultNode, andTM_PRIV_VALIDATOR_LADDRis bound explicitly so an environment override is rejected too.show-validatorloses its gRPC branch.fileanddashcoreprivval protocols remain.networks/ci.tomlmoves its tcp/grpc nodes todashcore, and the entrypoints stop cleaning a privval socket. CI's e2e networks (dashcore.toml,rotate.toml) already useddashcore.docs/nodes/remote-signer.mdis removed and references are updated (configuration, validators, node docs, proposer-liveness and alternative-flows spec).internal/p2p/conn(P2P's own secret connection).go-grpc-middlewareandgo-grpc-prometheusbecome unused and are dropped.Out of scope: any change to the Dash Core signer or the file PV.
Known limitations: none.
Testing
TestParseConfigRemovedRemoteSigner(empty, tcp, unix and grpc addresses in config.toml) andTestParseConfigRemovedRemoteSignerFromEnv(TM_PRIV_VALIDATOR_LADDR; it failed before the explicit env binding). Config and node tests cover the template and the startup rejection.go test -race -count=1passes for./privval/... ./config/ ./node/ ./cmd/tenderdash/... ./test/e2e/pkg/... ./test/e2e/generator/....go buildpasses for all packages.cmd/abcidumpwas excluded locally because it needs libpcap.go vetpasses on the changed packages, andmake lint(baseorigin/dev) reports only the local libpcap typecheck.make proto-lintpasses.make proto-check-breakingreports the intended removal oftendermint.privval.Breaking changes
[priv-validator] laddr(andTM_PRIV_VALIDATOR_LADDR) must be empty. A non-empty value fails config validation and node startup. Usecore-rpc-host(Dash Core) or the file PV.--priv-validator-laddrflag,cmd/priv_val_server, theprivval/grpcGo package, the socket signer types inprivvaland thetendermint.privvalprotobuf package with itsPrivValidatorAPIgRPC service are removed.Prior work
None found.
Attribution
🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code
PR Hygiene ·
a19cce0Makefile,book/SUMMARY.md,cmd/priv_val_server/main.goand 66 more) — approved by lklimekWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.