celestia-node
celestia-node copied to clipboard
bug: "Error: node: failed to start: wrong network in core.ip endpoint, expected mocha-4, got celestia" is incorrect
Incorrect Network Mismatch Error Message
Current Behavior
When starting a light node without specifying --p2p.network mocha, but using a mocha RPC endpoint (--core.ip rpc-mocha.pops.one), the error message shows:
Error: node: failed to start: wrong network in core.ip endpoint, expected mocha-4, got celestia
Expected Behavior
The error message should be reversed to correctly reflect the expected vs actual network:
Error: node: failed to start: wrong network in core.ip endpoint, expected celestia, got mocha-4
Why This Needs Fixing
The current error message is confusing because:
- When
--p2p.networkis not provided, the node defaults to expecting the "celestia" network - The RPC endpoint (
rpc-mocha.pops.one) is actually on the mocha-4 network - Therefore, the error should indicate that we expected "celestia" (the default) but got "mocha-4" (from the endpoint)
Steps to Reproduce
- Start a light node with:
celestia light start --core.ip rpc-mocha.pops.one
- Observe incorrect error message
Additional Context
This appears to be a simple string swap in the error message construction, where the expected and actual network values are reversed.
on version
Semantic version: 0.18.2-mocha
Commit: 4309c8349857638b033a2a278da0f8ab182fdb26
Build Date: 2024-10-07T08:21:56Z
System version: arm64/darwin
Golang version: go1.23.2