a16z / helios

A fast, secure, and portable light client for Ethereum
MIT License
1.79k stars 268 forks source link

Crash when running with unimplemented light client APIs #199

Open robzajac opened 1 year ago

robzajac commented 1 year ago

I ran against a consensus node that does not have the light client APIs implemented and saw a crash of:

$ helios --execution-rpc https://eth-mainnet.g.alchemy.com/v2/xxxxx --consensus-rpc http://localhost:8551
[2023-02-22T17:49:00Z INFO  client::rpc] rpc server started at 127.0.0.1:8545
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/runner/work/helios/helios/client/src/client.rs:223:80
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

It might be a good place for a more informative error message (pointing the user towards choosing a node with the APIs enabled).

ncitron commented 1 year ago

This is a great idea. Thanks for opening this issue.