Open jcstein opened 1 month ago
The way to resolve this is to do a Status
check to the core endpoint over RPC and the chain ID would be contained in the response.
(but keep in mind, this endpoint exists only over RPC so it would need to be implemented in gRPC by @celestiaorg/celestia-core as we only communicate via gRPC to core when it's for state-related queries).
Actually, I stand corrected. There's a gRPC endpoint for it already so should be very easy to implement on Start
of core accessor:
ChainID == Network here (resp.DefaultNodeInfo.Network)
How do you think it’s best to retrieve the network type on which the node is running within core_access.go
?
In this example, how would you retrieve celestia
?
I am working on this.
cc: @jcstein, @renaynay
Celestia Node version
v0.14.0
OS
macos
Install tools
docs for v0.14.0
Others
No response
Steps to reproduce it
run light node on mainnet with mocha core.ip endpoint
Expected result
some kind of failure, e.g.
WRONG NETWORK PROVIDED IN CORE.IP URL
Actual result
see logs below or in warp https://app.warp.dev/block/PMZu7uBSX6vMLrs8xzQveH
Relevant log output
Suggested fix
The DA node shouldn't start after it checks consensus RPC and receives a different chain ID. It shoulod error accordingly and fail to start node.
Notes
The log
2024-07-25T14:35:51.081-0400 ERROR state state/core_access.go:355 balance for account celestia1j6ppzj5e3xkz8d22ys4qyz55ddwtxttu6np72y does not exist at block height 1970740
only makes it appear that the account is not funded.