2018-01-15 00:10:02 +00:00
|
|
|
package sharding
|
|
|
|
|
2018-01-15 21:39:00 +00:00
|
|
|
import (
|
|
|
|
"math/big"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
|
|
)
|
2018-01-15 00:10:02 +00:00
|
|
|
|
|
|
|
var (
|
2018-05-03 01:16:07 +00:00
|
|
|
// ShardCount is the number of network shards.
|
2018-04-11 15:13:53 +00:00
|
|
|
ShardCount = int64(100)
|
2018-05-03 01:16:07 +00:00
|
|
|
// ShardingManagerAddress is the address of the sharding manager contract.
|
2018-03-31 04:07:42 +00:00
|
|
|
ShardingManagerAddress = common.HexToAddress("0x0") // TODO
|
2018-05-03 01:16:07 +00:00
|
|
|
// SigGasLimit for verifying signatures.
|
2018-03-31 04:07:42 +00:00
|
|
|
SigGasLimit = 40000
|
2018-05-03 01:16:07 +00:00
|
|
|
// PeriodLength is num of blocks in period.
|
2018-03-31 04:07:42 +00:00
|
|
|
PeriodLength = int64(5)
|
2018-05-03 01:16:07 +00:00
|
|
|
// LookaheadPeriods is the number of periods ahead of current period
|
|
|
|
// which the contract is able to return the notary of that period.
|
2018-03-31 04:07:42 +00:00
|
|
|
LookaheadPeriods = 4
|
2018-05-03 01:16:07 +00:00
|
|
|
// NotaryDeposit is a required deposit size in wei.
|
2018-04-11 15:13:53 +00:00
|
|
|
NotaryDeposit = new(big.Int).Exp(big.NewInt(10), big.NewInt(21), nil) // 1000 ETH
|
2018-05-03 01:16:07 +00:00
|
|
|
// ProposerDeposit is a required deposit size in wei.
|
2018-04-01 21:06:00 +00:00
|
|
|
ProposerDeposit = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil) // 1 ETH
|
2018-05-03 01:16:07 +00:00
|
|
|
// MinProposerBalance of proposer where bids are deducted.
|
2018-04-01 21:06:00 +00:00
|
|
|
MinProposerBalance = new(big.Int).Exp(big.NewInt(10), big.NewInt(17), nil) // 0.1 ETH
|
2018-05-03 01:16:07 +00:00
|
|
|
// ContractGasLimit to create contract.
|
|
|
|
ContractGasLimit = uint64(4700000) // Max is 4712388.
|
|
|
|
// NotaryLockupLength to lockup notary deposit from time of deregistration.
|
2018-04-11 15:13:53 +00:00
|
|
|
NotaryLockupLength = int64(16128)
|
2018-05-03 01:16:07 +00:00
|
|
|
// ProposerLockupLength to lockup proposer deposit from time of deregistration.
|
2018-04-01 21:06:00 +00:00
|
|
|
ProposerLockupLength = int64(48)
|
2018-05-03 01:16:07 +00:00
|
|
|
// NotarySubsidy is ETH awarded to notary after collation included in canonical chain.
|
|
|
|
NotarySubsidy = new(big.Int).Exp(big.NewInt(10), big.NewInt(15), nil) // 0.001 ETH.
|
|
|
|
// NotaryCommitSize sampled per block from the notaries pool per period per shard.
|
2018-04-11 15:13:53 +00:00
|
|
|
NotaryCommitSize = int64(135)
|
2018-05-03 01:16:07 +00:00
|
|
|
// NotaryQuorumSize votes the collation needs to get accepted to the canonical chain.
|
2018-04-11 15:13:53 +00:00
|
|
|
NotaryQuorumSize = int64(90)
|
2018-01-15 00:10:02 +00:00
|
|
|
)
|