Friðrik Ásmundsson
ceb3f1e41e
Validate that FromBlock/ToBlock epoch is indeed a hex value ( #10780 )
...
* Validate that FromBlock/ToBlock epoch is indeed a hex value
* Adding tests
2023-05-09 17:17:23 -04:00
ZenGround0
ed7d1ef493
Merge pull request #10534 from filecoin-project/raulk/fix-parse-block-param-error
...
fix: Eth RPC: do not occlude block param errors.
2023-05-08 11:51:39 -04:00
Mikers
41fce94db4
perf: eth: gas estimate set applyTsMessages false ( #10546 )
...
* have gas estimate call callInternal with applyTsMessages = false and other calls with applyTsMessages=true for gas caclulation optimization
* set applyTsMessages = true in CallWithGas call in shed
* update test with new callwithgas api optimization for eth call
* Update chain/stmgr/call.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
* env flag LOTUS_SKIP_APPLY_TS_MESSAGE_CALL_WITH_GAS must be 1 in order to have applyTsMessages change
* env flag LOTUS_SKIP_APPLY_TS_MESSAGE_CALL_WITH_GAS must be 1 in order to have applyTsMessages change
* make sure that even if we arent apply ts messages we grab ts messages from the particular user who is requesting gas estimation
---------
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ip-10-0-4-29.us-east-2.compute.internal>
2023-03-23 18:27:01 -04:00
raulk
0f8a4b7789
fix: Eth RPC: do not occlude block param errors.
2023-03-22 11:37:35 +00:00
Steven Allen
2207ab3c93
fix: eth: handle a potential divide by zero in receipt handling
...
This isn't really possible to hit on-chain at this piont (message won't
be accepted) but we might as well be extra careful.
fixes #10471
2023-03-16 08:53:52 -07:00
Łukasz Magiera
093ff95580
Merge pull request #10467 from filecoin-project/steb/gw-eth-lookback-limit
...
feat: apply gateway lookback limit to eth API lookback
2023-03-16 08:50:59 +01:00
Łukasz Magiera
c0aed3c4a2
Merge pull request #10474 from filecoin-project/raulk/fix-pending-support
...
fix: revert "Eth API: drop support for 'pending' block parameter."
2023-03-16 08:49:49 +01:00
Steven Allen
17274e72da
feat: expose limited apis on the gateway
2023-03-15 16:12:18 -07:00
Steven Allen
3776ee3b62
fix: actually apply limit
2023-03-15 16:11:13 -07:00
Steven Allen
fee480193e
feat: apply gateway lookback limit to eth API lookback
...
This change:
1. Introduces new "limited" API endpoints for EthGetTransactionByHash
and EthGetTransactionReceipt that accept lookback-limits.
2. Implements the gateway version of these API endpoints by calling the
limited variants with the default message search lookback limit.
fixes #10412
2023-03-15 16:11:11 -07:00
Łukasz Magiera
720e95991c
make lint happy
2023-03-15 18:52:11 +01:00
Łukasz Magiera
470dd8da3d
ethrpc: Buffer sub messages if subscriber is slow
2023-03-15 18:34:10 +01:00
raulk
e8325f9a98
Revert "Eth API: drop support for 'pending' block parameter."
...
This reverts commit 9412753ba3
.
2023-03-14 13:46:01 +00:00
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