Listen to p2p network without using a temp server - #2861
Open
abitmore wants to merge 12 commits into
Open
Conversation
This partially reverts commit 8db58de ("Update tests to get around race conditions in code"): the changes in tests were reversed but the comments in code remain unchanged.
A failing test in CI said this, and only this:
unknown location(0): fatal error: in "authority_tests/proposal_delete": unknown type
"unknown type" is not a diagnosis. It is the literal string Boost.Test prints from its
catch-all in execution_monitor.ipp when an exception reaches it that is neither a
std::exception nor any type it knows. fc::exception derives from nothing at all, so every
fc exception that escapes a test case lands there and is reported identically -- no code,
no message, no location.
Worse, the exception's own text is never written anywhere, so it cannot be recovered from
the log afterwards. Checked: the fourteen lines preceding the failure are plugin-shutdown
logging and nothing else. No amount of extra log capture in the workflow would have
produced the message, because the message never existed.
That made the report actively misleading rather than merely thin. Running the same test
binaries locally produced the identical line from a completely unrelated cause -- no
Elasticsearch listening on 9200 -- which is how it became clear the string carries no
information about what actually went wrong.
Registering a translator turns it into fc's detail string. Verified against the
Elasticsearch case, where the cause was already known, so the new output could be checked
for being right rather than merely different:
es->check_status(): ES database is not up in url http://127.0.0.1:9200/
{"url":"http://127.0.0.1:9200/"}
th_a elasticsearch_plugin.cpp:544 init_program_options
rethrow
{}
th_a database_fixture.hpp:651 init
The header is included by all five test binaries, so all of them gain it. One cost worth
naming: Boost now reports the failure at the translator's own line rather than
"unknown location(0)". The real site is in the fc chain underneath, which is more than was
there before.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
abitmore
force-pushed
the
p2p-listen-fix
branch
from
September 11, 2026 17:42
c5f8a50 to
7144328
Compare
17 tasks
abitmore
force-pushed
the
p2p-listen-fix
branch
from
September 14, 2026 02:36
1d92300 to
4439e95
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.
PR for #2834 (unstably reproduces with test cases in #2862).
Main changes:
set_reuse_address()functions in FC, do not setSO_REUSEPORT(see Update set_reuse_address bitshares-fc#260).node_impl::listen_to_p2p_network(), no longer use the "bind without SO_REUSEADDR to check port availability/close/set SO_REUSEADDR/bind for real" mode, instead use the "set SO_REUSEADDR/bind and retain" mode.