Commit Graph

23 Commits

Author SHA1 Message Date
Aarsh Shah
c9c070727a
feat: ETH compatibility in Filecoin : Support Homestead and EIP-155 Ethereum transactions("legacy" transactions) in Filecoin (#11969)
* 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>
2024-06-05 09:25:50 +04:00
Fridrik Asmundsson
a3417e7488 Make block param to EthEstimateGas optional 2023-11-29 10:26:22 +00:00
Fridrik Asmundsson
717d2a0eeb Add block param to EthEstimateGas 2023-11-28 14:57:05 +00:00
Fridrik Asmundsson
dda2d7e023 Refactor EthBlockNumberOrHash and remove the number field 2023-06-22 17:18:50 +00:00
Fridrik Asmundsson
f358160cd5 Add EIP-1898 support needed for The Graph compatibility
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.
2023-06-20 09:38:00 +00:00
Raúl Kripalani
571a84b390 drop irrelevant test. 2023-03-12 00:45:02 +00:00
Raúl Kripalani
c61267cadc fix bad test. 2023-02-10 22:42:17 +00:00
Łukasz Magiera
e321761a72 ethrpc: Add missing fields to EthTx 2023-02-09 14:26:13 +01:00
Ian Davis
245be406d9 Fix merge conflicts 2023-02-01 16:41:01 +00:00
Ian Davis
67805fd25a Refactor to ensure conformance test can run in circleci 2023-01-27 15:13:38 +00:00
Ian Davis
6efe08dd61 Fix comment 2023-01-26 17:39:50 +00:00
Ian Davis
8f625e847b Changed skip message 2023-01-26 17:20:47 +00:00
Ian Davis
916b8001b4 Skip some rpc conformance tests 2023-01-26 17:07:17 +00:00
Ian Davis
daf90ff402 Fix lint errors 2023-01-26 17:01:39 +00:00
Ian Davis
7586710395 Fix panic in EthGetCode 2023-01-26 12:10:42 +00:00
Ian Davis
7acdb49074 Add test for eth_call 2023-01-24 14:03:31 +00:00
Ian Davis
2a73e1c2e1 Add test for eth_getStorageAt 2023-01-24 13:12:31 +00:00
Ian Davis
8daf22c3ff Test and fix eth_FeeHistory 2023-01-24 11:27:18 +00:00
Ian Davis
c0c8ad5510 Test more functions 2023-01-24 11:10:38 +00:00
Ian Davis
7eca3e4853 Start eth_sendRawTransaction test 2023-01-23 17:22:25 +00:00
Ian Davis
9fed750f9d Add further tests 2023-01-23 17:09:35 +00:00
Ian Davis
7d1bd1d5ab Use gojsonschema 2023-01-23 16:50:40 +00:00
Ian Davis
d9261b6e2f itests: validate responses from ethereum json-rpc api 2023-01-23 14:37:51 +00:00