Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick #1055 #1056 to release v0.9 #1057

Merged
merged 3 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.zh.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.9.3
- damocles-manager
- wdpost worker prover 模式,不允许向已完成的任务发送心跳 [#1056](https://github.com/ipfs-force-community/damocles/pull/1056)
- 修复聚合 precommit 使用非聚合 gas fee 配置的 bug [#1055](https://github.com/ipfs-force-community/damocles/pull/1055)

## v0.9.2
- damocles-manager
- 修复对 core.SealerCliAPIClient 错误的依赖注入,导致 damocles-manager 代理模式无法正常启动 [#1047](https://github.com/ipfs-force-community/damocles/pull/1047)
Expand Down
12 changes: 10 additions & 2 deletions damocles-manager/modules/impl/commitmgr/precommit_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
stbuiltin "github.com/filecoin-project/go-state-types/builtin"
"github.com/ipfs/go-cid"

"github.com/filecoin-project/venus/venus-shared/actors/builtin"

Expand Down Expand Up @@ -86,8 +87,15 @@ func (p PreCommitProcessor) Process(ctx context.Context, sectors []core.SectorSt
return fmt.Errorf("couldn't serialize PreCommitSectorBatchParams: %w", err)
}

ccid, err := pushMessage(ctx, ctrlAddr, mid, deposit, stbuiltin.MethodsMiner.PreCommitSectorBatch2,
p.msgClient, &mcfg.Commitment.Pre.Batch.FeeConfig, enc.Bytes(), plog)
var err error
var ccid cid.Cid
if len(infos) > 1 {
ccid, err = pushMessage(ctx, ctrlAddr, mid, deposit, stbuiltin.MethodsMiner.PreCommitSectorBatch2,
p.msgClient, &mcfg.Commitment.Pre.Batch.FeeConfig, enc.Bytes(), plog)
} else {
ccid, err = pushMessage(ctx, ctrlAddr, mid, deposit, stbuiltin.MethodsMiner.PreCommitSectorBatch2,
p.msgClient, &mcfg.Commitment.Pre.FeeConfig, enc.Bytes(), plog)
}
if err != nil {
return fmt.Errorf("push message failed: %w", err)
}
Expand Down
6 changes: 5 additions & 1 deletion damocles-manager/modules/impl/prover/worker/job_mgr_kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,15 @@ func (tm *kvJobManager) Heartbeat(ctx context.Context, jobIDs []string, workerNa
kvstore.LoadJSON(&job),
kvstore.Key(makeWdPoStKey(core.WdPoStJobRunning, jobID)),
kvstore.Key(makeWdPoStKey(core.WdPoStJobReadyToRun, jobID)),
kvstore.Key(makeWdPoStKey(core.WdPoStJobFinished, jobID)),
)
if err != nil {
return err
}

if job.State != string(core.WdPoStJobRunning) {
log.Infof("heartbeat non-running task: %s, state: %s", job.ID, job.State)
}

if err := txn.Del(key); err != nil {
return err
}
Expand All @@ -220,6 +223,7 @@ func (tm *kvJobManager) Heartbeat(ctx context.Context, jobIDs []string, workerNa
if err := txn.PutJson(kvstore.Key(makeWdPoStKey(core.WdPoStJobRunning, jobID)), &job); err != nil {
return err
}

}
return nil
})
Expand Down
2 changes: 1 addition & 1 deletion damocles-manager/ver/ver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ver

import "fmt"

const Version = "0.9.2"
const Version = "0.9.3"

var Commit string

Expand Down
2 changes: 1 addition & 1 deletion damocles-worker/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion damocles-worker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "damocles-worker"
version = "0.9.2"
version = "0.9.3"
authors = ["dtynn <dtynn@163.com>"]
edition = "2021"
exclude = [".github"]
Expand Down
Loading