Commit Graph

116 Commits

Author SHA1 Message Date
Steven Allen
0d06f8fa2b Add commands to change the worker key 2020-10-26 18:16:24 -07:00
wangchao
e65aa4cf17 worker key should change when set sender found key not equal with the value on chain 2020-10-26 15:20:09 +08:00
Steven Allen
109b326ae2 Use older randomness for the PoSt commit on specs-actors version 2
After the upgrade, we're allowed to use randomness up to the challenge epoch.
This safe-guards us against very large reorgs where a miner computes a PoSt very
quickly.
2020-10-23 12:45:11 -07:00
Łukasz Magiera
29e334de54
Merge pull request #4511 from filecoin-project/steb/generalize-window-post
Manage sectors by size instead of proof type.
2020-10-22 21:27:48 +02:00
Steven Allen
bcabe7b3b5 migrate methods to abstracted methods
Method numbers never change anyways. At worst, we'll deprecate old methods and
have to explicitly import them from the correct actors version to use them.
2020-10-21 12:18:37 -07:00
Steven Allen
4e730b5ec8 port to v2 imports 2020-10-21 12:16:23 -07:00
Steven Allen
00dcb1bce9 Manage sectors by size instead of proof type.
* We may have multiple sectors with the same size and different proof types, but all these management functions stay the same.
* This simplifies PoSt logic.
2020-10-20 18:30:56 -07:00
Steven Allen
748d2e82a7 unshare the journal
Motivation:

* Run lotus with the race detector enabled (primary motivation).
* Allow multiple lotus nodes in a process (not a high priority).

Previously, the journal was shared between all lotus instances, but it was
initialized for every new node. This caused safety problems in tests (at a
minimum).

This patch explicitly passes the journal to all services that need it.
2020-10-09 13:23:07 -07:00
Steven Allen
196bf39574 use non-faulty sectors, instead of active, in post proof
In actors v2, active doesn't include "new" (unproven) sectors.
2020-09-30 17:35:14 -07:00
Łukasz Magiera
7a3a2f8db9
Merge pull request #3924 from filecoin-project/feat/dont-recompute-PoST-redux
Dont recompute post on revert <<redux>>
2020-09-30 09:18:46 +02:00
Łukasz Magiera
ef28ebb14a Ignition upgrades, much excite. 2020-09-25 23:55:37 -07:00
Dirk McCormick
7eb9bec13f feat: dont recompute post on submit redux 2020-09-24 14:38:33 +02:00
Steven Allen
63f026f7c3 migrate some more imports 2020-09-21 15:24:45 -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
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
Łukasz Magiera
70faa36b7f Merge remote-tracking branch 'origin/master' into refactor/net-upgrade 2020-09-18 19:29:06 +02:00
Łukasz Magiera
26bbd9fb9d wdpost: append is hard 2020-09-18 03:00:31 +02:00
Łukasz Magiera
8419dda84b wdpost: Only add proven partitions to message params 2020-09-18 02:39:08 +02:00
Aayush Rajasekaran
b5ba7a0fad Miner migration 2020-09-17 02:21:16 -04:00
jennijuju
5c69249ba3 Use window post for window PoSt related log messages. 2020-09-15 21:22:29 -04:00
Dirk McCormick
db998e9c0f fix: storage - move rand generation after proofs 2020-09-15 09:52:55 +02:00
Dirk McCormick
f0f15f899c feat: split window PoST messages into batches 2020-09-15 09:43:18 +02:00
Steven Allen
02dcb5e182 Merge branch 'master' into refactor/net-upgrade 2020-09-14 14:53:57 -07:00
Steven Allen
2088335b9d rename to simplify merge 2020-09-14 14:40:52 -07:00
Łukasz Magiera
8a05fe86d6 wdpost: Skip sectors correctly 2020-09-14 20:33:54 +02:00
Łukasz Magiera
06ec571c20 Merge remote-tracking branch 'origin/master' into refactor/net-upgrade 2020-09-14 15:09:52 +02:00
Raúl Kripalani
6d29d75724 Merge branch 'master' into inmem-journal 2020-09-14 12:17:45 +01: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
Łukasz Magiera
d0175392c0 Merge remote-tracking branch 'origin/master' into feat/window-post-faulty-sectors 2020-09-11 10:47:39 +02:00
Aayush Rajasekaran
774e068436 Update to specs-actors v0.9.8 2020-09-10 17:41:55 -04:00
Łukasz Magiera
5e7737f55d wdpost: Handle skipped sectors correctly 2020-09-10 02:59:37 +02:00
whyrusleeping
7a6ceebb34 windowed post generation now returns faulty sectors 2020-09-09 14:00:15 -07:00
Steven Allen
afa913f2ed Remove hard-coded late-fee in window PoSt
This is no longer necessary, and doesn't really serve any purpose.
2020-09-09 11:34:55 -07:00
Aayush Rajasekaran
d678fe4bfa Fix tests 2020-09-07 15:48:42 -04:00
Aayush Rajasekaran
39755a294a Update to specs v0.9.6 2020-09-07 15:48:41 -04:00
Raúl Kripalani
3206f92063 Merge branch 'master' into inmem-journal 2020-09-02 19:50:52 +01:00
Raúl Kripalani
f046af337a split wdpost event into finer-grained ones. 2020-09-02 19:45:25 +01:00
Raúl Kripalani
ac152abc75 shuffle code to journal wdpost events. 2020-09-02 19:15:25 +01:00
Steven Allen
0155a31d1f Fix PoSt with bad sectors
"skipped" sectors must be replaced with a substitute "good" sector, or the
entire partition must be skipped. They should not just be omitted.

This patch also fixes the test to verify the _entire_ proof instead of just
verifying that the proof includes the correct sectors.
2020-08-26 09:56:51 -07:00
Raúl Kripalani
efdfd3ee3e Merge branch 'master' into inmem-journal 2020-08-26 16:38:23 +01:00
Raúl Kripalani
4e1ef09751 make journal a global var. 2020-08-26 16:09:37 +01:00
Steven Allen
5733c71c50 Lint everything
We were ignoring quite a few error cases, and had one case where we weren't
actually updating state where we wanted to. Unfortunately, if the linter doesn't
pass, nobody has any reason to actually check lint failures in CI.

There are three remaining XXXs marked in the code for lint.
2020-08-20 20:46:36 -07:00
Łukasz Magiera
a4807b18bc gofmt, api docstring 2020-08-20 01:26:13 +02:00
Łukasz Magiera
71cf358ee3 Fix windowpost test 2020-08-20 01:18:01 +02:00
Łukasz Magiera
5ea61abfe1 Wire up miner control addresses, use for post 2020-08-20 01:17:03 +02:00
Raúl Kripalani
efdc428d5d keep storage-fsm (renamed to storage-sealing) and sector-storage in extern. 2020-08-17 14:26:18 +01:00
Łukasz Magiera
42bb91c2e6 gofmt 2020-08-14 23:40:41 +02:00
Łukasz Magiera
25cb3a15e7 wdpost: Wait for the correct confidence 2020-08-14 21:03:20 +02:00
Łukasz Magiera
12f7e2d9bf Use a struct for send metadata in MpoolPushMessage 2020-08-12 22:17:29 +02:00
Łukasz Magiera
e1a1b325bc Merge remote-tracking branch 'origin/next' into feat/max-msg-fee-config 2020-08-12 21:55:03 +02:00