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
|
|
|
|
2018-03-31 22:21:09 +00:00
|
|
|
//go:generate abigen --sol contracts/sharding_manager.sol --pkg contracts --out contracts/sharding_manager.go
|
|
|
|
|
2018-01-15 00:10:02 +00:00
|
|
|
var (
|
|
|
|
// Number of network shards
|
2018-03-31 04:07:42 +00:00
|
|
|
ShardCount = int64(1)
|
2018-03-08 17:34:15 +00:00
|
|
|
// Address of the sharding manager contract
|
2018-03-31 04:07:42 +00:00
|
|
|
ShardingManagerAddress = common.HexToAddress("0x0") // TODO
|
2018-01-15 00:10:02 +00:00
|
|
|
// Gas limit for verifying signatures
|
2018-03-31 04:07:42 +00:00
|
|
|
SigGasLimit = 40000
|
2018-01-15 00:10:02 +00:00
|
|
|
// Number of blocks in a period
|
2018-03-31 04:07:42 +00:00
|
|
|
PeriodLength = int64(5)
|
2018-01-21 00:10:12 +00:00
|
|
|
// Number of periods ahead of current period which the contract is able to return the collator of that period.
|
2018-03-31 04:07:42 +00:00
|
|
|
LookaheadPeriods = 4
|
2018-04-01 21:06:00 +00:00
|
|
|
// Required deposit size in wei for collator
|
|
|
|
CollatorDeposit = new(big.Int).Exp(big.NewInt(10), big.NewInt(21), nil) // 1000 ETH
|
|
|
|
// Required deposit size in wei for proposer
|
|
|
|
ProposerDeposit = new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil) // 1 ETH
|
|
|
|
// Minimum Balance of proposer where bids are decuted
|
|
|
|
MinProposerBalance = new(big.Int).Exp(big.NewInt(10), big.NewInt(17), nil) // 0.1 ETH
|
2018-01-15 21:39:00 +00:00
|
|
|
// Gas limit to create contract
|
2018-03-31 04:07:42 +00:00
|
|
|
ContractGasLimit = uint64(4700000) // Max is 4712388
|
2018-04-01 21:06:00 +00:00
|
|
|
// Number of collations collators need to check to apply fork choice rule
|
|
|
|
WindbackLength = int64(25)
|
|
|
|
// Number of periods to lockup collator deposit from time of deregistration
|
|
|
|
CollatorLockupLength = int64(16128)
|
|
|
|
// Number of periods to lockup proposer deposit from time of deregistration
|
|
|
|
ProposerLockupLength = int64(48)
|
|
|
|
// Number of vETH awarded to collators after collation included in canonical chain
|
|
|
|
CollatorSubsidy = new(big.Int).Exp(big.NewInt(10), big.NewInt(15), nil) // 0.001 ETH
|
2018-01-15 00:10:02 +00:00
|
|
|
)
|