-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changing default listen address for cometbft's RPC service to 0.0.0.0 #1029
Comments
Perhaps a better explanation is by example with Ethereum's beacon (consensus) chain mechanism for snapshot based sync. There are "checksum" providers like https://beaconstate.ethstaker.cc/ and several others listed at https://eth-clients.github.io/checkpoint-sync-endpoints/ which are publicly available to provide the "trusted" heights and hashes, which are used for validation of the actual snapshot sync process that uses P2P. Our system is similar, although our provider powers header verification as well as serving trusted heights+hashes. |
This may be safe. I am looking at the exposed comet endpoints and they don't include explicitly "unsafe" ones by default like Effective config written to # TCP or UNIX socket address for the gRPC server to listen on
# NOTE: This server only supports /broadcast_tx_commit
grpc_laddr = ""
# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool
unsafe = false So users won't be able to abuse websockets (I think) or use the "unsafe" endpoints. Here are the ones that are exposed:
Subscriptions, which are easily abused, supposedly only work if websocket is enabled (is it?).
Overall, my feeling is it is alright to expose, but I wish we could filter the endpoints. Last thing is that these are the REST endpoints, and the JSON-RPC service might have others not listed here. |
The only other concern is regarding private mode. If an RPC is in private mode, we need to disable access to the comet rpc, and probably do not want it at |
Taking a conservative stance, we have kept the default listen address of cometbft's RPC service to 127.0.0.1. When configuring a node to function as a trusted RPC provider from cometbft's header verification during statesync, it is necessary to expose this.
Note that it is NOT necessary for every snapshot provider to expose this however. The actual snapshot chunks are provided over P2P. This RPC provider is a special trusted provider for verifying block headers and providing trusted (checkpoint) heights+hashes. The intent as per cometbft is to point to something like "https://header-authority.networkx.org/" and have most or all nodes that wish to perform statesync use that.
However, in practice, Kwil users tend to need to expose the RPC service on every node that is creating snapshots. This is understandable, if not exactly the intended way to use the
chain.statesync.rpc_servers
setting.The text was updated successfully, but these errors were encountered: