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

chore: Use type proxies instead of versioned GST imports #6139

Merged
merged 1 commit into from
Aug 30, 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
2 changes: 0 additions & 2 deletions pkg/chainsync/dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,6 @@ func (d *Dispatcher) IncomingBlocks(ctx context.Context) (<-chan *types2.BlockHe
case out <- blk:
case <-ctx.Done():
return
default:
log.Infof("incoming blocks subscription due to slow reader")
}
}
case <-ctx.Done():
Expand Down
9 changes: 4 additions & 5 deletions venus-devtool/api-gen/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
"github.com/filecoin-project/venus/venus-shared/types/gateway"
Expand Down Expand Up @@ -93,14 +92,14 @@ func init() {
}
addExample(constants.TestNetworkVersion)
addExample(actors.Version6)
allocationID := verifreg.AllocationId(0)
allocationID := types.AllocationId(0)
addExample(allocationID)
addExample(&allocationID)
addExample(map[verifreg.AllocationId]verifreg.Allocation{})
claimID := verifreg.ClaimId(0)
addExample(map[types.AllocationId]types.Allocation{})
claimID := types.ClaimId(0)
addExample(claimID)
addExample(&claimID)
addExample(map[verifreg.ClaimId]verifreg.Claim{})
addExample(map[types.ClaimId]types.Claim{})
textSelExample := textselector.Expression("Links/21/Hash/Links/42/Hash")
clientEvent := retrievalmarket.ClientEventDealAccepted
addExample(bitfield.NewFromSet([]uint64{5}))
Expand Down
2 changes: 1 addition & 1 deletion venus-devtool/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/filecoin-project/go-fil-markets v1.28.3
github.com/filecoin-project/go-jsonrpc v0.3.1
github.com/filecoin-project/go-state-types v0.12.1
github.com/filecoin-project/lotus v1.23.4-0.20230823071126-c1304dee2505
github.com/filecoin-project/lotus v1.23.4-0.20230829140627-a9396624a71f
github.com/filecoin-project/venus v0.0.0-00010101000000-000000000000
github.com/google/uuid v1.3.0
github.com/ipfs/go-block-format v0.1.2
Expand Down
4 changes: 2 additions & 2 deletions venus-devtool/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNd
github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo=
github.com/filecoin-project/kubo-api-client v0.0.1 h1:IR1b+sm+VYxSRvbgECVv9SbhIgygcXcSoN1Q7xsHDXg=
github.com/filecoin-project/kubo-api-client v0.0.1/go.mod h1:c36PPMIVOkKfHDwDG5U05gUlPRY9wNuh/BePwo0e+6Y=
github.com/filecoin-project/lotus v1.23.4-0.20230823071126-c1304dee2505 h1:uFaqwI9EKXNptEVeRDElbwaBmgRZZY7RwE7KOYxfJB0=
github.com/filecoin-project/lotus v1.23.4-0.20230823071126-c1304dee2505/go.mod h1:56nGHg5UYutBuPOQZUfs0aJpdZTt4qFXcxkhQ4y9hrw=
github.com/filecoin-project/lotus v1.23.4-0.20230829140627-a9396624a71f h1:rIEL7rnRE+VU3UEoGHKFbbb1m+dZ/ZSFgW0UNc7pUOQ=
github.com/filecoin-project/lotus v1.23.4-0.20230829140627-a9396624a71f/go.mod h1:56nGHg5UYutBuPOQZUfs0aJpdZTt4qFXcxkhQ4y9hrw=
github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM=
github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg=
github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.sep.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/filecoin-project/venus/venus-shared/actors/adt"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/types"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/go-state-types/manifest"

{{if (le .v 7)}}
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v0.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market0 "github.com/filecoin-project/specs-actors/actors/builtin/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v10.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market10 "github.com/filecoin-project/go-state-types/builtin/v10/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v11.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market11 "github.com/filecoin-project/go-state-types/builtin/v11/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v12.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market12 "github.com/filecoin-project/go-state-types/builtin/v12/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v5.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
cbg "github.com/whyrusleeping/cbor-gen"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v6.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v7.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v8.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
Expand Down
2 changes: 1 addition & 1 deletion venus-shared/actors/builtin/market/state.v9.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"

actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/venus/venus-shared/actors"
"github.com/filecoin-project/venus/venus-shared/actors/adt"
verifregtypes "github.com/filecoin-project/venus/venus-shared/actors/builtin/verifreg"
"github.com/filecoin-project/venus/venus-shared/actors/types"

market9 "github.com/filecoin-project/go-state-types/builtin/v9/market"
Expand Down
29 changes: 29 additions & 0 deletions venus-shared/actors/builtin/miner/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,37 @@ type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange
type WorkerKeyChange = minertypes.WorkerKeyChange
type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo
type SectorPreCommitInfo = minertypes.SectorPreCommitInfo
type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams
type PoStPartition = minertypes.PoStPartition
type RecoveryDeclaration = minertypes.RecoveryDeclaration
type FaultDeclaration = minertypes.FaultDeclaration
type DeclareFaultsRecoveredParams = minertypes.DeclareFaultsRecoveredParams
type DeclareFaultsParams = minertypes.DeclareFaultsParams
type ProveCommitAggregateParams = minertypes.ProveCommitAggregateParams
type ProveCommitSectorParams = minertypes.ProveCommitSectorParams
type ProveReplicaUpdatesParams = minertypes.ProveReplicaUpdatesParams
type ReplicaUpdate = minertypes.ReplicaUpdate
type PreCommitSectorBatchParams = minertypes.PreCommitSectorBatchParams
type PreCommitSectorBatchParams2 = minertypes.PreCommitSectorBatchParams2
type ExtendSectorExpiration2Params = minertypes.ExtendSectorExpiration2Params
type SectorClaim = minertypes.SectorClaim
type ExpirationExtension2 = minertypes.ExpirationExtension2
type CompactPartitionsParams = minertypes.CompactPartitionsParams
type WithdrawBalanceParams = minertypes.WithdrawBalanceParams

var QAPowerMax = minertypes.QAPowerMax

type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo

var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes.WPoStProvingPeriod }
var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes.WPoStChallengeWindow }

const WPoStPeriodDeadlines = minertypes.WPoStPeriodDeadlines
const WPoStChallengeLookback = minertypes.WPoStChallengeLookback
const FaultDeclarationCutoff = minertypes.FaultDeclarationCutoff
const MinAggregatedSectors = minertypes.MinAggregatedSectors
const MinSectorExpiration = minertypes.MinSectorExpiration

type SectorExpiration struct {
OnTime abi.ChainEpoch

Expand Down
29 changes: 29 additions & 0 deletions venus-shared/actors/builtin/miner/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,37 @@ type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange
type WorkerKeyChange = minertypes.WorkerKeyChange
type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo
type SectorPreCommitInfo = minertypes.SectorPreCommitInfo
type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams
type PoStPartition = minertypes.PoStPartition
type RecoveryDeclaration = minertypes.RecoveryDeclaration
type FaultDeclaration = minertypes.FaultDeclaration
type DeclareFaultsRecoveredParams = minertypes.DeclareFaultsRecoveredParams
type DeclareFaultsParams = minertypes.DeclareFaultsParams
type ProveCommitAggregateParams = minertypes.ProveCommitAggregateParams
type ProveCommitSectorParams = minertypes.ProveCommitSectorParams
type ProveReplicaUpdatesParams = minertypes.ProveReplicaUpdatesParams
type ReplicaUpdate = minertypes.ReplicaUpdate
type PreCommitSectorBatchParams = minertypes.PreCommitSectorBatchParams
type PreCommitSectorBatchParams2 = minertypes.PreCommitSectorBatchParams2
type ExtendSectorExpiration2Params = minertypes.ExtendSectorExpiration2Params
type SectorClaim = minertypes.SectorClaim
type ExpirationExtension2 = minertypes.ExpirationExtension2
type CompactPartitionsParams = minertypes.CompactPartitionsParams
type WithdrawBalanceParams = minertypes.WithdrawBalanceParams

var QAPowerMax = minertypes.QAPowerMax

type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo

var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes.WPoStProvingPeriod }
var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes.WPoStChallengeWindow }

const WPoStPeriodDeadlines = minertypes.WPoStPeriodDeadlines
const WPoStChallengeLookback = minertypes.WPoStChallengeLookback
const FaultDeclarationCutoff = minertypes.FaultDeclarationCutoff
const MinAggregatedSectors = minertypes.MinAggregatedSectors
const MinSectorExpiration = minertypes.MinSectorExpiration

type SectorExpiration struct {
OnTime abi.ChainEpoch

Expand Down
2 changes: 2 additions & 0 deletions venus-shared/actors/builtin/verifreg/actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,5 @@ type Allocation = verifregtypes.Allocation
type AllocationId = verifregtypes.AllocationId
type Claim = verifregtypes.Claim
type ClaimId = verifregtypes.ClaimId

const NoAllocationID = verifregtypes.NoAllocationID
2 changes: 2 additions & 0 deletions venus-shared/actors/builtin/verifreg/actor.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ type Allocation = verifregtypes.Allocation
type AllocationId = verifregtypes.AllocationId
type Claim = verifregtypes.Claim
type ClaimId = verifregtypes.ClaimId

const NoAllocationID = verifregtypes.NoAllocationID