Skip to content

bootstrap mode: ensure we bootstrap with a compatible daemon - #355

Draft
j-berman wants to merge 9 commits into
seraphis-migration:fcmp++-stagefrom
j-berman:bootstrap-check-hf
Draft

bootstrap mode: ensure we bootstrap with a compatible daemon#355
j-berman wants to merge 9 commits into
seraphis-migration:fcmp++-stagefrom
j-berman:bootstrap-check-hf

Conversation

@j-berman

@j-berman j-berman commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Builds on #363

I also think this PR would be a good logic change to get included upstream sooner rather than later to maximize its benefit for all GUI users.

Context

Both the GUI's Simple mode and Simple mode (bootstrapped) can serve RPC requests via a bootstrap daemon connection. The GUI spins up a live local daemon in the background, and then that local daemon connects to a bootstrap daemon to serve RPC requests.

The problem

It's possible (pretty likely) that the local daemon loses its connection to a bootsrap daemon at some point, and then the local daemon silently attempts to switch bootstrap connections in the background (via the switch_server_if_needed function). The follow-up bootstrap daemon connections may not be compatible with the GUI, but the end client (the GUI) ultimately won't know this. Once the fork passes, I expect this could cause some more annoying headaches from version compatibility issues.

The solution

When the local daemon makes a new bootstrap daemon connection, check that the bootstrap connection is compatible with the local daemon.

This assumes the local daemon the user is running is the same version as the one included with the GUI release, which I think is a fair assumption for the vast majority of noob default users.

@j-berman
j-berman force-pushed the bootstrap-check-hf branch from a448555 to f6ebd47 Compare May 5, 2026 18:59
Comment thread src/wallet/wallet2.cpp

const boost::lock_guard<boost::recursive_mutex> lock{m_daemon_rpc_mutex};
bool r = net_utils::invoke_http_json_rpc("/json_rpc", "on_get_block_hash", req, res, error, *m_http_client, rpc_timeout);
bool r = net_utils::invoke_http_json_rpc("/json_rpc", "getblockheaderbyheight", req, res, error, *m_http_client, rpc_timeout);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note we cannot use the on_get_block_hash RPC here because it doesn't support bootstrap daemons (the request/response structure isn't compatible)

Comment thread src/hardforks/hardforks.cpp Outdated
navidR and others added 2 commits May 6, 2026 16:49
    Implement new relay logic with threshold-based peer dropping, single-peer
    tx hash requests, per-connection in-flight limits with queuing, and
    multiindex-based request tracking. Consolidate add/remove request paths,
    pass tx hashes directly into send_txs/relay_txs, and add unit tests for
    the request manager.

    Co-authored-by: j-berman <justinberman@protonmail.com>
    Co-authored-by: Boog900 <boog900@tutanota.com>
Co-authored-by: jeffro256 <jeffro256@tutanota.com>
Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
Co-authored-by: Lee *!* Clagett <code@leeclagett.com>
Co-authored-by: SyntheticBird45 <someoneelse.is_on.github.rio7x@simplelogin.com>
Co-authored-by: jeetrex17 <jeetrex@tutamail.com>
Co-authored-by: UkoeHB <ukoehb@users.noreply.github.com>
jeffro256 and others added 4 commits May 6, 2026 22:22
* wallet: saner hf version validity check for FCMP++

* Revert optional args RPC

* Update src/wallet/wallet2.cpp

Co-authored-by: Jeffro <jeffro256@tutanota.com>

---------

Co-authored-by: Jeffro <jeffro256@tutanota.com>
@j-berman
j-berman marked this pull request as draft May 8, 2026 20:01
j-berman and others added 2 commits May 8, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants