Steven Allen
73a2b4152b
feat: eth: Avoid StateCompute in EthTxnReceipt lookup ( #10460 )
...
Instead:
1. Use the receipt from the message search.
2. Re-compute the gas fees that would have been charged.
fixes #10418
Co-authored-by: raulk <raul.kripalani@gmail.com>
2023-03-13 11:44:59 -07:00
raulk
75c279ab97
Merge pull request #10456 from filecoin-project/raulk/fix-eth-net_version
2023-03-13 11:25:19 +00:00
Raúl Kripalani
2e56237898
Merge branch 'master' into asr/fix-eth-api-gateway
2023-03-12 15:56:55 +00:00
Raúl Kripalani
e65a5988e1
Eth API: make eth_getTransactionByBlock* ops return ErrUnsupported.
2023-03-12 15:53:56 +00:00
Raúl Kripalani
5a4b5ff97e
remove superfluous filter.
2023-03-12 00:44:49 +00:00
Raúl Kripalani
7ce92f1422
Eth API: make net_version return the chain ID.
2023-03-11 23:26:26 +00:00
Raúl Kripalani
9412753ba3
Eth API: drop support for 'pending' block parameter.
...
After transitioning from using StateCompute to loading receipts,
we can no longer handle the 'pending' block without forcing
computation. Eth Core Devs are evaluating a proposal to remove
support on their end too.
2023-03-11 23:03:21 +00:00
Raúl Kripalani
f7a979d825
eth_feeHistory: migrate to using TipSetState.
2023-03-11 17:25:00 +00:00
Steven Allen
1cf57ffe2d
feat: eth: optimize receipt reading
...
This optimizes the eth APIs (except the fee history one) to lookup the
tipset state/receipts instead of computing the state.
2023-03-10 15:33:45 -08:00
Jiaying Wang
1096ead73e
Merge pull request #10427 from filecoin-project/raulk/fix-eth-parseBlkParam
...
fix: Eth API: make block parameter parsing sounder.
2023-03-09 14:21:24 -05:00
Raúl Kripalani
fce0813821
switch to ChainAPI#ChainGetTipSetByHeight.
2023-03-09 18:51:38 +00:00
Aayush Rajasekaran
9fa81673da
Merge pull request #10411 from filecoin-project/asr/simplity-new-eth-tx-rct
...
refactor: EthAPI: Drop unnecessary param from newEthTxReceipt
2023-03-09 12:44:44 -05:00
Raúl Kripalani
941ef84b71
Merge branch 'master' into raulk/fix-eth-parseBlkParam
2023-03-09 12:16:23 +00:00
Aayush Rajasekaran
ab91ab100f
fix: eth API: return correct txIdx around null blocks ( #10419 )
2023-03-09 12:14:57 +00:00
ychiao
0a0df61d77
fix: EthAPI: use StateCompute for feeHistory; apply minimum gas premium ( #10413 )
2023-03-09 00:28:17 +00:00
Raúl Kripalani
28d8b4cd65
Eth API: fail when requesting future epochs.
2023-03-08 20:49:36 +00:00
Raúl Kripalani
cef416e2b0
Eth API: make block parameter parsing sounder.
2023-03-08 20:38:09 +00:00
Aayush
f1b1eb8b36
refactor: EthAPI: Drop unnecessary param from newEthTxReceipt
2023-03-07 13:40:39 -05:00
Aayush
8b5bc45fcf
fix: eth API: correct gateway restrictions, drop unimplemented methods
2023-03-07 12:53:04 -05:00
Aayush Rajasekaran
12496e5631
Merge pull request #10389 from filecoin-project/asr/fix-eth-api-genesis
...
fix: EthAPI: Correctly get parent hash
2023-03-06 09:15:48 -05:00
Aayush
920fdfdf85
fix: EthAPI: Correctly get parent hash
2023-03-03 16:42:57 -05:00
Aayush
cfb5eac015
fix: EthAPI: Make newEthBlockFromFilecoinTipSet faster and correct
2023-03-02 12:34:09 -05:00
Aayush
17e680ea3c
fix: EthGetBalance: lookup balance at correct state
2023-02-27 14:43:57 -05:00
Aayush Rajasekaran
8975f0b753
feat: EthAPI: Add FilecoinAddressToEthAddress ( #10343 )
2023-02-24 14:19:52 -05:00
Aayush Rajasekaran
e3e78f1dc9
Merge pull request #10306 from filecoin-project/steb/error-cleanup
...
fix: eth: cleanup error cases
2023-02-17 15:22:07 -05:00
Steven Allen
bad41c247a
fix: eth: cleanup error cases
...
1. Return an error on gas estimation failure instead of logging.
2. Return early when processing signed messages on failure instead of
continuing.
2023-02-17 12:04:01 -08:00
Aayush Rajasekaran
efcdec6517
Merge pull request #10300 from filecoin-project/steb/fix-eth-nonce
...
fix: eth: return the correct nonce from EthGetTransactionCount
2023-02-17 14:45:45 -05:00
Steven Allen
6c0f4cbd74
nit: actually, don't use blocks
2023-02-17 11:18:51 -08:00
Steven Allen
49cd428c43
nit: put evm case in a block
2023-02-17 11:17:35 -08:00
Steven Allen
a3bc65ba05
fix: eth: return the correct nonce from EthGetTransactionCount
...
EVM contracts track this number internally.
fixes https://github.com/filecoin-project/lotus/issues/10255
2023-02-17 10:51:42 -08:00
Steven Allen
30615a4ed6
feat: eth: return revert data on failed gas estimation ( #10298 )
...
Unfortunately, we need to execute the message twice to get this (unless
we want to change some APIs). But it's unlikely to be a performance
issue and will definitely help people debug failures.
2023-02-17 10:36:30 -08:00
Steven Allen
00b6d06041
feat: eth: parse revert data ( #10295 )
...
We don't really want to do this in the FVM because it's Ethereum
specific, but this makes sense to do in the Ethereum API.
See:
See https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require
2023-02-17 01:18:03 +00:00
Steven Allen
5854d72784
fix: eth: correctly decode EthGetStorageAt output ( #10284 )
...
* fix: eth: correctly decode EthGetStorageAt output
We cbor-encode it. Also:
1. Actually use the passed block param.
2. Check if the target actor is an EVM actor to avoid nonsense outputs.
fixes https://github.com/filecoin-project/ref-fvm/issues/1621
2023-02-16 16:36:52 -08:00
Aayush
1d0a524b88
feat: EthAPI: Add EthAddressToFilecoinAddress
2023-02-16 12:24:17 -05:00
Aayush
3f063f7cd7
fix: StorageKey is now fixed-size array
2023-02-14 19:04:43 -05:00
Łukasz Magiera
7150243cda
feat: ethrpc: Support newPendingTransactions in eth_subscribe ( #10269 )
2023-02-14 16:15:42 +00:00
ychiao
0d92c746bd
Eth JSON-RPC: populate reward in eth_feeHistory ( #10245 )
...
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
Co-authored-by: Raúl Kripalani <raul@protocol.ai>
2023-02-14 01:02:37 +00:00
Steven Allen
f427c2b566
fix: eth: correctly convert filecoin message <-> eth txn ( #10257 )
...
1. We do allow deploying with empty initcode.
2. Make sure that the encoded "code" is non-empty, if specified.
Basically, this makes everything consistent (and it's how I specified it
in the FIP).
2023-02-13 10:33:59 -08: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
Steven Allen
a085eb1593
fix: eth: correctly return empty bytecode after selfdestruct
2023-02-12 19:31:56 -08:00
raulk
37e1ac5d93
eth: FIP-0055: implement final version of transitory delegated signature. ( #10239 )
2023-02-12 21:08:42 +00:00
Raúl Kripalani
6a76bbb6e3
improve TODO.
2023-02-10 22:46:57 +00:00
ychiao
8cded9f8d2
add todo
2023-02-10 17:34:53 -05:00
Raúl Kripalani
778768dbf7
eth_feeHistory: parse block param correctly.
2023-02-10 22:29:52 +00:00
ychiao
db749b8fc7
Merge branch 'release/v1.20.0' into fix/EthUint64-args
2023-02-10 17:26:38 -05:00
ychiao
3c580403c1
implement itest and handle optional params
2023-02-10 13:33:59 -05:00
Steven Allen
cc302dd68b
fix: eth: log on unexpected events
...
We can remove these later as we add more event types, but this will aid
in debugging.
2023-02-10 07:59:47 -08: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
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