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

remove the NtwkVersionGetter #4690

Merged
merged 2 commits into from
Jan 10, 2022
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
6 changes: 3 additions & 3 deletions app/submodule/chain/chaininfo_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func (cia *chainInfoAPI) StateGetRandomnessFromTickets(ctx context.Context, pers
}

r := chain.NewChainRandomnessSource(cia.chain.ChainReader, ts.Key(), cia.chain.Drand)
rnv := cia.chain.Fork.GetNtwkVersion(ctx, randEpoch)
rnv := cia.chain.Fork.GetNetworkVersion(ctx, randEpoch)

if rnv >= network.Version13 {
return r.GetChainRandomnessV2(ctx, personalization, randEpoch, entropy)
Expand All @@ -388,7 +388,7 @@ func (cia *chainInfoAPI) StateGetRandomnessFromBeacon(ctx context.Context, perso
return nil, xerrors.Errorf("loading tipset %s: %w", tsk, err)
}
r := chain.NewChainRandomnessSource(cia.chain.ChainReader, ts.Key(), cia.chain.Drand)
rnv := cia.chain.Fork.GetNtwkVersion(ctx, randEpoch)
rnv := cia.chain.Fork.GetNetworkVersion(ctx, randEpoch)

if rnv >= network.Version14 {
return r.GetBeaconRandomnessV3(ctx, personalization, randEpoch, entropy)
Expand All @@ -405,7 +405,7 @@ func (cia *chainInfoAPI) StateNetworkVersion(ctx context.Context, tsk types.TipS
if err != nil {
return network.VersionMax, xerrors.Errorf("loading tipset %s: %v", tsk, err)
}
return cia.chain.Fork.GetNtwkVersion(ctx, ts.Height()), nil
return cia.chain.Fork.GetNetworkVersion(ctx, ts.Height()), nil
}

func (cia *chainInfoAPI) StateVerifiedRegistryRootKey(ctx context.Context, tsk types.TipSetKey) (address.Address, error) {
Expand Down
4 changes: 2 additions & 2 deletions app/submodule/chain/miner_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (msa *minerStateAPI) StateMinerInfo(ctx context.Context, maddr address.Addr
return miner.MinerInfo{}, xerrors.Errorf("loading view %s: %v", tsk, err)
}

nv := msa.Fork.GetNtwkVersion(ctx, ts.Height())
nv := msa.Fork.GetNetworkVersion(ctx, ts.Height())
minfo, err := view.MinerInfo(ctx, maddr, nv)
if err != nil {
return miner.MinerInfo{}, err
Expand Down Expand Up @@ -725,7 +725,7 @@ func (msa *minerStateAPI) StateDealProviderCollateralBounds(ctx context.Context,
powClaim.QualityAdjPower,
rewPow,
circ.FilCirculating,
msa.Fork.GetNtwkVersion(ctx, ts.Height()))
msa.Fork.GetNetworkVersion(ctx, ts.Height()))
if err != nil {
return types.DealCollateralBounds{}, xerrors.Errorf("getting deal provider coll bounds: %v", err)
}
Expand Down
6 changes: 3 additions & 3 deletions app/submodule/mining/mining_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (miningAPI *MiningAPI) MinerGetBaseInfo(ctx context.Context, maddr address.
if len(entries) > 0 {
rbase = entries[len(entries)-1]
}
version := miningAPI.Ming.ChainModule.Fork.GetNtwkVersion(ctx, round)
version := miningAPI.Ming.ChainModule.Fork.GetNetworkVersion(ctx, round)
lbts, lbst, err := miningAPI.Ming.ChainModule.ChainReader.GetLookbackTipSetForRound(ctx, ts, round, version)
if err != nil {
return nil, xerrors.Errorf("getting lookback miner actor state: %v", err)
Expand Down Expand Up @@ -96,7 +96,7 @@ func (miningAPI *MiningAPI) MinerGetBaseInfo(ctx context.Context, maddr address.
return nil, xerrors.Errorf("failed to get randomness for winning post: %v", err)
}

nv := miningAPI.Ming.ChainModule.Fork.GetNtwkVersion(ctx, ts.Height())
nv := miningAPI.Ming.ChainModule.Fork.GetNetworkVersion(ctx, ts.Height())

pv := miningAPI.Ming.proofVerifier
sectors, err := view.GetSectorsForWinningPoSt(ctx, nv, pv, maddr, prand)
Expand Down Expand Up @@ -178,7 +178,7 @@ func (miningAPI *MiningAPI) minerCreateBlock(ctx context.Context, bt *types.Bloc
return nil, xerrors.Errorf("failed to load tipset state: %v", err)
}

version := miningAPI.Ming.ChainModule.Fork.GetNtwkVersion(ctx, bt.Epoch)
version := miningAPI.Ming.ChainModule.Fork.GetNetworkVersion(ctx, bt.Epoch)
_, lbst, err := miningAPI.Ming.ChainModule.ChainReader.GetLookbackTipSetForRound(ctx, pts, bt.Epoch, version)
if err != nil {
return nil, xerrors.Errorf("getting lookback miner actor state: %v", err)
Expand Down
14 changes: 7 additions & 7 deletions pkg/consensus/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (bv *BlockValidator) validateBlock(ctx context.Context, blk *types.BlockHea
}

// get worker address
version := bv.fork.GetNtwkVersion(ctx, blk.Height)
version := bv.fork.GetNetworkVersion(ctx, blk.Height)
lbTS, lbStateRoot, err := bv.chainState.GetLookbackTipSetForRound(ctx, parent, blk.Height, version)
if err != nil {
return xerrors.Errorf("failed to get lookback tipset for block: %w", err)
Expand Down Expand Up @@ -255,7 +255,7 @@ func (bv *BlockValidator) validateBlock(ctx context.Context, blk *types.BlockHea
return nil
})

winPoStNv := bv.fork.GetNtwkVersion(ctx, baseHeight)
winPoStNv := bv.fork.GetNetworkVersion(ctx, baseHeight)
wproofCheck := async.Err(func() error {
if err := bv.VerifyWinningPoStProof(ctx, winPoStNv, blk, prevBeacon, lbStateRoot); err != nil {
return xerrors.Errorf("invalid election post: %w", err)
Expand Down Expand Up @@ -437,7 +437,7 @@ func (bv *BlockValidator) checkPowerAndGetWorkerKey(ctx context.Context, bh *typ
// we check that the miner met the minimum power at the lookback tipset

baseTS := bv.chainState.GetHead()
version := bv.fork.GetNtwkVersion(ctx, bh.Height)
version := bv.fork.GetNetworkVersion(ctx, bh.Height)
lbts, lbst, err := bv.chainState.GetLookbackTipSetForRound(ctx, baseTS, bh.Height, version)
if err != nil {
log.Warnf("failed to load lookback tipset for incoming block: %s", err)
Expand Down Expand Up @@ -582,7 +582,7 @@ func (bv *BlockValidator) MinerEligibleToMine(ctx context.Context, addr address.
hmp, err := bv.minerHasMinPower(ctx, addr, lookbackTS)

// TODO: We're blurring the lines between a "runtime network version" and a "Lotus upgrade epoch", is that unavoidable?
if bv.fork.GetNtwkVersion(ctx, parentHeight) <= network.Version3 {
if bv.fork.GetNetworkVersion(ctx, parentHeight) <= network.Version3 {
return hmp, err
}

Expand Down Expand Up @@ -784,7 +784,7 @@ func (bv *BlockValidator) checkBlockMessages(ctx context.Context, sigValidator *

// Phase 1: syntactic validation, as defined in the spec
minGas := pl.OnChainMessage(msg.ChainLength())
if err := m.ValidForBlockInclusion(minGas.Total(), bv.fork.GetNtwkVersion(ctx, blk.Height)); err != nil {
if err := m.ValidForBlockInclusion(minGas.Total(), bv.fork.GetNetworkVersion(ctx, blk.Height)); err != nil {
return err
}

Expand All @@ -798,7 +798,7 @@ func (bv *BlockValidator) checkBlockMessages(ctx context.Context, sigValidator *
// Phase 2: (Partial) semantic validation:
// the sender exists and is an account actor, and the nonces make sense
var sender address.Address
if bv.fork.GetNtwkVersion(ctx, blk.Height) >= network.Version13 {
if bv.fork.GetNetworkVersion(ctx, blk.Height) >= network.Version13 {
sender, err = st.LookupID(m.From)
if err != nil {
return err
Expand Down Expand Up @@ -844,7 +844,7 @@ func (bv *BlockValidator) checkBlockMessages(ctx context.Context, sigValidator *

secpMsgs := make([]types.ChainMsg, len(blksecpMsgs))
for i, m := range blksecpMsgs {
if bv.fork.GetNtwkVersion(ctx, blk.Height) >= network.Version14 {
if bv.fork.GetNetworkVersion(ctx, blk.Height) >= network.Version14 {
if m.Signature.Type != crypto.SigTypeSecp256k1 {
return xerrors.Errorf("block had invalid secpk message at index %d: %w", i, err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/consensus/expected.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (c *Expected) RunStateTransition(ctx context.Context, ts *types.TipSet) (ci
return dertail.FilCirculating, nil
},
LookbackStateGetter: vmcontext.LookbackStateGetterForTipset(ctx, c.chainState, c.fork, ts),
NtwkVersionGetter: c.fork.GetNtwkVersion,
NetworkVersion: c.fork.GetNetworkVersion(ctx, ts.At(0).Height),
Rnd: NewHeadRandomness(c.rnd, ts.Key()),
BaseFee: ts.At(0).ParentBaseFee,
Fork: c.fork,
Expand Down
4 changes: 2 additions & 2 deletions pkg/consensusfault/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ func (s *ConsensusFaultChecker) VerifyConsensusFault(ctx context.Context, h1, h2
}

// Expensive validation: signatures.
b1Version := s.fork.GetNtwkVersion(ctx, b1.Height)
b1Version := s.fork.GetNetworkVersion(ctx, b1.Height)
err := verifyBlockSignature(ctx, b1, b1Version, curEpoch, msg.To, gasIpld, view, getter)
if err != nil {
return nil, err
}
b2Version := s.fork.GetNtwkVersion(ctx, b2.Height)
b2Version := s.fork.GetNetworkVersion(ctx, b2.Height)
err = verifyBlockSignature(ctx, b2, b2Version, curEpoch, msg.To, gasIpld, view, getter)
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions pkg/fork/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ type chainReader interface {

type IFork interface {
HandleStateForks(ctx context.Context, root cid.Cid, height abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error)
GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version
GetNetworkVersion(ctx context.Context, height abi.ChainEpoch) network.Version
HasExpensiveFork(ctx context.Context, height abi.ChainEpoch) bool
GetForkUpgrade() *config.ForkUpgradeConfig
Start(ctx context.Context) error
Expand Down Expand Up @@ -496,7 +496,7 @@ func (c *ChainFork) HasExpensiveFork(ctx context.Context, height abi.ChainEpoch)
return ok
}

func (c *ChainFork) GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version {
func (c *ChainFork) GetNetworkVersion(ctx context.Context, height abi.ChainEpoch) network.Version {
// The epochs here are the _last_ epoch for every version, or -1 if the
// version is disabled.
for _, spec := range c.networkVersions {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fork/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (mockFork *MockFork) HandleStateForks(ctx context.Context, root cid.Cid, he
return root, nil
}

func (mockFork *MockFork) GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version {
func (mockFork *MockFork) GetNetworkVersion(ctx context.Context, height abi.ChainEpoch) network.Version {
return network.Version0
}

Expand Down
5 changes: 1 addition & 4 deletions pkg/gen/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,9 +484,6 @@ func VerifyPreSealedData(ctx context.Context, cs *chain.Store, stateroot cid.Cid

faultChecker := consensusfault.NewFaultChecker(cs, fork.NewMockFork())
syscalls := vmsupport.NewSyscalls(faultChecker, impl.ProofVerifier)
genesisNetworkVersion := func(context.Context, abi.ChainEpoch) network.Version {
return nv
}

csc := func(context.Context, abi.ChainEpoch, tree.Tree) (abi.TokenAmount, error) {
return big.Zero(), nil
Expand All @@ -495,7 +492,7 @@ func VerifyPreSealedData(ctx context.Context, cs *chain.Store, stateroot cid.Cid
gasPriceSchedule := gas.NewPricesSchedule(para)
vmopt := vm.VmOption{
CircSupplyCalculator: csc,
NtwkVersionGetter: genesisNetworkVersion,
NetworkVersion: nv,
Rnd: &fakeRand{},
BaseFee: big.NewInt(0),
Epoch: 0,
Expand Down
6 changes: 1 addition & 5 deletions pkg/gen/genesis/miners.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,12 @@ func SetupStorageMiners(ctx context.Context, cs *chain.Store, sroot cid.Cid, min
return big.Zero(), nil
}

genesisNetworkVersion := func(context.Context, abi.ChainEpoch) network.Version {
return nv
}

faultChecker := consensusfault.NewFaultChecker(cs, fork.NewMockFork())
syscalls := vmsupport.NewSyscalls(faultChecker, impl.ProofVerifier)
gasPirceSchedule := gas.NewPricesSchedule(para)
vmopt := vm.VmOption{
CircSupplyCalculator: csc,
NtwkVersionGetter: genesisNetworkVersion,
NetworkVersion: nv,
Rnd: &fakeRand{},
BaseFee: big.NewInt(0),
Epoch: 0,
Expand Down
4 changes: 2 additions & 2 deletions pkg/statemanger/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (s *Stmgr) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs [
return cs.FilCirculating, nil
},
LookbackStateGetter: vmcontext.LookbackStateGetterForTipset(ctx, s.cs, s.fork, ts),
NtwkVersionGetter: s.fork.GetNtwkVersion,
NetworkVersion: s.fork.GetNetworkVersion(ctx, ts.Height()+1),
Rnd: consensus.NewHeadRandomness(s.rnd, ts.Key()),
BaseFee: ts.At(0).ParentBaseFee,
Epoch: ts.Height() + 1,
Expand Down Expand Up @@ -197,7 +197,7 @@ func (s *Stmgr) Call(ctx context.Context, msg *types.Message, ts *types.TipSet)
return dertail.FilCirculating, nil
},
LookbackStateGetter: vmcontext.LookbackStateGetterForTipset(ctx, s.cs, s.fork, ts),
NtwkVersionGetter: s.fork.GetNtwkVersion,
NetworkVersion: s.fork.GetNetworkVersion(ctx, pheight+1),
Rnd: consensus.NewHeadRandomness(s.rnd, ts.Key()),
BaseFee: ts.At(0).ParentBaseFee,
Epoch: pheight + 1,
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/dispatch/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type ActorPredicate func(vmr.Runtime, rtt.VMActor) error
//ActorsVersionPredicate get actor predicate base on actor version and network version
func ActorsVersionPredicate(ver actors.Version) ActorPredicate {
return func(rt vmr.Runtime, v rtt.VMActor) error {
nver, err := actors.VersionForNetwork(rt.NtwkVersion())
nver, err := actors.VersionForNetwork(rt.NetworkVersion())
if err != nil {
return xerrors.Errorf("version for network %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Runtime interface {
// CurrentEpoch is the current chain epoch.
CurrentEpoch() abi.ChainEpoch

NtwkVersion() network.Version
NetworkVersion() network.Version
}

// InvocationContext is passed to the actors on each method call.
Expand Down
16 changes: 8 additions & 8 deletions pkg/vm/vmcontext/invocation_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func newInvocationContext(rt *VM, gasIpld ipfscbor.IpldStore, topLevel *topLevel

if parent != nil {
// TODO: The version check here should be unnecessary, but we can wait to take it out
if !parent.allowSideEffects && rt.NtwkVersion() >= network.Version7 {
if !parent.allowSideEffects && rt.NetworkVersion() >= network.Version7 {
runtime.Abortf(exitcode.SysErrForbidden, "internal calls currently disabled")
}
//ctx.gasUsed = parent.gasUsed
Expand All @@ -84,7 +84,7 @@ func newInvocationContext(rt *VM, gasIpld ipfscbor.IpldStore, topLevel *topLevel
ctx.depth = parent.depth + 1
}

if ctx.depth > MaxCallDepth && rt.NtwkVersion() >= network.Version6 {
if ctx.depth > MaxCallDepth && rt.NetworkVersion() >= network.Version6 {
runtime.Abortf(exitcode.SysErrForbidden, "message execution exceeds call depth")
}

Expand All @@ -95,7 +95,7 @@ func newInvocationContext(rt *VM, gasIpld ipfscbor.IpldStore, topLevel *topLevel
}
msg.From = resF

if rt.NtwkVersion() > network.Version3 {
if rt.NetworkVersion() > network.Version3 {
resT, _ := rt.normalizeAddress(msg.To)
// may be set to undef if recipient doesn't exist yet
msg.To = resT
Expand Down Expand Up @@ -228,7 +228,7 @@ func (ctx *invocationContext) invoke() (ret []byte, errcode exitcode.ExitCode) {
// 1. load target actor
// Note: we replace the "To" address with the normalized version
_, toIDAddr := ctx.resolveTarget(ctx.originMsg.To)
if ctx.vm.NtwkVersion() > network.Version3 {
if ctx.vm.NetworkVersion() > network.Version3 {
ctx.msg.To = toIDAddr
}

Expand Down Expand Up @@ -261,7 +261,7 @@ func (ctx *invocationContext) invoke() (ret []byte, errcode exitcode.ExitCode) {
// dispatch
adapter := newRuntimeAdapter(ctx) //runtimeAdapter{ctx: ctx}
var extErr *dispatch.ExcuteError
ret, extErr = actorImpl.Dispatch(ctx.originMsg.Method, ctx.vm.NtwkVersion(), adapter, ctx.originMsg.Params)
ret, extErr = actorImpl.Dispatch(ctx.originMsg.Method, ctx.vm.NetworkVersion(), adapter, ctx.originMsg.Params)
if extErr != nil {
runtime.Abortf(extErr.ExitCode(), extErr.Error())
}
Expand Down Expand Up @@ -331,7 +331,7 @@ func (ctx *invocationContext) resolveTarget(target address.Address) (*types.Acto
// Don't implicitly create an account actor for an address without an associated key.
runtime.Abort(exitcode.SysErrInvalidReceiver)
}
ver, err := actors.VersionForNetwork(ctx.vm.NtwkVersion())
ver, err := actors.VersionForNetwork(ctx.vm.NetworkVersion())
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -527,7 +527,7 @@ func (ctx *invocationContext) NewActorAddress() address.Address {

// CreateActor implements runtime.ExtendedInvocationContext.
func (ctx *invocationContext) CreateActor(codeID cid.Cid, addr address.Address) {
if addr == address.Undef && ctx.vm.NtwkVersion() >= network.Version7 {
if addr == address.Undef && ctx.vm.NetworkVersion() >= network.Version7 {
runtime.Abortf(exitcode.SysErrorIllegalArgument, "CreateActor with Undef address")
}

Expand Down Expand Up @@ -576,7 +576,7 @@ func (ctx *invocationContext) DeleteActor(beneficiary address.Address) {
if !receiverActor.Balance.IsZero() {
// TODO: Should be safe to drop the version-check,
// since only the paych actor called this pre-version 7, but let's leave it for now
if ctx.vm.NtwkVersion() >= network.Version7 {
if ctx.vm.NetworkVersion() >= network.Version7 {
beneficiaryID, found := ctx.vm.normalizeAddress(beneficiary)
if !found {
runtime.Abortf(exitcode.SysErrorIllegalArgument, "beneficiary doesn't exist")
Expand Down
21 changes: 15 additions & 6 deletions pkg/vm/vmcontext/runtime_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import (
"context"
"fmt"

"github.com/filecoin-project/venus/venus-shared/actors/aerrors"

"github.com/filecoin-project/venus/venus-shared/actors/builtin"

"github.com/ipfs/go-cid"
cbor2 "github.com/ipfs/go-ipld-cbor"
logging "github.com/ipfs/go-log/v2"
Expand All @@ -21,9 +17,17 @@ import (
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/go-state-types/rt"
rt0 "github.com/filecoin-project/specs-actors/actors/runtime"
rt2 "github.com/filecoin-project/specs-actors/v2/actors/runtime"
rt3 "github.com/filecoin-project/specs-actors/v3/actors/runtime"
rt4 "github.com/filecoin-project/specs-actors/v4/actors/runtime"
rt5 "github.com/filecoin-project/specs-actors/v5/actors/runtime"
rt6 "github.com/filecoin-project/specs-actors/v6/actors/runtime"
rt7 "github.com/filecoin-project/specs-actors/v7/actors/runtime"

"github.com/filecoin-project/venus/pkg/vm/gas"
"github.com/filecoin-project/venus/pkg/vm/runtime"
"github.com/filecoin-project/venus/venus-shared/actors/aerrors"
"github.com/filecoin-project/venus/venus-shared/actors/builtin"
"github.com/filecoin-project/venus/venus-shared/types"
)

Expand All @@ -41,8 +45,13 @@ func init() {

var actorLog = logging.Logger("vm.actors")

var _ rt5.Runtime = (*runtimeAdapter)(nil)
var _ rt0.Runtime = (*runtimeAdapter)(nil)
var _ rt2.Runtime = (*runtimeAdapter)(nil)
var _ rt3.Runtime = (*runtimeAdapter)(nil)
var _ rt4.Runtime = (*runtimeAdapter)(nil)
var _ rt5.Runtime = (*runtimeAdapter)(nil)
var _ rt6.Runtime = (*runtimeAdapter)(nil)
var _ rt7.Runtime = (*runtimeAdapter)(nil)

type runtimeAdapter struct {
ctx *invocationContext
Expand Down Expand Up @@ -149,7 +158,7 @@ func (a *runtimeAdapter) StorePut(x cbor.Marshaler) cid.Cid {
}

func (a *runtimeAdapter) NetworkVersion() network.Version {
return a.stateView.GetNtwkVersion(a.Context(), a.CurrEpoch())
return a.stateView.GetNetworkVersion(a.Context(), a.CurrEpoch())
}

func (a *runtimeAdapter) GetRandomnessFromBeacon(personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) abi.Randomness {
Expand Down
Loading