Documentation
¶
Index ¶
- type Orchestration
- func (o *Orchestration) AddShardConfig(shardConf *types.PartitionDescriptionRecord) error
- func (o *Orchestration) Close() error
- func (o *Orchestration) NetworkID() types.NetworkID
- func (o *Orchestration) ShardConfig(partitionID types.PartitionID, shardID types.ShardID, rootRound uint64) (*types.PartitionDescriptionRecord, error)
- func (o *Orchestration) ShardConfigs(rootRound uint64) (map[types.PartitionShardID]*types.PartitionDescriptionRecord, error)
- type TrustBase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Orchestration ¶
type Orchestration struct {
// contains filtered or unexported fields
}
func NewOrchestration ¶
func NewOrchestration(networkID types.NetworkID, dbFile string, log *slog.Logger) (*Orchestration, error)
NewOrchestration creates new boltDB implementation of shard validator orchestration.
- dbFile is filename (full path) to the Bolt DB file to use for storage, if the file does not exist it will be created;
func (*Orchestration) AddShardConfig ¶
func (o *Orchestration) AddShardConfig(shardConf *types.PartitionDescriptionRecord) error
AddShardConfig verifies and stores the given shard conf.
Validation rules:
- The network ID must match
- The partition ID must match one of the existing partitions
- The shard ID must be 0x80 (CBOR encoding of the empty bitstring)
- The new epoch number must be one greater than the current epoch of the only shard in the specified partition
- The activation round number must be strictly greater than the current round of the only shard in the specified partition
- The node identifiers must match their authentication keys
func (*Orchestration) Close ¶
func (o *Orchestration) Close() error
func (*Orchestration) NetworkID ¶
func (o *Orchestration) NetworkID() types.NetworkID
func (*Orchestration) ShardConfig ¶
func (o *Orchestration) ShardConfig(partitionID types.PartitionID, shardID types.ShardID, rootRound uint64) (*types.PartitionDescriptionRecord, error)
ShardConfig returns ShardConf for the given root round.
func (*Orchestration) ShardConfigs ¶
func (o *Orchestration) ShardConfigs(rootRound uint64) (map[types.PartitionShardID]*types.PartitionDescriptionRecord, error)
ShardConfigs returns shard confs active in the given root round.
Click to show internal directories.
Click to hide internal directories.