Page MenuHomePhabricator

[seeder] Make unreliable node reasons clear and consistent
ClosedPublic

Authored by PiRK on Jul 18 2024, 10:21.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC2c02a0dcb3a9: [seeder] Make unreliable node reasons clear and consistent
Summary

This is a partial backport of bchn#1820
https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/merge_requests/1820/diffs?commit_id=8f435c20698488125a5f4d3759f81237acebff93

Note that I don't like the work reliableness, and reliability is already used in this codebase for another concept, so I went for ReliabilityStatus

Depends on D16905

Test Plan

run the seeder before and after this change, confirm that we get a similar number of good nodes (check for no regression)

ninja bitcoin-seeder check-seeder
src/seeder/bitcoin-seeder -dumpinterval=60

After a few minutes

awk '{ if ($2 == 1) { print } }' dnsseed.dump

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jul 18 2024, 10:21
PiRK retitled this revision from Make unreliable node reasons clear and consistent to Seeder: Make unreliable node reasons clear and consistent.Jul 18 2024, 10:22
PiRK planned changes to this revision.Jul 18 2024, 12:50

the change in how dnsseed.dump is written (int(rep.fGood) vs rep.reliabilityStatus == ReliabilityStatus::OK ? 1 : 0) is initially wrong, because it seems to me reliabilityStatus is not actually initialized before the second time we connect to the node. Still investigating.

PiRK retitled this revision from Seeder: Make unreliable node reasons clear and consistent to [seeder] Make unreliable node reasons clear and consistent.
PiRK edited the summary of this revision. (Show Details)
PiRK edited the test plan for this revision. (Show Details)

rebase

This revision is now accepted and ready to land.Oct 14 2024, 19:13