Commit Graph

40 Commits

Author SHA1 Message Date
Aayush Rajasekaran
f1ded63d60 v4 specs-actors integration, nv12 migration 2021-04-27 02:02:44 -04:00
Aayush Rajasekaran
29d3d746a3 Build a WindowPoSt disputer 2021-01-25 17:26:09 -05:00
Aayush Rajasekaran
ab90a3b2bc Actors update: MinerInfo.SealProofType has been removed 2021-01-21 15:21:19 -08:00
Aayush Rajasekaran
82635f2515 Rename Deadline.PoStSubmissions to PartitionsPoSted 2021-01-21 15:21:19 -08:00
frrist
0d384050fa polish: add Equals method to MinerInfo shim 2020-10-26 14:45:02 -07:00
frrist
ea1349205b fix: return true when partitions changed 2020-10-14 14:37:33 -07:00
frrist
470a565c34 fix: return true when deadlines changed 2020-10-14 14:27:35 -07:00
Aayush Rajasekaran
96e1dfd8d7 Add an endpoint for precise circulating supply 2020-10-12 16:38:29 -04:00
Aayush Rajasekaran
4a9155ba85 Use new MinerEligibleToMine method post-v2 actors 2020-10-06 04:43:55 -04:00
Steven Allen
947d1e2902 Merge branch 'master' into asr/spec-v1 2020-09-28 12:53:40 -07:00
Steven Allen
d9656f5220 add a generic load method for actor state
This will make it easier to load arbitrary actors. We can:

* Type switch (sort of unsafe, may want marker methods?)
* Use this with `vm.MutateActorState`.
2020-09-25 12:49:39 -07:00
Steven Allen
bdc782617f return an error when we fail to find a sector when checking sector expiration
Returning nil, nil is a footgun.

fix: https://github.com/filecoin-project/lotus/issues/3984
2020-09-25 11:28:38 -07:00
Steven Allen
1c1d23d142 fix out-of-bounds when loading all sector infos
fixes #3972
2020-09-23 12:40:44 -07:00
Aayush Rajasekaran
476e7992e8 Add an error return to all actor state interface methods 2020-09-23 01:51:38 -04:00
Steven Allen
916421b247 convert lotus-shed balances 2020-09-21 13:43:47 -07:00
Steven Allen
4cf0c105eb optimize sector loading
And avoid exposing "arrays" via the miner abstraction. We may change these
structures later.
2020-09-21 12:12:08 -07:00
Łukasz Magiera
0b5e4a9612 Make GetSectorsForWinningPoSt fast again 2020-09-21 18:28:32 +02:00
Aayush Rajasekaran
b355eb75eb Add compile-time checks that actors interfaces are correctly implemented 2020-09-21 02:19:32 -04:00
Aayush Rajasekaran
a95e34f742 Fix build 2020-09-21 02:02:33 -04:00
Aayush Rajasekaran
ed285f1114 Abstract SectorOnChainInfo and SectorPreCommitOnChainInfo 2020-09-21 01:09:42 -04:00
Łukasz Magiera
b25dd2a00d More correct / fasterer GetSectorsForWinningPoSt 2020-09-20 23:04:45 +02:00
Steven Allen
35bce5a5c6 revert post changes
1. Calling the specific partition/deadline APIs is faster.
2. It's _much_ easier to test this way.
2020-09-18 15:40:49 -07:00
Steven Allen
1bf3b4989d rename imports to match actors code
`sed -i 's/\bv0\(\w\)\(\w*\)/\L\1\E\20/g' **/*.go`
2020-09-18 14:59:27 -07:00
Steven Allen
8285eda8e5 migrate storage miner info 2020-09-18 14:46:42 -07:00
Łukasz Magiera
70faa36b7f Merge remote-tracking branch 'origin/master' into refactor/net-upgrade 2020-09-18 19:29:06 +02:00
Aayush Rajasekaran
37de154a7c Fixup tests 2020-09-18 01:56:21 -04:00
Steven Allen
b2ee59024f improve diff logic
* Make diffing work across versions.
* Start porting more chainwatch logic.
2020-09-17 21:39:34 -07:00
Steven Allen
ae38970526 remove WpostProvignPeriod function 2020-09-17 14:56:11 -07:00
Łukasz Magiera
6eda53565f Most tests passing 2020-09-17 17:30:24 +02:00
Aayush Rajasekaran
31ff5230bb Get State API almost working 2020-09-17 05:05:32 -04:00
Aayush Rajasekaran
b5ba7a0fad Miner migration 2020-09-17 02:21:16 -04:00
Aayush Rajasekaran
b530f25f09 Migrate miner actor 2020-09-16 17:20:25 -04:00
Steven Allen
91e9573863 Compile fixes 2020-09-15 12:13:13 -07:00
Steven Allen
6bf7976add fix decode 2020-09-15 10:51:18 -07:00
Steven Allen
00c6397ec9 more progress 2020-09-15 10:46:44 -07:00
Łukasz Magiera
4419850195 state api impl fixes 2020-09-15 15:29:25 +02:00
Łukasz Magiera
4dabab5ce6 state manager progress 2020-09-15 13:04:45 +02:00
Steven Allen
36f920bcd7 progress 2020-09-14 21:55:49 -07:00
Łukasz Magiera
38f87981c1 Fix some build errors 2020-09-14 13:14:06 +02:00
Steven Allen
d3594835c4 [WIP] Network upgrade support
This patch starts adding support for network upgrades.

* It adds an actors abstraction layer for loading abstract (cross-version) actors.
* It starts switching over to a shared deadline type.
* It adds an abstraction for ADTs (hamt/amt).
* It removes the callback-based API in the StateManager (difficult to abstract
across actor versions).
* It _does not_ actually add support for actors v2. We can do that in a followup
patch but that should be relatively easy.

This patch is heavily WIP and does not compile. Feel free to push changes
directly to this branch.

Notes:

* State tree access now needs a network version, because the HAMT type will change.
* I haven't figured out a nice way to abstract over changes to the _message_
types. However, many of them will be type aliased to actors v0 in actors v2 so
we can likely continue using the v0 versions (or use the v2 versions
everywhere). I've been renaming imports to `v0*` to make it clear that we're
importing types from a _specific_ actors version.

TODO:

* Consider merging incremental improvements? We'd have to get this compiling
again first but we could merge in the new abstractions, and slowly switch over.
* Finish migrating to the new abstractions.
* Remove all actor state types from the public API. See `miner.State.Info()` for
the planned approach here.
* Fix the tests. This is likely going to be a massive pain.
2020-09-11 20:16:29 -07:00