Skip to content

Commit dbec7a0

Browse files
committed
Merge branch 'main' into feat/market
2 parents e2e0411 + b2e2def commit dbec7a0

File tree

73 files changed

+3509
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3509
-119
lines changed

Makefile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ BUILD_DEPS+=ffi-version-check
2424

2525
.PHONY: ffi-version-check
2626

27+
## BLST (from supraseal, but needed in curio)
28+
29+
BLST_PATH:=extern/supra_seal/
30+
BLST_DEPS:=.install-blst
31+
BLST_DEPS:=$(addprefix $(BLST_PATH),$(BLST_DEPS))
32+
33+
$(BLST_DEPS): build/.blst-install ;
34+
35+
build/.blst-install: $(BLST_PATH)
36+
bash scripts/build-blst.sh
37+
@touch $@
38+
39+
MODULES+=$(BLST_PATH)
40+
BUILD_DEPS+=build/.blst-install
41+
CLEAN+=build/.blst-install
42+
2743
## SUPRA-FFI
2844

2945
ifeq ($(shell uname),Linux)
@@ -37,7 +53,7 @@ build/.supraseal-install: $(SUPRA_FFI_PATH)
3753
cd $(SUPRA_FFI_PATH) && ./build.sh
3854
@touch $@
3955

40-
MODULES+=$(SUPRA_FFI_PATH)
56+
# MODULES+=$(SUPRA_FFI_PATH) -- already included in BLST_PATH
4157
CLEAN+=build/.supraseal-install
4258
endif
4359

alertmanager/task_alert.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"github.com/filecoin-project/curio/harmony/harmonydb"
2020
"github.com/filecoin-project/curio/harmony/harmonytask"
2121
"github.com/filecoin-project/curio/harmony/resources"
22+
"github.com/filecoin-project/curio/harmony/taskhelp"
2223

2324
"github.com/filecoin-project/lotus/api"
2425
"github.com/filecoin-project/lotus/chain/types"
@@ -161,7 +162,7 @@ func (a *AlertTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.Task
161162

162163
func (a *AlertTask) TypeDetails() harmonytask.TaskTypeDetails {
163164
return harmonytask.TaskTypeDetails{
164-
Max: 1,
165+
Max: taskhelp.Max(1),
165166
Name: "AlertManager",
166167
Cost: resources.Resources{
167168
Cpu: 1,

cmd/curio/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func main() {
6464
webCmd,
6565
guidedsetup.GuidedsetupCmd,
6666
sealCmd,
67+
unsealCmd,
6768
marketCmd,
6869
fetchParamCmd,
6970
ffiCmd,
File renamed without changes.

cmd/curio/tasks/tasks.go

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/filecoin-project/curio/deps/config"
2424
"github.com/filecoin-project/curio/harmony/harmonydb"
2525
"github.com/filecoin-project/curio/harmony/harmonytask"
26+
"github.com/filecoin-project/curio/harmony/taskhelp"
2627
"github.com/filecoin-project/curio/lib/chainsched"
2728
"github.com/filecoin-project/curio/lib/curiochain"
2829
"github.com/filecoin-project/curio/lib/fastparamfetch"
@@ -37,10 +38,12 @@ import (
3738
"github.com/filecoin-project/curio/tasks/message"
3839
"github.com/filecoin-project/curio/tasks/metadata"
3940
piece2 "github.com/filecoin-project/curio/tasks/piece"
41+
"github.com/filecoin-project/curio/tasks/scrub"
4042
"github.com/filecoin-project/curio/tasks/seal"
4143
"github.com/filecoin-project/curio/tasks/sealsupra"
4244
"github.com/filecoin-project/curio/tasks/snap"
4345
storage_market "github.com/filecoin-project/curio/tasks/storage-market"
46+
"github.com/filecoin-project/curio/tasks/unseal"
4447
window2 "github.com/filecoin-project/curio/tasks/window"
4548
"github.com/filecoin-project/curio/tasks/winning"
4649

@@ -295,6 +298,11 @@ func addSealingTasks(
295298
var addFinalize bool
296299

297300
// NOTE: Tasks with the LEAST priority are at the top
301+
if cfg.Subsystems.EnableCommP {
302+
scrubUnsealedTask := scrub.NewCommDCheckTask(db, slr)
303+
activeTasks = append(activeTasks, scrubUnsealedTask)
304+
}
305+
298306
if cfg.Subsystems.EnableBatchSeal {
299307
slotMgr = slotmgr.NewSlotMgr()
300308

@@ -313,8 +321,12 @@ func addSealingTasks(
313321
}
314322

315323
if cfg.Subsystems.EnableSealSDR {
316-
sdrTask := seal.NewSDRTask(full, db, sp, slr, cfg.Subsystems.SealSDRMaxTasks, cfg.Subsystems.SealSDRMinTasks)
317-
activeTasks = append(activeTasks, sdrTask)
324+
sdrMax := taskhelp.Max(cfg.Subsystems.SealSDRMaxTasks)
325+
326+
sdrTask := seal.NewSDRTask(full, db, sp, slr, sdrMax, cfg.Subsystems.SealSDRMinTasks)
327+
keyTask := unseal.NewTaskUnsealSDR(slr, db, sdrMax, full)
328+
329+
activeTasks = append(activeTasks, sdrTask, keyTask)
318330
}
319331
if cfg.Subsystems.EnableSealSDRTrees {
320332
treeDTask := seal.NewTreeDTask(sp, db, slr, cfg.Subsystems.SealSDRTreesMaxTasks)
@@ -340,6 +352,11 @@ func addSealingTasks(
340352
moveStorageTask := seal.NewMoveStorageTask(sp, slr, db, cfg.Subsystems.MoveStorageMaxTasks)
341353
moveStorageSnapTask := snap.NewMoveStorageTask(slr, db, cfg.Subsystems.MoveStorageMaxTasks)
342354
activeTasks = append(activeTasks, moveStorageTask, moveStorageSnapTask)
355+
356+
if !cfg.Subsystems.NoUnsealedDecode {
357+
unsealTask := unseal.NewTaskUnsealDecode(slr, db, cfg.Subsystems.MoveStorageMaxTasks, full)
358+
activeTasks = append(activeTasks, unsealTask)
359+
}
343360
}
344361
if cfg.Subsystems.EnableSendCommitMsg {
345362
commitTask := seal.NewSubmitCommitTask(sp, db, full, sender, as, cfg)

0 commit comments

Comments
 (0)