Commit Graph

761 Commits

Author SHA1 Message Date
Raúl Kripalani
8ff55c027e Merge branch 'release/v1.20.0' into asr/merge-release-into-master 2023-02-13 11:45:09 +00:00
Steven Allen
b765112896 fix: correctly handle ethGetCode edge-cases
1. If the actor is a non-evm actor, return "nothing".
2. Correctly handle missing actors.
3. Handle self-destructed actors (they'll return "null").

fixes https://github.com/filecoin-project/ref-fvm/issues/1641
2023-02-12 20:38:47 -08:00
raulk
37e1ac5d93
eth: FIP-0055: implement final version of transitory delegated signature. (#10239) 2023-02-12 21:08:42 +00:00
Aayush
63b03a48d0 Merge branch 'release/v1.20.0' into asr/merge-release-into-master 2023-02-10 18:39:51 -05:00
Raúl Kripalani
c61267cadc fix bad test. 2023-02-10 22:42:17 +00:00
ychiao
db749b8fc7 Merge branch 'release/v1.20.0' into fix/EthUint64-args 2023-02-10 17:26:38 -05:00
Steven Allen
01e616f29e
fix: stmgr: make the tipset and height agree when estimating gas (#10216)
* fix: stmgr: make the tipset and height agree when estimating gas

Specifically re-execute all messages in the current tipset, tacking the new
message onto the end. That way, the epoch is the epoch of the current tipset.

We could try to "make" a fake block and use that, but that's unlikely to
work well.

* fix: stmgr: only apply tipset messages for CallWithGas

* fix: itest: window post dispute
2023-02-10 20:49:26 +00:00
ychiao
3c580403c1 implement itest and handle optional params 2023-02-10 13:33:59 -05:00
Steven Allen
ece8f25511 fix: eth: strict event parsing
We now enforce the following rules:

1. No duplicate topics or data.
2. Topics must have 32 byte keys.
3. Topics may not be skipped. (e.g., no t1 & t3 without a t2).
4. Raw codecs.

We _don't_ require that topics/data be emitted in any specific order.

We _skip_ events with unknown keys. We _drop_ events that violate the
above rules.
2023-02-10 07:41:29 -08:00
Steven Allen
f1381ad535 refactor: use EthHash for event topics
This ensures they're always 32 bytes and padded, as required.
2023-02-10 07:41:29 -08:00
Steven Allen
80fccba93f
fix: gas: update ffi & correct the message inclusion cost in nv18 (#10228)
Co-authored-by: Raúl Kripalani <raul@protocol.ai>
2023-02-10 12:48:20 +00:00
Jiaying Wang
1c13a591e9
Merge pull request #10223 from filecoin-project/feat/ethtx-fixes
fix: ethrpc: Add missing fields to EthTx
2023-02-09 13:13:26 -05:00
Łukasz Magiera
c98093be03 Merge remote-tracking branch 'origin/release/v1.20.0' into mikers/create2test2 2023-02-09 18:19:47 +01:00
Łukasz Magiera
d84479bb05
Merge pull request #10162 from filecoin-project/mikers/deployValueTest2
tests: itests: test creating a contract and sending value
2023-02-09 18:00:15 +01:00
Aayush Rajasekaran
030b40b2a0
Merge pull request #10211 from filecoin-project/fix/ethsub-noarray
fix: ethrpc: Don't send sub notifs in array
2023-02-09 11:55:46 -05:00
Łukasz Magiera
e321761a72 ethrpc: Add missing fields to EthTx 2023-02-09 14:26:13 +01:00
Łukasz Magiera
554dd2f1ee itests: Test EVM bytecode getters, check bytecode hash 2023-02-09 13:23:17 +01:00
Łukasz Magiera
9339267e6e
fix: ethrpc: emit correct bloom filters (#10194) 2023-02-08 23:14:53 +00:00
Łukasz Magiera
c2e3832643 Update eth_subscribe itests to work with correct responses 2023-02-08 16:09:19 +01:00
Steven Allen
89499bfd40 fvm: chore: update FVM
This:

1. Updates the builtin actors bundle (for actors v10).
2. Updates the event entry type to include the codec.
3. Removes the cbor encoding and zero trimming from event data.

I've chose to:

1. _Not_ add codec handling to the event filtering system for now.
2. _Skip_ events with unexpected codecs.

We don't actually _allow_ these events in the FVM right now, and it
simplifies the implementation.

However, I _am_ recording the codecs in the database so we don't have to
migrate it later.
2023-02-07 18:15:40 -08:00
Aayush Rajasekaran
693f230fbb Merge branch 'release/v1.20.0' into asr/merge-release-into-master 2023-02-07 11:03:01 -05:00
snissn
23eaee49d4
clean up test for recursive delegate call count. improved readability (#10195) 2023-02-06 13:32:39 -08:00
Mike Seiler
fc2a6a82cb Merge branch 'release/v1.20.0' into mikers/create2test2 2023-02-06 20:40:29 +00:00
Mike Seiler
2673ec3c82 use WithValue language for test 2023-02-06 20:35:35 +00:00
Mike Seiler
f671a3c81c merge 2023-02-06 20:24:23 +00:00
snissn
1ab53051f7
improve evm error handling in itests (#10161) 2023-02-06 10:17:15 -10:00
Steven Allen
e0931f8f90 itest: fix remaining fevm failures 2023-02-06 11:01:49 -08:00
Steven Allen
d16b2902d4 itest: fix: test comment 2023-02-06 09:52:38 -08:00
Steven Allen
6bf3a21158 itest: fix FEVM tests for upstream changes 2023-02-06 09:20:22 -08:00
Aayush Rajasekaran
725f22a344
Merge pull request #10173 from filecoin-project/gstuart/check-params
chore: cli: Confirm tooling that assumes knowledge of method params / returns don't break
2023-02-06 10:49:47 -05:00
Łukasz Magiera
6851b6a523 Merge remote-tracking branch 'origin/release/v1.20.0' into fix/eth-orpc-validate 2023-02-06 10:41:52 +01:00
Travis Person
03b419e3d4 feat: compute a better gas limit for recursive external contract calls 2023-02-03 20:40:18 +00:00
Aayush
f291572b4a Merge branch 'release/v1.20.0' into asr/merge-release-into-master 2023-02-03 09:27:04 -05:00
raulk
b46258d0bf
feat: evm: align events implementation with FIP-0049 and FIP-0054. (#10152)
- Event keys are now t1, t2, t3, t4 for topics; and d for data.
- ref-fvm no longer stores events in the blockstore for us. It just
  returns events to the client, who is now responsible for handling
  them as it wishes / according to its configuration.
- Add a flag to VMOpts to have the events AMT be written in the blockstore.
- Add a flag to the ChainStore to advertise to the rest of the system
  if the ChainStore is storing events.
- Enable that flag if the EthRPC is enabled (can also add an explicit
  configuration flag if wanted).
2023-02-02 19:10:30 -08:00
Geoff Stuart
ffc1c33be0 Review fixes 2023-02-02 16:46:08 -05:00
Geoff Stuart
f05437d253 Check decoding params for new methods 2023-02-02 14:41:30 -05:00
Łukasz Magiera
0c33eab20a
Merge pull request #10180 from filecoin-project/feat/ethsub-addr
feat: ethrpc: Support filtering by address in subscribe
2023-02-02 18:23:43 +01:00
Łukasz Magiera
8ce0b984b7 itests: Fix TestEthFilterAPIDisabledViaConfig 2023-02-02 15:59:55 +01:00
Łukasz Magiera
fe1e0974cb feat: ethrpc: Support filtering by address in subscribe 2023-02-02 14:46:36 +01:00
Maciej Witowski
75f4810af1
Merge pull request #10168 from filecoin-project/maciej/test
Test: assert all fields returned from EthGetTransactionByHash have expected values
2023-02-02 14:14:21 +01:00
Geoff Stuart
b8c4fbaff0
Merge pull request #10062 from filecoin-project/iand/issue-9849-config
itests: verify eth filter api is disabled via config
2023-02-01 22:25:21 -05:00
Geoff Stuart
abf2140ecf review fixes 2023-02-01 18:50:36 -05:00
Geoff Stuart
12ca08d9a6
Merge pull request #10081 from filecoin-project/steb/remove-dead-code
itests: remove dead code from DeployContract
2023-02-01 18:06:58 -05:00
Ian Davis
245be406d9 Fix merge conflicts 2023-02-01 16:41:01 +00:00
Maciej Witowski
90fced7cb2 Test: assert all fields returned from EthGetTransactionByHash have expected values
Related to  https://github.com/filecoin-project/lotus/pull/10151#discussion_r1092358973
2023-02-01 17:38:09 +01:00
Ian Davis
d29a244064 Merge remote-tracking branch 'origin/release/v1.20.0' into iand/eth-openrpc-validate 2023-02-01 16:19:17 +00:00
Mike Seiler
c6bd9bc9e0 tests that use create2 and destroy to validate evm state 2023-02-01 06:55:52 +00:00
Mike Seiler
3adafea574 merge 2023-02-01 06:51:32 +00:00
snissn
9060c474da
test: fevm: add in tests for deploying, destroying contracts, recursive calls, sending value (#10082)
adds the following tests to itests/fevm_test.go:
 - recursive tests
 - delegate call tests
 - delegate call recursive tests
 - revert tests
 - destruct tests
 - contract deploy address tests
 - send value to contracts
 - gas limit on value transfer tests
 - sending value to destroyed contracts
adds the test to itests/fevm_address_test.go:
 - deploy contract and confirm address is different second deploy
2023-01-31 19:13:13 -10:00
Aayush
99b879d014 Add test for EthGetTransactionByHash 2023-01-31 12:55:46 -05:00
Łukasz Magiera
ad14d71978 eth rpc: Params are optional in eth_subscribe 2023-01-31 11:08:51 +01:00
Łukasz Magiera
965b1cf03c itests: Fix TestEthSubscribeLogs 2023-01-31 10:28:12 +01:00
Łukasz Magiera
1286d76988 gateway: eth_subscribe support 2023-01-31 10:28:12 +01:00
Geoff Stuart
af72e6f6ac
Refactor: Unify EthTx to FilecoinMessage methods v2 (#10095)
* Refactor: Unify EthTx to FilecoinMessage methods

* Filecoin messages can again be converted to Eth Txs

* All BLS messages should calculated tx hash with unsigned message

* Refactor newEthTxReceipt

* fill in from and to for non-eth transactions

* Hoist nil check out of newEthTxFromMessageLookup

---------

Co-authored-by: Aayush <arajasek94@gmail.com>
Co-authored-by: Raúl Kripalani <raul@protocol.ai>
2023-01-30 18:40:14 +00:00
Ian Davis
eacf3f1830 go fmt 2023-01-27 15:20:23 +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
98d6d4eb17 Remove stm: #integration comment 2023-01-26 17:27:55 +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
Jorropo
f572852d06 chore: all: bump go-libipfs to replace go-block-format
Includes changes from:
- https://github.com/ipfs/go-block-format/pull/37
- https://github.com/ipfs/go-libipfs/pull/58
2023-01-26 17:03:18 +01:00
Ian Davis
df0cf91548 Use new kit.DisableEthRPC method in test 2023-01-26 14:49:02 +00:00
Ian Davis
e73dc3eb74 Merge branch 'release/v1.20.0' into iand/issue-9849-config 2023-01-26 14:45:47 +00:00
Ian Davis
4500c02e49 Merge branch 'release/v1.20.0' into iand/eth-openrpc-validate 2023-01-26 14:23:42 +00:00
Ian Davis
c82dccc76c Merge branch 'release/v1.20.0' into iand/issue-9849-realtime 2023-01-26 12:11:14 +00:00
Ian Davis
7586710395 Fix panic in EthGetCode 2023-01-26 12:10:42 +00:00
Ian Davis
a9cd76907e Merge branch 'release/v1.20.0' into iand/eth-openrpc-validate 2023-01-26 11:35:33 +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
Łukasz Magiera
46746f3495 itests: Test FEVM recursive calls 2023-01-23 19:40:19 +01:00
Łukasz Magiera
74b33bd4a2
Merge pull request #10068 from filecoin-project/test/eam-tests
itests: Test EAM interactions from accounts
2023-01-23 19:36:24 +01:00
Aayush
65ac5669a9 Merge branch 'master' into asr/merge-release-into-master 2023-01-23 12:37:24 -05: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
Łukasz Magiera
dd12cad1ef
Merge pull request #10100 from filecoin-project/fix/paych-itest-syncwait
fix: itests: Fix flaky paych test
2023-01-23 16:24:42 +01:00
Ian Davis
d9261b6e2f itests: validate responses from ethereum json-rpc api 2023-01-23 14:37:51 +00:00
Łukasz Magiera
c8a692046f fix: itests: Fix flaky paych test 2023-01-23 12:02:42 +01:00
Łukasz Magiera
68e20cebd7 itests: Test EAM interactions from accounts 2023-01-23 11:18:46 +01:00
Geoff Stuart
439b4c6e22 Cleanups 2023-01-20 16:51:01 -05:00
Łukasz Magiera
7632f9bbba itests: Test FEVM recursive calls 2023-01-20 15:50:33 +01:00
Ian Davis
c5ed5dd254 itests: add event matrix tests for realtime eth filters and subscriptions 2023-01-20 14:01:25 +00:00
Steven Allen
a1efd20e81 itests: remove dead code from DeployContract
We no longer use the nonce here.
2023-01-19 19:53:09 -08:00
Raúl Kripalani
8802de59d4 remove leftover from merge. 2023-01-20 01:16:34 +00:00
Raúl Kripalani
21c93f1dc1 Merge branch 'release/v1.20.0' into iand/issue-9849-filters 2023-01-20 01:11:31 +00:00
Raúl Kripalani
2a9069200d use len to conduct empty byte array checks. 2023-01-20 00:57:53 +00:00
Geoff Stuart
6601d9031d Set default path for eth event db, set it to enabled by default if EnableEthRPC is set 2023-01-19 18:40:28 -05:00
Łukasz Magiera
eaccb571a5
fix: config: Fix eth rpc typo (#10076) 2023-01-19 20:35:19 +00:00
Aayush Rajasekaran
196b41d5f6
Merge pull request #10069 from filecoin-project/asr/fix-tsk
fix: chain: put tipsetkey upon expansion of tipset
2023-01-19 14:10:19 -05:00
raulk
1e845c61a2
add integration test to catch tipset CID flakiness. (#10071) 2023-01-19 18:25:23 +00:00
Łukasz Magiera
60dbd59aa0 itests: Default enable Eth rpc 2023-01-19 19:21:00 +01:00
Łukasz Magiera
66f5ee4ae9 config: Fevm.EnableEthPRC 2023-01-19 18:31:17 +01:00
Ian Davis
85592ad39e itests: verify eth filter api is disabled via config 2023-01-19 14:59:11 +00:00
Ian Davis
f2ab452eb8 Resolve merge conflict 2023-01-19 14:10:23 +00:00
Łukasz Magiera
2f03bf9372
Merge pull request #10010 from filecoin-project/snissn/delegatecalltest3
fevm_test: delegate call test
2023-01-19 14:42:11 +01:00
Ian Davis
a08b557938
Merge branch 'release/v1.20.0' into iand/issue-9849-filters 2023-01-19 13:01:12 +00:00
Ian Davis
ca5cab4c43 Cleanup and fix eth filter tests 2023-01-19 12:58:23 +00:00