fix(p2p): honor configured transport timeouts - #48
Open
0xrukimedo wants to merge 1 commit into
Open
0xrukimedo wants to merge 1 commit into
0xrukimedo wants to merge 1 commit into
Conversation
Wire the configured TCP dial and per-phase handshake deadlines into the production transport. Reject non-positive values and test defaults, overrides, legacy timings, and stalled handshakes.
0xrukimedo
marked this pull request as ready for review
October 2, 2026 13:34
0xrukimedo
requested review from
marcello33
and
a balanced review from Copilot
October 2, 2026 13:34
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The configuration is correctly validated and wired, with focused tests covering defaults and runtime behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Wires configured P2P dial and handshake timeouts into production transport while preserving constructor defaults and validating configuration.
Changes:
- Adds transport timeout options and applies them during node setup.
- Rejects non-positive configured timeouts.
- Adds validation, wiring, default, and handshake-deadline tests.
| File | Description |
|---|---|
p2p/transport.go |
Adds dial and handshake timeout options. |
p2p/transport_timeouts_test.go |
Tests defaults, options, and handshake deadlines. |
node/setup.go |
Applies configured timeouts to the transport. |
node/transport_timeouts_test.go |
Verifies configuration wiring. |
config/config.go |
Validates positive timeout values. |
config/p2p_timeouts_test.go |
Tests timeout validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Author
|
@claude review |
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
Wire existing
handshake_timeoutanddial_timeoutconfig fields into the production P2P transport. They were previously ignored in favor of hard-coded 3s/1s deadlines. Reject non-positive values; retain direct-constructor defaults.No new config keys, dependency or wire-format changes. This enables timeout tuning, not faster gossip or guaranteed throughput.
Executed tests
-race; new validation, wiring and stalled-handshake tests passed 10 repeats.Rollout notes