Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- chore: upgrade drand client. ([filecoin-project/lotus#12830](https://github.com/filecoin-project/lotus/pull/12830))
- chore: upgrade go-state-types with big.Int{} change that means an empty big.Int is now treated as zero for all operations ([filecoin-project/lotus#12936](https://github.com/filecoin-project/lotus/pull/12936))
- fix!: change circulating supply calculation for calibnet, butterflynet and 2k for nv25 upgrade. ([filecoin-project/lotus#12938](https://github.com/filecoin-project/lotus/pull/12938))
- feat: add DailyFee integration tests ([filecoin-project/lotus#12942](https://github.com/filecoin-project/lotus/pull/12942))

# UNRELEASED v.1.32.0

Expand Down
1 change: 1 addition & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,7 @@ const (
type Deadline struct {
PostSubmissions bitfield.BitField
DisputableProofCount uint64
DailyFee abi.TokenAmount
}

type Partition struct {
Expand Down
7 changes: 6 additions & 1 deletion build/openrpc/full.json
Original file line number Diff line number Diff line change
Expand Up @@ -21786,14 +21786,19 @@
5,
1
],
"DisputableProofCount": 42
"DisputableProofCount": 42,
"DailyFee": "0"
}
]
],
"items": [
{
"additionalProperties": false,
"properties": {
"DailyFee": {
"additionalProperties": false,
"type": "object"
},
"DisputableProofCount": {
"title": "number",
"type": "number"
Expand Down
7 changes: 6 additions & 1 deletion build/openrpc/gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -10185,14 +10185,19 @@
5,
1
],
"DisputableProofCount": 42
"DisputableProofCount": 42,
"DailyFee": "0"
}
]
],
"items": [
{
"additionalProperties": false,
"properties": {
"DailyFee": {
"additionalProperties": false,
"type": "object"
},
"DisputableProofCount": {
"title": "number",
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions chain/actors/builtin/miner/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ type Deadline interface {

PartitionsChanged(Deadline) (bool, error)
DisputableProofCount() (uint64, error)
DailyFee() (abi.TokenAmount, error)
}

type Partition interface {
Expand Down
1 change: 1 addition & 0 deletions chain/actors/builtin/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ type Deadline interface {

PartitionsChanged(Deadline) (bool, error)
DisputableProofCount() (uint64, error)
DailyFee() (abi.TokenAmount, error)
}

type Partition interface {
Expand Down
17 changes: 16 additions & 1 deletion chain/actors/builtin/miner/state.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,15 @@ func (d *deadline{{.v}}) DisputableProofCount() (uint64, error) {
{{end}}
}

func (d *deadline{{.v}}) DailyFee() (abi.TokenAmount, error) {
{{- if (ge .v 16)}}
if d.Deadline.DailyFee.Int != nil {
return d.Deadline.DailyFee, nil
}
{{- end}}
return big.Zero(), nil
}

func (p *partition{{.v}}) AllSectors() (bitfield.BitField, error) {
return p.Partition.Sectors, nil
}
Expand All @@ -569,6 +578,12 @@ func (p *partition{{.v}}) UnprovenSectors() (bitfield.BitField, error) {
}

func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorOnChainInfo {
{{- if (ge .v 16)}}
dailyFee := v{{.v}}.DailyFee
if dailyFee.Int == nil {
dailyFee = big.Zero()
}
{{- end}}
info := SectorOnChainInfo{
SectorNumber: v{{.v}}.SectorNumber,
SealProof: v{{.v}}.SealProof,
Expand All @@ -590,7 +605,7 @@ func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorO
Flags: SectorOnChainInfoFlags(v{{.v}}.Flags),
{{- end}}
{{- if (ge .v 16)}}
DailyFee: v{{.v}}.DailyFee,
DailyFee: dailyFee,
{{- else}}
DailyFee: big.Zero(),
{{- end}}
Expand Down
4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v0.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v10.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v11.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v12.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v13.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v14.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v15.go

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

14 changes: 13 additions & 1 deletion chain/actors/builtin/miner/v16.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v2.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v3.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v4.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v5.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v6.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v7.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v8.go

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

4 changes: 4 additions & 0 deletions chain/actors/builtin/miner/v9.go

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

3 changes: 2 additions & 1 deletion documentation/en/api-v0-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -4952,7 +4952,8 @@ Response:
5,
1
],
"DisputableProofCount": 42
"DisputableProofCount": 42,
"DailyFee": "0"
}
]
```
Expand Down
3 changes: 2 additions & 1 deletion documentation/en/api-v1-unstable-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -7383,7 +7383,8 @@ Response:
5,
1
],
"DisputableProofCount": 42
"DisputableProofCount": 42,
"DailyFee": "0"
}
]
```
Expand Down
Loading