nimbus-eth1/nimbus/rpc
Jamie Lokier 8bda81496a
RPC: Move EVM-calling function estimateGas to rpcEstimateGas
`estimateGas` used by JSON-RPC is another way to setup and call the EVM,
also used by GraphQL.  Move it to `transaction/call_evm`.

This function has too much direct knowledge of details that shouldn't be used
outside transaction handling code, details we need to change when changing the
db and transaction memory layer.

Moving this one exposed quite a bit of abstraction leakage, as it calls
directly to the hexary trie db around `processTransaction`.

It looks like the _intended_ functionality of `estimateGas` is similar to
`rpcDoCall` with the only real difference being to not store the final state.
It looks like the extra stuff in `estimateGas` compared with `doCall` is a
messy workaround for computation not exposing the right API ("don't save final
state") for RPC to use.

Signed-off-by: Jamie Lokier <jamie@shareable.org>
2021-05-03 10:59:10 +01:00
..
common.nim implement web3, net, and some eth namespace rpc 2020-07-22 23:57:55 +07:00
debug.nim rlp: don't use ranges / experimental features (#495) 2020-04-20 20:12:44 +02:00
hexstrings.nim implement more eth rpc 2020-07-30 14:21:11 +07:00
key_storage.nim Move WhisperKeys to KeyStorage 2020-01-23 12:39:36 +02:00
p2p.nim RPC: Move EVM-calling function estimateGas to rpcEstimateGas 2021-05-03 10:59:10 +01:00
rpc_types.nim implement more eth rpc 2020-07-30 14:21:11 +07:00
rpc_utils.nim RPC: Move EVM-calling function estimateGas to rpcEstimateGas 2021-05-03 10:59:10 +01:00
whisper.nim fix compilation error following breaking changes in nim-eth 2020-07-20 13:50:05 +07:00