type constants on all build tags.
This commit is contained in:
parent
f774d2aab1
commit
d232299c77
@ -20,9 +20,9 @@ func init() {
|
|||||||
BuildType |= Build2k
|
BuildType |= Build2k
|
||||||
}
|
}
|
||||||
|
|
||||||
const BlockDelaySecs = 2
|
const BlockDelaySecs = uint64(2)
|
||||||
|
|
||||||
const PropagationDelay = 3
|
const PropagationDelay = uint64(3)
|
||||||
|
|
||||||
// SlashablePowerDelay is the number of epochs after ElectionPeriodStart, after
|
// SlashablePowerDelay is the number of epochs after ElectionPeriodStart, after
|
||||||
// which the miner is slashed
|
// which the miner is slashed
|
||||||
|
@ -5,6 +5,7 @@ package build
|
|||||||
import (
|
import (
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
"github.com/filecoin-project/specs-actors/actors/abi"
|
||||||
"github.com/filecoin-project/specs-actors/actors/builtin"
|
"github.com/filecoin-project/specs-actors/actors/builtin"
|
||||||
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
"github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ const UnixfsLinksPerLevel = 1024
|
|||||||
// Consensus / Network
|
// Consensus / Network
|
||||||
|
|
||||||
// Seconds
|
// Seconds
|
||||||
const AllowableClockDrift = 1
|
const AllowableClockDrift = uint64(1)
|
||||||
|
|
||||||
// Epochs
|
// Epochs
|
||||||
const ForkLengthThreshold = Finality
|
const ForkLengthThreshold = Finality
|
||||||
@ -31,12 +32,12 @@ var BlocksPerEpoch = uint64(builtin.ExpectedLeadersPerEpoch)
|
|||||||
|
|
||||||
// Epochs
|
// Epochs
|
||||||
const Finality = miner.ChainFinalityish
|
const Finality = miner.ChainFinalityish
|
||||||
const MessageConfidence = 5
|
const MessageConfidence = uint64(5)
|
||||||
|
|
||||||
// constants for Weight calculation
|
// constants for Weight calculation
|
||||||
// The ratio of weight contributed by short-term vs long-term factors in a given round
|
// The ratio of weight contributed by short-term vs long-term factors in a given round
|
||||||
const WRatioNum = int64(1)
|
const WRatioNum = int64(1)
|
||||||
const WRatioDen = 2
|
const WRatioDen = uint64(2)
|
||||||
|
|
||||||
// /////
|
// /////
|
||||||
// Proofs
|
// Proofs
|
||||||
@ -54,25 +55,25 @@ const MaxSealLookback = SealRandomnessLookbackLimit + 2000 // TODO: Get from spe
|
|||||||
// Mining
|
// Mining
|
||||||
|
|
||||||
// Epochs
|
// Epochs
|
||||||
const TicketRandomnessLookback = 1
|
const TicketRandomnessLookback = abi.ChainEpoch(1)
|
||||||
|
|
||||||
const WinningPoStSectorSetLookback = 10
|
const WinningPoStSectorSetLookback = abi.ChainEpoch(10)
|
||||||
|
|
||||||
// /////
|
// /////
|
||||||
// Devnet settings
|
// Devnet settings
|
||||||
|
|
||||||
const TotalFilecoin = 2_000_000_000
|
const TotalFilecoin = uint64(2_000_000_000)
|
||||||
const MiningRewardTotal = 1_400_000_000
|
const MiningRewardTotal = uint64(1_400_000_000)
|
||||||
|
|
||||||
const FilecoinPrecision = 1_000_000_000_000_000_000
|
const FilecoinPrecision = uint64(1_000_000_000_000_000_000)
|
||||||
|
|
||||||
var InitialRewardBalance *big.Int
|
var InitialRewardBalance *big.Int
|
||||||
|
|
||||||
// TODO: Move other important consts here
|
// TODO: Move other important consts here
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
InitialRewardBalance = big.NewInt(MiningRewardTotal)
|
InitialRewardBalance = big.NewInt(int64(MiningRewardTotal))
|
||||||
InitialRewardBalance = InitialRewardBalance.Mul(InitialRewardBalance, big.NewInt(FilecoinPrecision))
|
InitialRewardBalance = InitialRewardBalance.Mul(InitialRewardBalance, big.NewInt(int64(FilecoinPrecision)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sync
|
// Sync
|
||||||
|
@ -32,6 +32,9 @@ var (
|
|||||||
Finality = miner.ChainFinalityish
|
Finality = miner.ChainFinalityish
|
||||||
ForkLengthThreshold = Finality
|
ForkLengthThreshold = Finality
|
||||||
|
|
||||||
|
SlashablePowerDelay = 20
|
||||||
|
InteractivePoRepConfidence = 6
|
||||||
|
|
||||||
MessageConfidence uint64 = 5
|
MessageConfidence uint64 = 5
|
||||||
|
|
||||||
WRatioNum = int64(1)
|
WRatioNum = int64(1)
|
||||||
|
@ -20,7 +20,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seconds
|
const BlockDelaySecs = uint64(builtin.EpochDurationSeconds)
|
||||||
const BlockDelaySecs = builtin.EpochDurationSeconds
|
|
||||||
|
|
||||||
const PropagationDelay = 6
|
const PropagationDelay = uint64(6)
|
||||||
|
Loading…
Reference in New Issue
Block a user