* poc for eth legacy tx
* print statements
* finished
* tests work
* remove print statements
* Remove all print statements
* remove extraneous changes
* cleaned up code and interface
* run make jen
* dont duplicate signature
* go mod tidy and remove prints
* clean up tests
* test for conversion
* changes as per review
* more unit tests for legacy txns
* Apply suggestions from code review
Co-authored-by: Rod Vagg <rod@vagg.org>
* address review comments from Rodd
* changes as per zen's 2nd review
* go mod tidy
* feat: ETH compatibility in Filecoin : Support EIP-155 Ethereum transactions in Filecoin (#11970)
* itests passing for 155 tx
* first working version for EIP-155 transactions
* green itest
* add docs
* tests
* remove print stmt
* remove print stmt
* validate signature
* changes as per zen's review
* correct signature verification
* gate tx by Network Version
* handle arajsek review
* fix imports order
* fix lint
* dont lock in mpool for network gating ETH messages
* sender can be an ID address
---------
Co-authored-by: Rod Vagg <rod@vagg.org>
Fixes: #10814
This PR updates the following RPC methods according to EIP-1898
specs.
The following RPC methods are affected:
- eth_getBalance
- eth_getStorageAt
- eth_getTransactionCount
- eth_getCode
- eth_call
Note that eth_getBlockByNumber was not included in this list in
the spec although it seems it should be affected also?
Currently these methods all accept a blkParam string which can be
one of "latest", "earliest", "pending", or a block number (decimal
or hex). The spec enables caller to additionally specify a json
hash which can include the following fields:
- blockNumber EthUint64: A block number (decimal or hex) which is
similar to the original use of the blkParam string
- blockHash EthHash: The block hash
- requireCanonical bool) If true we should make sure the block is
in the canonical chain
Since the blkParam needs to support both being a number/string and
a json hash then this to properly work we need to introduce a new
struct with pointer fields to check if they exist. This is done
in the EthBlockParamByNumberOrHash struct which first tries to
unmarshal as a json hash (according to eip-1898) and then fallback
to unmarshal as string/number.