This PR adds the ability to pass `input` instead of `data` in
`eth_call`.
Go-ethereum has support for the `input`-attribute (instead of the
`data`) in `eth_call` for some time. The recent go-ethereum release
v1.13.0 changed the ethclient to do a `eth_call` with the `input`
attribute rather than "data". This makes the latest go-ethereum
ethclient incompatible with erigon.
Co-authored-by: lmittmann <lmittmann@users.noreply.github.com>
types.NewMessage now expects maxFeePerDataGas param, which will be used
in transaction verification (preCheck). GetPayloadV3 method added to
EngineAPI. Some cosmetic changes applied.
Pre-Shanghai blocks should have `nil` withdrawals, while post-Shanghai
blocks should have non-nil withdrawals (empty or non-empty slice, but
not `nil`). Judging from Issue #6976, that's not always a case. PR #7279
attempted to fix the issue, but unfortunately it only masks the root
cause.
This reverts commit c60a6a2962.
This PR contains very small EIP-4844 additions. GasPool is modified and
now it is a struct with 2 fields "gas" and "dataGas" (blobs are priced
in dataGas). ExcessDataGas block header field added. ExcessDataGas
needed to compute the data gas price. EIP-4844 helper functions are
added as well.
This PR starts with a few small commits of code cleanup. Reviewed
separately they should hopefully obviously be functionally no-ops. I'm
happy to strip these out and submit them separately if desired.
The final commit is to add support for older blocks as a parameter to
eth_getProof. In order to compute proofs, the function leverages the
staged sync unwinding code to bring the hashed state table back to its
historic state, as well as to build a list of trie nodes which need to
be invalidated/re-computed in the trie computation. Because these
operations could be expensive for very old blocks, it limits the
distance proofs are allowed from the head. It also adds some additional
checks for correctness, as well as tests which verify the
implementation.
This was discussed a bit on Discord in the db-format topic.
---------
Co-authored-by: Jason Yellick <jason@enya.ai>
Moved some of the tracers to `eth/tracers/logger` to make it more
similar to go-ethereum.
Removed Erigon-specific `Capture-` functions
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
impacted API:
eth_getTransactionByHash()
eth_getTransactionByNumber()
eth_getTransactionByBlockHashAndIndex()
eth_getTransactionByBlockNumberAndIndex()
eth_getBlockByHash()
eth_getBlockByNumber()
1) In case of legacy transitions the chainId field should be inserted
only if V is not 27/28.
This seems also the Geth/v1.10.23 behaviour via infura
2) In case of dynamicFee/AccessList transaction the access_list should
be inserted in the response also if empty
This is done correctly in cmd/rpcdaemon/commands/eth_api.go and NOT in
internal/ethapi/api.go
This seems also the Geth/v1.10.23 behaviour via infura
* Add borTx to GetBlockByHash; ensure borTxs have hashes; don't try to derive sender for borTxs
* Surface borReceipt logs in eth_getLogs
* Check for existence of borReceipt before synthesizing a borTx
* Ensure fake Bor txs + receipts are returned from all relevant RPC methods
* Add rest of bor implementation for eth_getBlockByNumber
* Use TxLookup index to find Bor txs
* Fix txHash on emitted borTxs and borReceipts
* Fix checks given that borTxs get registered in TxLookup; remove useless ref indirections
* share config object
* create default config and logger
* move db connection to common func
* move server start to cli package
* clear
* clear
* rename cli to rpc
* use unified SetupLogger func
* make all root flag persistent
* use common flags in different packages
* use common flags in different packages
* move TraceTx method to eth package
* use native slice flags
* create package "turbo"
* disable geth api
* disable geth api
* move more data types to turbo/adapter package
* add support for customApiList
* run more
* run more
* run more
* dog-food
* move DoCall
* move DoCall
* fix tests
* fix test