Commit Graph

4265 Commits

Author SHA1 Message Date
Fridrik Asmundsson
9240776237 fix: improve perf of msgindex backfill 2023-06-01 14:36:05 +00:00
Łukasz Magiera
6cc506f5cf
Merge pull request #10923 from filecoin-project/feat/sectors-upgradebounds-cli
feat: miner cli: sectors list upgrade-bounds tool
2023-05-30 20:34:38 +02:00
Łukasz Magiera
87ae60a2bc
Merge pull request #10650 from filecoin-project/vyzo/test/mpool-select
Add timing test for mpool select with a large mpool dump
2023-05-30 17:00:06 +02:00
Łukasz Magiera
183e35f7b7
Merge pull request #10925 from filecoin-project/asr/drop-orange-check
feat: slashfilter: drop outdated near-upgrade check
2023-05-30 16:56:43 +02:00
Aayush Rajasekaran
3d061ba0ae
Merge pull request #10649 from filecoin-project/asr/test-gas-reward
test: messagepool: gas rewards are negative if GasFeeCap too low
2023-05-30 10:25:35 -04:00
Aayush Rajasekaran
b76b5ef4b7
Merge pull request #10863 from AnomalRoil/fix/fuzz/48208
fix: types: error out on decoding BlockMsg with extraneous data
2023-05-29 16:58:41 -04:00
Aayush Rajasekaran
867a7b1c01
Merge pull request #10628 from filecoin-project/asr/exec-trace-compute
fix: include extra messages in ComputeState InvocResult output
2023-05-29 12:56:43 -04:00
Aayush
10ed18ba12 test: messagepool: gas rewards are negative if GasFeeCap too low 2023-05-29 12:54:04 -04:00
Aayush Rajasekaran
0ec2acbf20
Merge pull request #10652 from filecoin-project/asr/mpool-fee-too-low
feat: pubsub: treat ErrGasFeeCapTooLow as ignore, not reject
2023-05-29 12:53:38 -04:00
Aayush
228b306370 feat: slashfilter: drop outdated near-upgrade check 2023-05-29 11:12:19 -04:00
Łukasz Magiera
14f9770859 feat: miner cli: sectors list upgrade-bounds tool 2023-05-26 12:29:36 +02:00
Łukasz Magiera
8c8e287be0
Merge pull request #10896 from filecoin-project/feat/chainindex-sharded-mutex
feat: chainstore: sharded mutex for filling chain height index
2023-05-24 12:49:16 +02:00
simlecode
6ec413b7ad fix: not call RUnlock 2023-05-23 17:43:39 +08:00
Yolan Romailler
00e34436b3
Addressing code review comments
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
2023-05-22 21:47:55 +02:00
Jakub Sztandera
cad743ec54
Appease the linter
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2023-05-19 20:02:47 +02:00
Jakub Sztandera
dfa7fc7723
feat: chainstore: sharded mutex for filling chain height index
This PR introduces as sharded mutex within the ChainIndex#GetTipsetByHeight.
It also replaces a go map with xsync.Map which doesn't require locking.

The lock is taken when it appears that ChainIndex filling work should be
started. After claiming the lock, the status of the cache is rechecked,
if the entry is still missing, the fillCache is started.

Thanks to @snissn and @arajasek for debugging and taking initial stabs at this.

Supersedes #10866 and 10885

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2023-05-19 19:49:22 +02:00
gammazero
f35fa5757a Replace use of storetheindex with go-libipni 2023-05-17 11:41:00 -07:00
Shrenuj Bansal
b0d1385273 Check if epoch is negative in GetTipsetByHeight 2023-05-16 21:19:03 -04:00
Yolan Romailler
0d7d906abf
Adding extra data check on DecodeBlockMsg
fix: types: error out on decoding BlockMsg with extraneous data
Fixes OSS-fuzz issue 48208: lotus:fuzz_block_msg

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-05-12 21:32:44 +02:00
Friðrik Ásmundsson
b4ea0db04f
Merge pull request #10719 from filecoin-project/10622-add-eth-syncing
feat: Add eth_syncing RPC method
2023-05-10 16:21:11 -04:00
Fridrik Asmundsson
2bc205ed62 feat: Add eth_syncing RPC method
This commit adds eth_syncing RPC method which returns an object
with data about the sync status or false.
2023-05-10 16:08:18 -04:00
Aayush
fb228ebbff feat: mempool: reintroduce ForEachPendingMessage 2023-05-10 14:19:33 -04:00
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
Aayush
596b01fba2 feat: chainstore: exit early in MaybeTakeHeavierTipset 2023-05-05 13:56:48 -04:00
Mike Seiler
9c05a1f734 chain errors using xerrors.Errorf 2023-05-04 23:50:07 -10:00
Friðrik Ásmundsson
e6c8072f50
Merge pull request #10827 from filecoin-project/10585-address-review-comments
10585 address review comments
2023-05-04 18:32:04 +00:00
Fridrik Asmundsson
4e8ee737fc Address review comments 2023-05-04 17:10:26 +00:00
Aayush
b45409262f feat: deflake msgindex_test.go 2023-05-04 12:04:28 -04:00
Friðrik Ásmundsson
dec3af7d7f
Merge pull request #10585 from filecoin-project/10584-make-execution-cache-size-configurable
feat: Make execution trace configurable via env variable
2023-05-04 14:07:35 +00:00
Mikers
c1d22d8b32
refactor: streamline error handling in CheckPendingMessages (#10818) 2023-05-03 11:12:47 -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
Aayush
49f5825296 feat: chainstore: batch writes of tipsets 2023-05-02 17:26:07 -04:00
Aayush Rajasekaran
ff0fa3471f
chore: refactor: drop unused IsTicketWinner (#10801) 2023-05-02 11:22:02 -07:00
Steven Allen
bb5ba64cca Revert "Merge pull request #9858 from adlrocha/adlrocha/consistent-bcast"
This reverts commit 8b2208fd9a, reversing
changes made to 2db6b12b78.

Unfortunately, this is rather tricky code. We've found several issues so
far and, while we've fixed a few, there are outstanding issues that
would require complex fixes we don't have time to tackle right now.

Luckily, this code isn't actually needed by the main Filecoin chain
which relies on consensus fault reporting to handle equivocation. So we
can just try again later.
2023-04-27 12:25:30 -07:00
Steven Allen
d2c3e84d54
feat: sync: harden chain sync (#10756)
* fix: sync: fail sync instead of logging if we sync the wrong chain

* fix: sync: write headers in the correct order

Just in case. This shouldn't be necessary, but we might as well.

* fix: minus minus

* fix: do put the tipset

Put != Persist
2023-04-26 14:12:45 -07:00
Aayush Rajasekaran
eb0b1c986b
Merge pull request #10713 from filecoin-project/steb/fix-event-subscription
fix: events: don't set GC confidence to 1
2023-04-26 16:14:20 -04:00
Steven Allen
a97dae8f46 fix: sync: reduce log from error to info
And fix the message to account for the fact that we now reject _old_
blocks along with new ones.

We frequently receive "out of date" blocks in hello messages from
syncing and/or out of sync nodes. This isn't an error.
2023-04-25 14:34:13 -07:00
Steven Allen
7162c656cc
fix: chain: record heaviest tipset before notifying (#10694)
Clearly this hasn't caused any issues, but I'm pretty sure we should be
updating the current head _before_ notifying about it.
2023-04-25 11:56:26 -07:00
ychiao
9ae48022ff
fix: Eth JSON-RPC api: handle messages with gasFeeCap less than baseFee (#10614) 2023-04-24 16:03:04 +01:00
Aayush
5a061e4677 Merge branch 'releases' into asr/merge-release-into-master 2023-04-23 14:58:50 -04:00
Steven Allen
784214ae05
feat: sync: validate (early) that blocks fall within range (#10691)
This will reject blocks in pubsub validation if they're either:

1. Too far into the future (5 blocks beyond the expected head).
2. Too far into the past (before finality with respect to our current
   head).

Specifically:

1. We were previously rejecting future blocks in the sync logic, but not
   in pubsub itself.
2. We never used to check if a block was too _old_.

Motivation: Blocks that are too new/too old can cause us to perform
quite a bit of unnecessary work.
2023-04-22 10:15:31 -07:00
Hector Sanjuan
875c09840b
chainstore: Fix raw blocks getting scanned for links during snapshots (#10684)
We have to save raw blocks to the snapshot, but we should not be scanning them
for additional links as if they were CBOR blocks.

This cleans the logic a bit (we were checking that the parent was a CBOR block
before queueing up the children, but then scanning the children... it was weird).

Additionally, more verbose logging is added for the next time ScanForLinks
fails (currently very little info was given).

Our ScanForLinks callback should only enqueue CBOR for further processing.
2023-04-21 15:16:26 -07:00
Friðrik Ásmundsson
9d5d6a5f3d
Merge pull request #10700 from filecoin-project/10538-opt-ethgettransactioncount
perf: Address performance of EthGetTransactionCount
2023-04-21 20:13:56 +00: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
Łukasz Magiera
a503a0edaa
Merge pull request #10690 from filecoin-project/fix/remove-pointless-panic
fix: remove pointless panic
2023-04-21 13:47:12 +02:00
Steven Allen
c84c07eb74 fix: events: don't set GC confidence to 1
The function/parameter were poorly named and should never have been
exposed. "GC" confidence should always be the same, this parameter
doesn't let us actually set the _confidence_, just the point before
which we no longer support reverts.

fixes #10706
2023-04-20 14:45:55 -07:00
Łukasz Magiera
0a46fc7e73
Merge pull request #10562 from Jorropo/boxo
chore: boxo: migrate from go-libipfs to boxo
2023-04-20 16:24:22 +02:00
ZenGround0
327760acff
chore: build: Merge/v22 into 21 for 23 (#10702)
* chore: update ffi to increase execution parallelism

* Don't enforce walking receipt tree during compaction

* fix: build: drop drand incentinet servers

* chore: release lotus v1.20.4

* Apply suggestions from code review

Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>

* feat: Introduce nv19 skeleton

Update to go-state-types v0.11.0-alpha-1

Introduce dummy v11 actor bundles

Make new actors adapters

Add upgrade to Upgrade Schedules

make jen

Update to go-state-types v0.11.0-alpha-2

* feat: vm: switch to the new exec trace format (#10372)

This is now "FVM" native. Changes include:

1. Don't treat "trace" messages like off-chain messages. E.g., don't
include CIDs, versions, etc.
2. Include IPLD codecs where applicable.
3. Remove fields that aren't filled by the FVM (timing, some errors,
code locations, etc.).

* feat: implement FIP-0061

* Address review

* Add and test the FIP-0061 migration

* Update actors bundles to fip/20230406

* Update to go-state-types master

* Update to actors v11.0.0-rc1

* - Update go state types
- Keep current expiration defaults on creation, extension some tests
- Update ffi

* ffi experiment

* Integration nv19 migration

- Open splitstore in migration shed tool
- Update state root version

* Post rebase fixup

* Fix

* gen

* nv19 invariant checking

* Try fixig blockstore so bundle is loaded

* Debug

* Fix

* Make butterfly upgrades happen

* Another ffi experiment

* Fix copy paste error

* Actually schedule migration (#10656)

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>

* Butterfly artifacts

* Set calibration net upgrade height

* Review Response

* Fix state tree version assert

* Quick butterfly upgrade to sanity check (#10660)

* Quick butterfly upgrade to sanity check

* Update butterfly artifacts

* Revert fake fix

* Give butterfly net correct genesis

* Butterfly artifacts

* Give time before upgrade

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>

* chore:releasepolish v1.22 release (#10666)

* Update butterfly artifacts

* register actors v11

* Update calibration upgrade time

* State inspection shed cmds

* Fix

* make gen

* Fix swallowed errors

* Lint fixup

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>

* v1.22.0-rc3

* bundle fix

* Feat/expedite nv19 (#10681)

* Update go-state-types

* Modify upgrade schedule and params

* Revert fip 0052

* Update gst

* docsgen

* fast butterfly migration to validate migration

* Correct epoch to match specified date

* Update actors v11

* Update changelog build version

* Update butterfly artifacts

* Fix lotus-miner init to work after upgrade

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>

* fix:deps:stable ffi for stable release  (#10698)

* Point to stable ffi for stable lotus release

* go mod tidy

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>

---------

Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
Co-authored-by: jennijuju <jiayingw703@gmail.com>
2023-04-19 18:40:18 -04:00