Commit Graph

73 Commits

Author SHA1 Message Date
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
Aayush
57d4c98d00 fix: gas estimation: don't special case paych collects 2023-03-23 09:50:28 -04:00
Steven Allen
dcb49dc8ee
refactor: update cache to the new generic version (#10463)
- Adds type safety.
- Reduces allocations.
- Fixes the drand cache (was storing by value, but retrieving by pointer)
2023-03-13 15:29:09 -07:00
Aayush
35c90d34d6 feat: gas: overestimate around the Hygge upgrade 2023-02-23 09:35:01 -05:00
Travis Person
03b419e3d4 feat: compute a better gas limit for recursive external contract calls 2023-02-03 20:40:18 +00:00
raulk
cdf3812e40
NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998)
Co-authored-by: Steven Allen <steven@stebalien.com>
Co-authored-by: Raul Kripalani <raulk@users.noreply.github.com>
Co-authored-by: Kevin Li <ychiaoli18@users.noreply.github.com>
Co-authored-by: vyzo <vyzo@hackzen.org>
Co-authored-by: Ian Davis <nospam@iandavis.com>
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
Co-authored-by: Jennifer Wang <jiayingw703@gmail.com>
Co-authored-by: Geoff Stuart <geoff.vball@gmail.com>
Co-authored-by: Shrenuj Bansal <shrenuj.bansal@protocol.ai>
Co-authored-by: Shrenuj Bansal <108157875+shrenujbansal@users.noreply.github.com>
Co-authored-by: Geoff Stuart <geoffrey.stuart@protocol.ai>
Co-authored-by: Aayush Rajasekaran <aayushrajasekaran@Aayushs-MacBook-Pro.local>
Co-authored-by: ZenGround0 <5515260+ZenGround0@users.noreply.github.com>
Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
2023-01-13 19:11:13 +00:00
Aayush
5d28eea968 chore: deps: update to go-jsonrpc 0.1.8 2022-09-27 15:34:01 +00:00
Aayush
27880ece2b feat: support typed errors over RPC 2022-09-27 15:34:01 +00:00
Steven Allen
d192b821a9
fix: gas: estimate gas with a zero base-fee
Otherwise, an account will need funds to estimate the max possible gas a
message could take (which is usually the block gas limit).

This does mean gas estimation no longer checks if the sending account
has enough funds to cover the message cost, but MpoolPush will now do
this.
2022-07-08 09:47:45 -07:00
Łukasz Magiera
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Aayush
4fa04abb8c Add disable flag for Skyr upgrade 2022-05-26 18:20:49 -04:00
Aayush
8cca9b1970 Use new go-state-types accessors 2022-05-17 15:21:27 -04:00
Jakub Sztandera
5fb69281d8
Estimate gas across the upgrade with per message multipliers
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2022-05-09 17:08:13 +02:00
Aayush Rajasekaran
8282484f65 Gas estimation: Overestimate by 2 around the M1 upgrade 2022-05-06 11:50:43 -04:00
Aayush Rajasekaran
26a780a198 Gas estimation: Refactor the special PayCh collect case 2022-05-06 11:42:26 -04:00
vyzo
dd327f0b22 plumb more contexts 2021-12-17 11:42:09 +02:00
Aayush Rajasekaran
dfb65ed89f Plumb contexts through 2021-12-11 17:04:00 -05:00
Łukasz Magiera
dc642d0b7b Merge remote-tracking branch 'origin/feat/nv13' into feat/nv13-1.11 2021-06-01 21:06:58 +02:00
Aayush Rajasekaran
1f03a618f9 Plumb contexts through 2021-05-31 18:13:23 -04:00
Aayush Rajasekaran
d794b49df3 Use EmptyTSK where appropriate 2021-04-29 01:00:03 -04:00
Łukasz Magiera
f4e46c9003 implement v1 api with api modules 2021-04-03 13:20:50 +02:00
Jakub Sztandera
5f672c2ed0
perf: add cache for gas permium estimation
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-03-22 18:06:14 +01:00
Jakub Sztandera
8c7fda4441
fix(gas): when estimating GasLimit only apply priors up to the nonce
The bug is applying all messages from given From address are priors
before appling the message that we are estimating.

If user tries replacing message in the middle with gas limit estimation
then message sequence is off and user will either get an execution error
or gas mis-esimation.

Resolves #5402

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-01-22 18:50:02 +01:00
Jakub Sztandera
eeadfedbe6
Use 55th percentile instead of median for gas-price
The aim is to put some negative pressure on gas-premium instead of
maintining status quo.

55th percentile instead of median should not make much difference for
block inclusion timing.

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-01-18 15:44:20 +01:00
Jakub Sztandera
6ca5caef31
Refactor DefaultMessageSendSpec
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-12-08 20:51:27 +01:00
Jakub Sztandera
94438bf3cd
Use TSK passed to GasEstimateGasLimit
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-05 21:14:38 +01:00
Łukasz Magiera
ae7889f830 Config for default max gas fee 2020-10-29 20:50:11 +01:00
Steven Allen
bcabe7b3b5 migrate methods to abstracted methods
Method numbers never change anyways. At worst, we'll deprecate old methods and
have to explicitly import them from the correct actors version to use them.
2020-10-21 12:18:37 -07:00
Steven Allen
4e730b5ec8 port to v2 imports 2020-10-21 12:16:23 -07:00
Jakub Sztandera
df6f4a572c
Change default gas premium to for 6 block inclusion
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-15 02:53:40 +02:00
Dirk McCormick
b32d25c562 feat: add RPC for GasEstimateMessageGas 2020-10-09 11:45:16 +02:00
Steven Allen
e8253d22c6 only forbid Call* at expensive forks 2020-10-07 16:14:11 -07:00
Steven Allen
dab1107f5b avoid estimating gas and explicitly calling blocks on fork tipsets
These tipsets can be slow.
2020-10-07 15:31:14 -07:00
Aayush Rajasekaran
be9d23b329 Centralize some params in builtin 2020-09-29 02:25:43 -04:00
Steven Allen
d33dd4f7bc more renames 2020-09-21 16:01:29 -07:00
hannahhoward
691bd9f442 feat(markets): complete markets conversion
complete markets conversion to using chain/actors types, also replacing DealProposal/DealState
interfaces with structs
2020-09-17 00:43:14 -07:00
Łukasz Magiera
18c025f10e
Merge pull request #3777 from filecoin-project/feat/plan-20-blocks
Increase the FeeCap estimation to 20 blocks in a future
2020-09-14 10:20:17 +02:00
Jakub Sztandera
d5aef296ea
Increase the FeeCap estimation to 20 blocks in a future
FeeCap will be set to 10x the current running rate

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-11 21:59:51 +02:00
Jakub Sztandera
2865a0367b
Fix mpool replace --auto
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-11 00:59:57 +02:00
Łukasz Magiera
e91ee9f62a Fix lint 2020-09-09 12:18:02 +02:00
Łukasz Magiera
f695c0c164 gas: Add tests to median premium math 2020-09-09 12:14:46 +02:00
Łukasz Magiera
2aba16e2c9 gas: Fix median calc 2020-09-09 11:41:02 +02:00
Aayush Rajasekaran
39755a294a Update to specs v0.9.6 2020-09-07 15:48:41 -04:00
Jakub Sztandera
114c0ea85c
Fix GasPremium capping logic
Cap it just to FeeCap, there is no reason to cap it proportionally

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-04 15:42:12 +02:00
Jakub Sztandera
d35b273dbf
Cap fees to reasonable level by default
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-03 13:49:50 +02:00
Jakub Sztandera
72fb6afae2
Account for GasPremium in GasEstimateFeeCap
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-09-01 20:35:29 +02:00
Aayush Rajasekaran
cfe5134375 Use Sign() to check zero-equality 2020-08-31 18:53:14 -04:00
Jakub Sztandera
56235aee90
Fix GasEstimateGasPremium when there is only one message on chain
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-31 18:12:06 +02:00
Łukasz Magiera
ae19b8ebfd
Merge pull request #3146 from filecoin-project/feat/paych-cli-voucher-tests
paych: modify `lotus paych voucher best-spendable` to output _all_ best vouchers
2020-08-24 22:59:20 +02:00
Jakub Sztandera
d08458a03c
s/From/To
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-08-21 00:16:48 +02:00