Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.
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
2 changes: 1 addition & 1 deletion actors/builtin/miner/cbor_gen.go

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

6 changes: 4 additions & 2 deletions actors/builtin/miner/deadline_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"bytes"
"errors"

prooftypes "github.com/filecoin-project/go-state-types/proof"

"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
Expand Down Expand Up @@ -1143,7 +1145,7 @@ func (dl *Deadline) RecordProvenSectors(

// RecordPoStProofs records a set of optimistically accepted PoSt proofs
// (usually one), associating them with the given partitions.
func (dl *Deadline) RecordPoStProofs(store adt.Store, partitions bitfield.BitField, proofs []proof.PoStProof) error {
func (dl *Deadline) RecordPoStProofs(store adt.Store, partitions bitfield.BitField, proofs []prooftypes.PoStProof) error {
proofArr, err := dl.OptimisticProofsArray(store)
if err != nil {
return xerrors.Errorf("failed to load proofs: %w", err)
Expand All @@ -1167,7 +1169,7 @@ func (dl *Deadline) RecordPoStProofs(store adt.Store, partitions bitfield.BitFie
// TakePoStProofs removes and returns a PoSt proof by index, along with the
// associated partitions. This method takes the PoSt from the PoSt submissions
// snapshot.
func (dl *Deadline) TakePoStProofs(store adt.Store, idx uint64) (partitions bitfield.BitField, proofs []proof.PoStProof, err error) {
func (dl *Deadline) TakePoStProofs(store adt.Store, idx uint64) (partitions bitfield.BitField, proofs []prooftypes.PoStProof, err error) {
proofArr, err := dl.OptimisticProofsSnapshotArray(store)
if err != nil {
return bitfield.New(), nil, xerrors.Errorf("failed to load proofs: %w", err)
Expand Down
10 changes: 7 additions & 3 deletions actors/builtin/miner/miner_actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import (
"fmt"
"math"

prooftypes "github.com/filecoin-project/go-state-types/proof"

minertypes "github.com/filecoin-project/go-state-types/builtin/v8/miner"

addr "github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-state-types/abi"
Expand Down Expand Up @@ -312,7 +316,7 @@ func (a Actor) ChangeMultiaddrs(rt Runtime, params *ChangeMultiaddrsParams) *abi
// // Sectors skipped while proving that weren't already declared faulty
// Skipped bitfield.BitField
//}
type PoStPartition = miner0.PoStPartition
type PoStPartition = minertypes.PoStPartition

// Information submitted by a miner to provide a Window PoSt.
//type SubmitWindowedPoStParams struct {
Expand All @@ -330,7 +334,7 @@ type PoStPartition = miner0.PoStPartition
// // The ticket randomness on the chain at the chain commit epoch.
// ChainCommitRand abi.Randomness
//}
type SubmitWindowedPoStParams = miner0.SubmitWindowedPoStParams
type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these param substitutions need to happen here in the same way the proof types change needs to happen?

Copy link
Collaborator Author

@arajasek arajasek May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because the runtime verification calls want them to be the same type.


// Invoked by miner's worker address to submit their fallback post
func (a Actor) SubmitWindowedPoSt(rt Runtime, params *SubmitWindowedPoStParams) *abi.EmptyValue {
Expand Down Expand Up @@ -2251,7 +2255,7 @@ func (a Actor) ProveReplicaUpdates(rt Runtime, params *ProveReplicaUpdatesParams
builtin.RequirePredicate(rt, updateWithDetails.update.UpdateProofType == updateProofType, exitcode.ErrIllegalArgument, "unsupported update proof type %d", updateWithDetails.update.UpdateProofType)

err = rt.VerifyReplicaUpdate(
proof.ReplicaUpdateInfo{
prooftypes.ReplicaUpdateInfo{
UpdateProofType: updateProofType,
NewSealedSectorCID: updateWithDetails.update.NewSealedSectorCID,
OldSealedSectorCID: updateWithDetails.sectorInfo.SealedCID,
Expand Down
Loading