nimbus-eth1/nimbus/rpc
Jamie Lokier 5ddfd7dd05
RPC: Calculate `eth_protocolVersion` from live protocol
In RPC `eth_protocolVersion`, look at the live `EthereumNode` to find which
version of `eth/NN` protocol is active, instead of trusting a compile-time
constant.  It's better to check dynamically.  GraphQL already does this.

As a result, the RPC code doesn't depend on `eth_protocol` any more.

To make sure there are no more accidental users of the old constant,
`protocolVersion` is no longer exported from `protocol_eth65`.

(The simplest way to support `eth/65` was to make `eth_protocolVersion` use
`protocol_eth65.protocolVersion`, to get 65.  But that's silly.  More
seriously, when we add another version (`eth/66`) running alongside `eth/65`,
that expression would still compile ok yet return the wrong value, while still
passing the RPC test suite.)

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-07-27 14:12:51 +01:00
..
common.nim implement "net_nodeInfo" rpc 2021-05-19 16:35:13 +07:00
debug.nim rlp: don't use ranges / experimental features (#495) 2020-04-20 20:12:44 +02:00
hexstrings.nim Whisper: Remove Whisper-specific hexstring/JSON/key storage support 2021-06-01 18:12:48 +01:00
key_storage.nim Whisper: Remove Whisper-specific hexstring/JSON/key storage support 2021-06-01 18:12:48 +01:00
p2p.nim RPC: Calculate `eth_protocolVersion` from live protocol 2021-07-27 14:12:51 +01:00
rpc_types.nim Whisper: Remove all the main Whisper code (config, startup, RPC etc) 2021-06-01 18:12:48 +01:00
rpc_utils.nim preparation for EIP-1559 implementation 2021-06-29 07:33:48 +07:00