fix: Guard mnauth by local masternode service#4974
fix: Guard mnauth by local masternode service#4974UdjinM6 wants to merge 2 commits intodashpay:developfrom
Conversation
|
I'm pretty sure I'd like some tests on this one please :) |
|
I can test it on testnet, just get me a build. |
You should be able to download it from CI build artefacts e.g. https://gitlab.com/dashpay/dash/-/jobs/2893007730/artifacts/browse/build-ci/dashcore-linux64/src/dashd for |
|
404 on that link, I am guessing because the build failed, I will check back later. |
oh, sorry, my bad |
|
What about nodes that uses local addresses to bind? Local IP that is translated 1:1 to public? There are certain DMZ setup or other cases when nodes are running like that. EDIT: of course externalip is set to public ip |
|
My test will be on a node whose P2P is port forwarded into the VM, so I assume the |
|
Just for clarity, I'm asking for functional tests |
|
I tested this fix first with my Masternode configured for TOR, I then checked on a node with and |
bc12135 to
eddd6bc
Compare
|
@PastaPastaPasta @UdjinM6 Are we planning to merge this at some point? It's still assigned to the 18.2 milestone |
|
I'm not sure... I'd really like to see a functional test on this, but if we let it sit this long w/o adding a test we may have to wait a very long time before Udjin or I decide to write the test. That makes me inclined to be okay merging it. Any thoughts Udjin? |
eddd6bc to
46ee326
Compare
|
I'm not sure how to make it testable cause local addresses aren't passed via EDIT: @kxcd could you test the new version on your nodes pls? |
46ee326 to
4ddda42
Compare
|
This pull request has conflicts, please rebase. |
|
Is it still relevant? Can it be merged without tests? |
❌ Backport Verification - Not ApplicableThis PR is not a Bitcoin backport - it contains Dash-specific functionality and should not be processed by the backport verification system. Original Bitcoin commit: (none - Dash-specific change) Analysis:
Recommendation: Note: If this PR was incorrectly labeled as a backport, please remove any backport-related labels and process it as a native Dash enhancement. |
4ddda42 to
4de3119
Compare
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
4de3119 to
e8e8767
Compare
mnauth to peers that are connected to the address registered in DMLCo-authored-by: OpenAI Codex <codex@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
e8e8767 to
20c6139
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis pull request modifies the masternode authentication flow to add service address validation for inbound peer connections. The change in Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Clean mnauth service guard implementation. The new check correctly compares the accepted socket local endpoint (peer.addrBind) against the active masternode registered service, properly handling multi-homed inbound connections. Functional test covers both the expected-service and alternate-bind paths for v1/v2 transport.
Reviewed commit: 20c6139
PastaPastaPasta
left a comment
There was a problem hiding this comment.
MNList now supports multiple core p2p addresses, we should acknowledge that here and use that.
|
✅ Review complete (commit 20c6139) |
That's true for MNList but masternodes themselves are single-address today - see |
A node can be bound to multiple addresses. Send
mnauthto nodes connected to the right address only to avoid confusion.Thanks @kxcd 👍