Commit Graph

433 Commits

Author SHA1 Message Date
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
Nikola Divic
ae66f57fa0 test: chain syncer & sync manager
Added a few tests for some uncovered methods of the syncer and sync
manager. Deleted some dead code (sync.go:getLatestBeaconEntry).
2022-02-11 00:46:59 +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
Łukasz Magiera
95b128b7bc chain: Cleanup consensus logic 2021-09-02 18:09:37 +02:00
ZenGround0
b914e95f34 revert pricelist by version to pricelist by epoch 2021-08-11 09:49:23 -04:00
Aayush Rajasekaran
104626acb7 ValidateBlock: Assert that block header height's are greater than their parents 2021-07-26 11:09:23 -04:00
ZenGround0
f49a8248f0 PriceListByVersion 2021-07-22 09:49:47 -04: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
8d991283f4 Resolve to ID addresses when handling message selection 2021-05-31 18:13:23 -04:00
Steven Allen
8f309b214b chain: move checkpoint logic into chainstore
That way, checkpoints can be enforced by the chainstore, removing a
potential race where an in-progress sync of a fork could bypass a sync
checkpoint.
2021-04-28 15:06:29 -07:00
Aayush Rajasekaran
c1e4eb3b20 Add a whitelisted block 2021-04-10 02:12:38 -04:00
Raúl Kripalani
1ac0c9a926 address review comments. 2021-03-02 21:29:24 +00:00
Raúl Kripalani
b1c348b4a7 address review comments. 2021-03-02 16:31:01 +00:00
Raúl Kripalani
3795cc2bd2 segregate chain and state blockstores.
This paves the way for better object lifetime management.

Concretely, it makes it possible to:
- have different stores backing chain and state data.
- having the same datastore library, but using different parameters.
- attach different caching layers/policies to each class of data, e.g.
  sizing caches differently.
- specifying different retention policies for chain and state data.

This separation is important because:
- access patterns/frequency of chain and state data are different.
- state is derivable from chain, so one could never expunge the chain
  store, and only retain state objects reachable from the last finality
  in the state store.
2021-02-28 22:49:44 +00:00
Raúl Kripalani
7f0f7d0b36 Merge branch 'master' into refactor/lib/blockstore 2021-02-28 19:55:23 +00:00
austinabell
3228ae5672
Remove unnecessary database reads in validation check 2021-02-05 15:46:46 -05:00
Raúl Kripalani
b0cbc932bd consolidate all blockstores in blockstore package. 2021-01-29 20:01:00 +00:00
Łukasz Magiera
260908015f
Merge pull request #5393 from filecoin-project/feat-refactor-bls
refactor: switch to filecoin-ffi bls api for bls signatures
2021-01-25 20:56:18 +01:00
Steven Allen
7c9b9e3657 explicitly check miner address protocol
This is implicitly checked when verifying the miner signature, but
explicitly checking it here makes it clear that this is a protocol
requirement, and reduces the chances that it will be accidentally
"refactored out".
2021-01-22 18:04:07 -08:00
dignifiedquire
3d9eb226fa refactor: switch to filecoin-ffi bls api for bls signatures 2021-01-20 16:19:07 +01:00
Łukasz Magiera
b0bb36909b
Merge pull request #4192 from filecoin-project/schomatis/sync/remove-self-bypass
fix(sync): remove checks bypass when we submit the block
2021-01-12 14:52:50 +01:00
Lucas Molas
461a3cdebc
fix(sync): enforce ForkLengthThreshold for synced chain (#5182) 2020-12-22 12:29:36 -03:00
yaohcn
7c0b6f41d8 fix log format 2020-11-24 19:09:48 +08:00
Aayush Rajasekaran
7838752352 Avoid sending messages to the zero BLS address 2020-11-17 01:42:11 -05:00
Łukasz Magiera
470538b082
Merge pull request #4770 from filecoin-project/fix/winpost-sset
Don't use terminated sectors for winning PoSt
2020-11-16 17:16:08 +01:00
Łukasz Magiera
3a3270b37c nv7 upgrade: Don't use terminated sectors for winning PoSt 2020-11-09 18:52:10 +01:00
Łukasz Magiera
9270ac6358 Make some logs quieter 2020-11-03 13:28:41 +01:00
Jakub Sztandera
e68f69b63b
Call GetHeaviestTipSet() only once when syncing
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-11-02 22:56:26 +01:00
Steven Allen
8bb69f1e9c Use pre-computed parent state root for lookback info
There's no need to call TipSetState and recompute it.
2020-10-23 19:40:01 -07:00
Jakub Sztandera
16a911bc39
Fix random test failures
If block 1 was a null block then blockSet would include genesis which
would lead to us trying to load parent of a genesis block.

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-23 19:33:30 +02:00
Steven Allen
4a550d12d4 Always validate VRFs, even when insecure post validation is enabled
We always generate them, we might as well validate them.
2020-10-22 09:19:46 -07:00
Steven Allen
4e730b5ec8 port to v2 imports 2020-10-21 12:16:23 -07:00
whyrusleeping
608010c35d add some extra logging to try and debug sync issues 2020-10-19 19:09:49 -07:00
Steven Allen
bbc6de94fc write messages to a temp blockstore when validating 2020-10-14 14:43:52 -07:00
Lucas Molas
9b4cac9612 fix(sync state): set state height to actual tipset height 2020-10-12 21:14:16 -03:00
Łukasz Magiera
00620aac57
Merge pull request #4296 from filecoin-project/feat/sync-unmarkbad-all
sync unmark-bad --all
2020-10-10 22:35:56 +02:00
Steven Allen
7245ac2b69 fix a race in the sync manager
1. SyncerState contains a mutex and should never be copied. Honestly, this case
was probably fine but it's just as easy to create a separate snapshot type and
easier to reason about.

2. We need to initialize the syncStates array once at start, before accessing
it. By each syncer state inside each worker, we were racing with calls to
`State()`. Again, this was probably benign, but I don't trust optimizing
compilers.
2020-10-10 08:31:04 -07:00
Łukasz Magiera
18e58467f8 sync unmark-bad --all 2020-10-10 10:26:42 +02:00
Steven Allen
c0182f8301 return the correct err from iterFullTipset 2020-10-09 13:59:56 -07:00
Jakub Sztandera
973f61bc10
Optimize chain and message sync
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2020-10-08 23:10:07 +02:00
whyrusleeping
cdc2f86f5a add more info to chain sync lookback failure 2020-10-08 09:45:07 -05:00
Lucas Molas
7e3339820f fix(sync): remove checks bypass when we submit the block 2020-10-06 15:12:03 -03:00
Aayush Rajasekaran
4a9155ba85 Use new MinerEligibleToMine method post-v2 actors 2020-10-06 04:43:55 -04:00
Steven Allen
4989b1cc90 Merge branch 'master' into asr/spec-v1 2020-09-30 09:19:12 -07:00
Aayush Rajasekaran
c45c8f34a1 Parametrise whether sync validators should use cache 2020-09-30 01:39:06 -04:00
Łukasz Magiera
237c8c4deb
Merge pull request #3868 from austinabell/async/stransition
Make state transition in validation async
2020-09-29 16:50:52 +02:00
Aayush Rajasekaran
be9d23b329 Centralize some params in builtin 2020-09-29 02:25:43 -04:00
Steven Allen
233d8a9b72 update even more imports 2020-09-28 14:25:58 -07:00