Commit Graph

233 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
Rod Vagg
26d3fd2ecc chore: lint: fix lint errors with new linting config
Ref: https://github.com/filecoin-project/lotus/issues/11967
2024-05-13 14:52:09 +10:00
Phi
d121760172 Record currentSize on addLocked
Record currentSize on addLocked
2023-11-03 08:59:01 +01:00
Phi
d1b8af338e Export Mpool-count
Record the current size of the mpool and export through Prometheus
2023-10-31 08:09:00 +00:00
Łukasz Magiera
861134d923
mpool: Fix CapGasFee maxFee handling
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2023-10-11 16:49:00 +02:00
Aayush
00aad34194 messagepool: refactor CapGasFee logic to be cleaner 2023-10-10 11:20:26 -04:00
Łukasz Magiera
444e75ef77 feat: mpool/wdpost: Maximize feecap config 2023-10-03 11:32:49 +02:00
Shrenuj Bansal
be3281bdcf Invert msg validation check to explicitly specify reject errors 2023-06-28 13:35:21 -04:00
Aayush
fb228ebbff feat: mempool: reintroduce ForEachPendingMessage 2023-05-10 14:19:33 -04:00
Mike Seiler
9c05a1f734 chain errors using xerrors.Errorf 2023-05-04 23:50:07 -10:00
Mikers
742062f84c
perf: mempool: lower priority optimizations (#10693)
* release the read lock earlier as it is not needed for chaincomputebasefee

* chain/messagepool/selection.go change to read lock in SelectMessages

* tighten up locks in chain/messagepool/repub.go and two questions on whether curTsLks are needed as comments

* include suggestion from @Jorropo to preallocate our msgs array so that we only need to make a single allocation

* mp.pending should not be accessed directly but through the getter

* from @arajasek: just check whether the sender is a robust address (anything except an ID address is robust) here, and return if so. That will:

be faster
reduce the size of this cache by half, because we can drop mp.keyCache.Add(ka, ka) on line 491.

* do not need curTslk and clean up code comments
2023-05-03 16:31:39 -04:00
Fridrik Asmundsson
4028c05fea address review comment 2023-04-21 20:03:13 +00:00
Fridrik Asmundsson
553da395e4 perf: Increase noncecache in MessagePool
Bumped from 256 to 32k entries which should be about 6MB of cached
entries given average nonceCacheKey of 200 bytes
2023-04-21 11:56:05 +00:00
Fridrik Asmundsson
953d56e216 perf: Address performance of EthGetTransactionCount
We have observed that EthGetTransactionCount is one of the hotspots
on Glif production notes, and we are seeing regular 10-20 second
latencies when calling this rpc method.

I tracked the high latency spikes and they were correlated when
we were running ExecuteTipSet while following the chain.

To address this, we should not rely on tipset computation to get
nounce and instead look at the parent tipset and then count the
messages sent from the 'addr'.
2023-04-21 11:55:46 +00:00
Mikers
41ea5a6f63
Update chain/messagepool/messagepool.go
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2023-03-29 05:44:25 -10:00
Mike Seiler
3477f7ce57 use LRU cache for keyCache to make threadsafe, also have (high) upper bounds on size of cache 2023-03-28 13:14:33 -10:00
Mike Seiler
89b217ee21 move write lock to before verifyMsg 2023-03-28 12:35:09 -10:00
Mike Seiler
2fa95a09be clean up cache logic in addTs / fix a bug where the loop was incorrectly releasing the lock 2x 2023-03-28 11:14:13 -10:00
Mikers
e9d2223025 disallow infinite loop, since in testing this only runs once 2023-03-28 08:11:23 +00:00
Mikers
ad81cd18c2 cache the tipset nonce calculation before holding the write lock, and also verify that the the calculation is cached after grabbing the write lock. if it is not cached, give up the lock, calculate, and then grab the write lock again 2023-03-28 08:11:00 +00:00
Mike Seiler
6f440a6420 change highly contented message pool locks to RWMutexes for performance 2023-03-24 15:49:02 -10: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
Steven Allen
58900a7033
feat: mempool: Reduce minimum replace fee from 1.25x to 1.1x (#10416)
However, we're leaving the default at 1.25x for backwards compatibility, for now.

Also:

1. Actually use the configured replace fee ratio.
2. Store said ratios as percentages instead of floats. 1.25, or 1+1/(2^2),
can be represented as a float. 1.1, or 1 + 1/(2 * 5), cannot.

fixes #10415
2023-03-09 13:17:17 -08:00
Aayush
e715384173 Merge branch 'release/v1.20.0' into asr/merge-release-into-master 2023-01-16 10:51:22 -05: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
Łukasz Magiera
156ba420c3 fix: splitstore: Don't deadlock in mpool protector 2022-12-17 13:14:50 +01:00
Łukasz Magiera
32efd0fbc2
Merge pull request #9497 from ipfs-force-community/fix/add_check_gaspremium
fix:mpool add gaspremium check when less than maxfee
2022-11-29 16:53:22 +01:00
Shrenuj Bansal
22f3fbb9a3 Add comment to Push API 2022-11-15 17:02:08 -05:00
Shrenuj Bansal
2fa21ff091 Merge branch 'master' into sbansal/nonce-coordination-and-consensus-for-chain-nodes 2022-11-11 14:41:38 -05:00
Aayush
c0b7343e60 Merge branch 'release/v1.18.0' into asr/merge-release-into-master 2022-11-06 14:40:13 -05:00
Shrenuj Bansal
15ed1ee33c Merge branch 'master' into sbansal/nonce-coordination-and-consensus-for-chain-nodes 2022-10-17 22:55:48 -04:00
hunjixin
e8aacf325c fix: add gaspremium check when less than maxfee 2022-10-17 12:02:56 +08:00
simlecode
e69fdaf48b fix: not multiplied by the number of seconds 2022-10-10 16:18:35 +08:00
Shrenuj Bansal
17a77220c2 Ignore mpool msg existing errors for applying raft state 2022-10-06 11:44:13 +00:00
Shrenuj Bansal
dde204fb6a Change Mpool push API to have an option to publish 2022-10-04 16:49:09 +00:00
Shrenuj Bansal
f89a682d98 Add Mpool ref to raft state and rearrange some APIs 2022-09-29 10:56:57 +00:00
Aayush
347d92b29c feat: add StateNetworkVersion to mpool API 2022-09-21 15:48:27 -04:00
Łukasz Magiera
08b22edd89 fix make gen 2022-08-29 16:25:30 +02:00
Łukasz Magiera
e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Aayush
3c8dcda094 Revert "VM: Refactor pricelist to be based on network versions"
This reverts commit 25b2e144b8.
2022-05-30 15:19:51 -04:00
Steven Allen
9da58c5f6a fix: mpool: avoid deadlock on unsubscribe
When unsubscribing _all_ topics, pubsub will drain the subscription
channel to avoid deadlocks. See
https://github.com/whyrusleeping/pubsub/pull/1.

fixes #7803
2022-05-10 16:52:17 -04:00
Aayush Rajasekaran
ddc46fc059 Update to filecoin pubsub 2022-05-10 16:51:36 -04:00
Aayush
25b2e144b8 VM: Refactor pricelist to be based on network versions 2022-03-25 15:06:10 -04:00
Steven Allen
1234fcfd4f fix: mempool: check messages against the next block's height
Previously, we checked message gas/validity with the previous block's
height. This doesn't affect consensus, but will help us avoid adding
messages to the message pool that shouldn't be there.
2022-02-21 18:13:07 +00:00
Łukasz Magiera
176ecd4c3b mpool: Cache state nonces 2022-01-26 15:39:58 +01:00
Łukasz Magiera
63d7ca328f
Merge branch 'master' into asr/shed-balances 2022-01-04 16:52:37 +01: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
Aayush Rajasekaran
fcb7cd0eb0 Shed: Add a util to send a batch of messages 2021-12-07 17:09:07 -05:00
Aayush Rajasekaran
aef741ae19 Mempool: reduce size of sigValCache 2021-09-08 16:08:41 -04:00