Skip to content

Commit 5405f01

Browse files
authored
fix: StateEncodeParams API panic with Market Actor SectorContentChanged method (#411)
* fix: add CBOR marshalling for SectorContentChangedParams to prevent StateEncodeParams panic fix: add CBOR marshalling for SectorContentChangedParams to prevent StateEncodeParams panic * chore: remove empty test-file chore: remove empty test-file * fix(miner): add SectorContentChangedParams to cbor-gen Fixes StateEncodeParams API panic when called with Market Actor's SectorContentChanged method by adding SectorContentChangedParams to cbor-gen for proper CBOR marshalling across actor versions v13-v17. - Convert SectorContentChangedParams from type alias to proper type - Add SectorContentChangedParams to gen.go files for automatic generation - Regenerate CBOR marshalling methods using cbor-gen
1 parent 193a96c commit 5405f01

File tree

15 files changed

+355
-5
lines changed

15 files changed

+355
-5
lines changed

builtin/v13/gen/gen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ func main() {
202202
miner.DataActivationNotification{},
203203
miner.ProveReplicaUpdates3Params{},
204204
miner.SectorUpdateManifest{},
205+
miner.SectorContentChangedParams{},
205206
miner.SectorChanges{},
206207
miner.PieceChange{},
207208
// other types

builtin/v13/miner/cbor_gen.go

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builtin/v13/miner/miner_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ type SectorUpdateManifest struct {
462462
type ProveReplicaUpdates3Return = batch.BatchReturn
463463

464464
// SectorContentChangedParams represents a notification of change committed to sectors.
465-
type SectorContentChangedParams = []SectorChanges
465+
type SectorContentChangedParams []SectorChanges
466466

467467
// SectorChanges describes changes to one sector's content.
468468
type SectorChanges struct {

builtin/v14/gen/gen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ func main() {
202202
miner.DataActivationNotification{},
203203
miner.ProveReplicaUpdates3Params{},
204204
miner.SectorUpdateManifest{},
205+
miner.SectorContentChangedParams{},
205206
miner.SectorChanges{},
206207
miner.PieceChange{},
207208
// other types

builtin/v14/miner/cbor_gen.go

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builtin/v14/miner/miner_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ type SectorUpdateManifest struct {
462462
type ProveReplicaUpdates3Return = batch.BatchReturn
463463

464464
// SectorContentChangedParams represents a notification of change committed to sectors.
465-
type SectorContentChangedParams = []SectorChanges
465+
type SectorContentChangedParams []SectorChanges
466466

467467
// SectorChanges describes changes to one sector's content.
468468
type SectorChanges struct {

builtin/v15/gen/gen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ func main() {
202202
miner.DataActivationNotification{},
203203
miner.ProveReplicaUpdates3Params{},
204204
miner.SectorUpdateManifest{},
205+
miner.SectorContentChangedParams{},
205206
miner.SectorChanges{},
206207
miner.PieceChange{},
207208
// other types

builtin/v15/miner/cbor_gen.go

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

builtin/v15/miner/miner_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ type SectorUpdateManifest struct {
462462
type ProveReplicaUpdates3Return = batch.BatchReturn
463463

464464
// SectorContentChangedParams represents a notification of change committed to sectors.
465-
type SectorContentChangedParams = []SectorChanges
465+
type SectorContentChangedParams []SectorChanges
466466

467467
// SectorChanges describes changes to one sector's content.
468468
type SectorChanges struct {

builtin/v16/gen/gen.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ func main() {
204204
miner.DataActivationNotification{},
205205
miner.ProveReplicaUpdates3Params{},
206206
miner.SectorUpdateManifest{},
207+
miner.SectorContentChangedParams{},
207208
miner.SectorChanges{},
208209
miner.PieceChange{},
209210
// other types

0 commit comments

Comments
 (0)