Skip to content

Commit

Permalink
Merge pull request #1057 from ipfs-force-community/cherry-pick-pr-105…
Browse files Browse the repository at this point in the history
…5-1056-to-release-v0.9

Cherry pick #1055 #1056 to release v0.9
  • Loading branch information
0x5459 authored Dec 13, 2023
2 parents f3c5400 + d1e2d67 commit 1c071f8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
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

0 comments on commit 1c071f8

Please sign in to comment.