The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/internal/configs/sharding/shardingconfig.go

37 lines
1.0 KiB

// Package shardingconfig defines types and utilities that deal with Harmony
// sharding configuration schedule.
package shardingconfig
import (
"math/big"
"github.com/harmony-one/harmony/internal/genesis"
)
// Schedule returns the sharding configuration instance for the given
// epoch.
type Schedule interface {
InstanceForEpoch(epoch *big.Int) Instance
}
// Instance is one sharding configuration instance.
type Instance interface {
// NumShards returns the number of shards in the network.
NumShards() uint32
// NumNodesPerShard returns number of nodes in each shard.
NumNodesPerShard() int
// NumHarmonyOperatedNodesPerShard returns number of nodes in each shard
// that are operated by Harmony.
NumHarmonyOperatedNodesPerShard() int
// HmyAccounts returns a list of Harmony accounts
HmyAccounts() []genesis.DeployAccount
// FnAccounts returns a list of Foundational node accounts
FnAccounts() []genesis.DeployAccount
// FindAccount returns the deploy account based on the blskey
FindAccount(blsPubKey string) (int, *genesis.DeployAccount)
}