Skip to content

wallet: clear message when the node's protocol is incompatible (#713) - #2143

Open
vsnation wants to merge 1 commit into
BeamMW:masterfrom
vsnation:fix/713-incompatible-node-message
Open

vsnation wants to merge 1 commit into
BeamMW:masterfrom
vsnation:fix/713-incompatible-node-message

Conversation

@vsnation

@vsnation vsnation commented Oct 6, 2026

Copy link
Copy Markdown

Fix: when the node rejects the wallet as incompatible (a protocol or consensus mismatch), the CLI and wallet-api say so and tell the user to update, instead of "please check your network" (CLI) or nothing (wallet-api).

Why: NodeProtocolIncompatible was only mapped to a message in the UI client. CliNodeConnection::OnConnectionFailed printed the generic Connection Failed - Please check your network, and wallet-api's NodeNetwork::OnConnectionFailed logged nothing (#713, CLI/API part; the UI part belongs to beam-ui).

How to see the bug (master, local only)

beam-node --port=31401 --TreasuryChecksum=0 &          # a node with different consensus rules
beam-wallet restore --pass=p --wallet_path=w.db --seed_phrase="abandon;abandon;abandon;abandon;abandon;abandon;abandon;abandon;abandon;abandon;abandon;about;"
beam-wallet listen --pass=p --wallet_path=w.db -n 127.0.0.1:31401
# master: "Connection Failed - Please check your network reason: Incompatible peer cfgs: …"
wallet-api --pass=p --wallet_path=w.db -n 127.0.0.1:31401 -p 10000
# master: nothing about it in the console or logs/api_*.log

Improvement

master this PR
beam-wallet listen Connection Failed - Please check your network reason: Incompatible peer cfgs: … The node uses an incompatible protocol version. If the network has been upgraded, please update your wallet to the latest version. reason: Incompatible peer cfgs: …
wallet-api (nothing logged) the same message
other connection failures generic message unchanged

"Incompatible" rather than "newer": the same error is raised for an older node ("Legacy"). The message repeats on reconnect attempts, like the old one.

Testing: both rows above, with master's and this branch's binaries against a local node with different consensus rules. Fork CI (running): https://github.com/vsnation/beam/actions/runs/37480560296

Fixes #713

…W#713)

When the node rejects the wallet's consensus config (Incompatible peer
cfgs / Legacy), the CLI said "Connection Failed - Please check your
network", pointing at the network, and wallet-api logged nothing. Map
the NodeProtocolIncompatible error (the same mapping the UI client
uses) to "The node uses an incompatible protocol version. If the network
has been upgraded, please update your wallet to the latest version." in
the CLI and in NodeNetwork (used by wallet-api). Other connection
failures keep the old message.
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.

Show upgrade notification if node protocol version is higher than wallet protocol version

1 participant