Commit Graph

259 Commits

Author SHA1 Message Date
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
Steven Allen
6cbeb9aad6
fix: sync: atomically switch chains when checkpointing (#11595)
We can now atomically switch chains when checkpointing. Previously,
we'd call `SetHead` followed by `SetCheckpoint`. Unfortunately, that's
not atomic and the "head" could have reverted before we called
`SetCheckpoint` (causing the latter to fail).

Now, we just call `SetCheckpoint` and let `SetCheckpoint` adjust our
head. This changes the behavior of `ChainStore.SetCheckpoint`, but
`Syncer.SyncCheckpoint` is the only caller anyways.
2024-01-26 08:50:32 -08:00
Aayush Rajasekaran
c4214e23bf
Merge pull request #11206 from AnomalRoil/fix/ctxonlongops
fix: chain: cancel long operations upon ctx cancelation
2023-08-28 13:33:08 -04:00
Yolan Romailler
13ade62e27 fix: cancel long operations upon ctx cancelation 2023-08-24 15:30:33 +02:00
Marten Seemann
bca0ec4f9c update go-libp2p v0.30.0 2023-08-21 10:44:37 +07:00
Aayush
12e076e9ea fix: chainstore: do not get stuck in unhappy equivocation cases 2023-08-11 17:32:39 -04:00
Aayush
0ff334912b Address review 2023-08-09 19:28:24 -04:00
Aayush
52657c5cb0 feat: chainstore: FRC-0051: Remove all equivocated blocks from tipsets 2023-08-09 19:28:24 -04:00
Shrenuj Bansal
b0d1385273 Check if epoch is negative in GetTipsetByHeight 2023-05-16 21:19:03 -04:00
Aayush
596b01fba2 feat: chainstore: exit early in MaybeTakeHeavierTipset 2023-05-05 13:56:48 -04:00
Aayush
49f5825296 feat: chainstore: batch writes of tipsets 2023-05-02 17:26:07 -04: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
Jorropo
fe42d974a2 chore: all: migrate from go-libipfs to boxo
github.com/ipfs/libipfs/blocks was unmigrated to github.com/ipfs/go-block-format due to compatibility issues with the rest of the IPLD stack.
2023-04-18 17:22:18 +02: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
f291572b4a Merge branch 'release/v1.20.0' into asr/merge-release-into-master 2023-02-03 09:27:04 -05:00
raulk
b46258d0bf
feat: evm: align events implementation with FIP-0049 and FIP-0054. (#10152)
- Event keys are now t1, t2, t3, t4 for topics; and d for data.
- ref-fvm no longer stores events in the blockstore for us. It just
  returns events to the client, who is now responsible for handling
  them as it wishes / according to its configuration.
- Add a flag to VMOpts to have the events AMT be written in the blockstore.
- Add a flag to the ChainStore to advertise to the rest of the system
  if the ChainStore is storing events.
- Enable that flag if the EthRPC is enabled (can also add an explicit
  configuration flag if wanted).
2023-02-02 19:10:30 -08:00
Jorropo
f572852d06 chore: all: bump go-libipfs to replace go-block-format
Includes changes from:
- https://github.com/ipfs/go-block-format/pull/37
- https://github.com/ipfs/go-libipfs/pull/58
2023-01-26 17:03:18 +01:00
Aayush
5518e64574 fix: chain: put tipsetkey upon expansion of tipset 2023-01-19 11:33:49 -05:00
Shrenuj Bansal
ee54a7f3f5
feat: snapshot: Store tipset key cids in chain store during snapshot import (#10042)
* Store tipset key cids in chain store during snapshot import

* make gen

* fix circle ci config

* fix lint

* address comments
2023-01-18 11:22:05 -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
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 Rajasekaran
ddc46fc059 Update to filecoin pubsub 2022-05-10 16:51:36 -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
Aayush Rajasekaran
c3c46e9097 Fix Drand fetching around null tipsets 2021-09-29 11:57:59 -04:00
Aayush Rajasekaran
44405bd1a0 ChainStore: Add a tiebreaker rule for tipsets of equal weight 2021-09-27 10:23:30 -04:00
Łukasz Magiera
95b128b7bc chain: Cleanup consensus logic 2021-09-02 18:09:37 +02:00
Steven Allen
43bbde1e6b fix: close chain head subscription when the reader is slow
The reader can just re-subscribe when they're ready to catch up. This
prevents a slow reader from bogging down the entire system.
2021-08-30 16:43:21 -07:00
Steven Allen
14754f1b18 chore: dedup datastore import 2021-08-30 16:43:21 -07:00
Łukasz Magiera
e7d73cbe56 vm: Remove unused ActorBalance 2021-07-27 15:34:39 +02:00
Łukasz Magiera
9bd312881d VMSys doesn't belong in chainstore 2021-07-27 15:30:23 +02:00
Łukasz Magiera
6ba42e3e6b chainstore: refactor store.go into more subfiles 2021-07-27 14:41:36 +02:00
Łukasz Magiera
b37a66c7c9 Merge remote-tracking branch 'origin/release/v1.10.0' into chore/merge-1.10 2021-06-21 17:03:03 +02:00
Łukasz Magiera
2c2c37a138 chainstore: Don't take heaviestLk with backlogged reorgCh 2021-06-18 19:18:51 +02: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
Łukasz Magiera
ffa47659a1 Merge remote-tracking branch 'origin/feat/nv13' into feat/nv13-1.11 2021-05-31 21:38:34 +02:00
Aayush Rajasekaran
21b4741e30 Fix randomness fetching around null blocks 2021-05-26 21:06:06 -04:00
raulk
996feda1f7
typo.
Co-authored-by: dirkmc <dirkmdev@gmail.com>
2021-05-19 15:08:14 +01:00
Raúl Kripalani
c77f8fb382 adopt clearer method names; fix typo. 2021-05-15 15:07:02 +01:00
Raúl Kripalani
5daacc0f07 docs: add docs to chain store methods. 2021-05-13 13:08:52 +01: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
Peter Rabbitson
7bced1532b Convert the chainstore lock to RW
High read-API concurrency facilitates multiple calls to GetHeaviestTipSet
which in turn could slow down chainsync.
2021-04-06 13:01:48 +02:00
Raúl Kripalani
b1b452bc0f remove dependency from blockstore/splitstore => chain/store. 2021-03-05 14:46:18 +02:00
Raúl Kripalani
1ac0c9a926 address review comments. 2021-03-02 21:29:24 +00:00
Raúl Kripalani
2047a74958 implement blockstore.Union, a union blockstore.
The union blockstore takes a list of blockstores. It returns the first
satisfying read, and broadcasts writes to all stores.

It can be used for operations that require reading from any two blockstores,
for example WalkSnapshot.
2021-03-02 17:03:11 +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
b0cbc932bd consolidate all blockstores in blockstore package. 2021-01-29 20:01:00 +00:00