Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CfgCoordinatorBootstrap defines whether to bootstrap the network. CfgCoordinatorBootstrap = "cooBootstrap" // CfgCoordinatorStartIndex defines the index of the first milestone at bootstrap. CfgCoordinatorStartIndex = "cooStartIndex" // MilestoneMaxAdditionalTipsLimit defines the maximum limit of additional tips that fit into a milestone (besides the last milestone and checkpoint hash). MilestoneMaxAdditionalTipsLimit = 6 )
Variables ¶
View Source
var (
Component *app.Component
)
View Source
var (
ErrDatabaseTainted = errors.New("database is tainted. delete the coordinator database and start again with a snapshot")
)
View Source
var ParamsCoordinator = &ParametersCoordinator{ Quorum: Quorum{ Groups: make(map[string][]*coordinator.QuorumClientConfig), }, }
Functions ¶
func ComputeMerkleTreeHash ¶
func ComputeMerkleTreeHash(ctx context.Context, msIndex iotago.MilestoneIndex, msTimestamp uint32, parents iotago.BlockIDs, previousMilestoneID iotago.MilestoneID) (*coordinator.MilestoneMerkleRoots, error)
Types ¶
type ParametersCoordinator ¶
type ParametersCoordinator struct { StateFilePath string `default:"coordinator.state" usage:"the path to the state file of the coordinator"` Interval time.Duration `default:"5s" usage:"the interval milestones are issued"` MilestoneTimeout time.Duration `default:"30s" usage:"the duration after which an event is triggered if no new milestones are received"` Signing struct { Provider string `default:"local" usage:"the signing provider the coordinator uses to sign a milestone (local/remote)"` RemoteAddress string `default:"localhost:12345" usage:"the address of the remote signing provider (insecure connection!)"` RetryTimeout time.Duration `default:"2s" usage:"defines the timeout between signing retries"` RetryAmount int `default:"10" usage:"defines the number of signing retries to perform before shutting down the node"` } Quorum Quorum Checkpoints struct { MaxTrackedBlocks int `` /* 137-byte string literal not displayed */ } TipSel struct { MinHeaviestBranchUnreferencedBlocksThreshold int `default:"20" usage:"minimum threshold of unreferenced blocks in the heaviest branch"` MaxHeaviestBranchTipsPerCheckpoint int `` /* 188-byte string literal not displayed */ RandomTipsPerCheckpoint int `` /* 194-byte string literal not displayed */ HeaviestBranchSelectionTimeout time.Duration `default:"100ms" usage:"the maximum duration to select the heaviest branch tips"` } `name:"tipsel"` BlockBackups struct { Enabled bool `` /* 139-byte string literal not displayed */ FolderPath string `default:"block_backups" usage:"the path to the folder where block backups are stored"` } DebugFakeMilestoneTimestamps bool `` /* 132-byte string literal not displayed */ }
type Quorum ¶
type Quorum struct { Enabled bool `default:"false" usage:"whether the coordinator quorum is enabled"` Groups map[string][]*coordinator.QuorumClientConfig `noflag:"true" usage:"defines the quorum groups used to ask other nodes for correct ledger state of the coordinator."` Timeout time.Duration `default:"2s" usage:"the timeout until a node in the quorum must have answered"` }
type TreasuryListener ¶
type TreasuryListener struct { *logger.WrappedLogger // contains filtered or unexported fields }
func NewTreasuryListener ¶
func NewTreasuryListener(log *logger.Logger, nodeBridge *nodebridge.NodeBridge) *TreasuryListener
func (*TreasuryListener) LatestTreasuryOutput ¶
func (n *TreasuryListener) LatestTreasuryOutput() (*coordinator.LatestTreasuryOutput, error)
func (*TreasuryListener) Run ¶
func (n *TreasuryListener) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.