Documentation ¶
Index ¶
- func TrimReleaseTag(tag string) string
- type Broker
- type Commander
- type Config
- type Engine
- func (e *Engine) BeginBlock(ctx context.Context, blockHeight uint64)
- func (e *Engine) Cleanup(ctx context.Context)
- func (e *Engine) CoreReadyForUpgrade() bool
- func (e *Engine) GetState(k string) ([]byte, []types.StateProvider, error)
- func (e *Engine) GetUpgradeStatus() types.UpgradeStatus
- func (e *Engine) IsValidProposal(ctx context.Context, pk string, upgradeBlockHeight uint64, ...) error
- func (e *Engine) Keys() []string
- func (e *Engine) LoadState(ctx context.Context, p *types.Payload) ([]types.StateProvider, error)
- func (e *Engine) Namespace() types.SnapshotNamespace
- func (e *Engine) OnRequiredMajorityChanged(_ context.Context, requiredMajority num.Decimal) error
- func (e *Engine) SetCoreReadyForUpgrade()
- func (e *Engine) SetReadyForUpgrade()
- func (e *Engine) Stopped() bool
- func (e *Engine) TimeForUpgrade() bool
- func (e *Engine) UpgradeProposal(ctx context.Context, pk string, upgradeBlockHeight uint64, ...) error
- type ValidatorTopology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TrimReleaseTag ¶
TrimReleaseTag removes 'v' or 'V' at the beginning of the tag if present.
Types ¶
type Config ¶
Config represent the configuration of the collateral engine.
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration, given a pointer to a logger instance to be used for logging within the package.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) BeginBlock ¶
BeginBlock is called at the beginning of the block, to mark the current block height and check if there are proposals that are accepted/rejected. If there is more than one active proposal that is accepted (unlikely) we choose the one with the earliest upgrade block.
func (*Engine) Cleanup ¶
Cleanup is called by the abci before the final snapshot is taken to clear remaining state. It emits events for the accepted and rejected proposals.
func (*Engine) CoreReadyForUpgrade ¶ added in v0.65.0
func (*Engine) GetUpgradeStatus ¶
func (e *Engine) GetUpgradeStatus() types.UpgradeStatus
GetUpgradeStatus is an RPC call that returns the status of an upgrade.
func (*Engine) IsValidProposal ¶ added in v0.55.0
func (*Engine) Namespace ¶
func (e *Engine) Namespace() types.SnapshotNamespace
func (*Engine) OnRequiredMajorityChanged ¶
func (*Engine) SetCoreReadyForUpgrade ¶ added in v0.65.0
func (e *Engine) SetCoreReadyForUpgrade()
SetCoreReadyForUpgrade is called by abci after a snapshot has been taken and the core process is ready to wait for data node to process if connected or to be shutdown.
func (*Engine) SetReadyForUpgrade ¶
func (e *Engine) SetReadyForUpgrade()
SetReadyForUpgrade is called by abci after both core and data node has processed all required events before the update. This will modify the RPC API.
func (*Engine) TimeForUpgrade ¶
TimeForUpgrade is called by abci at the beginning of the block (before calling begin block of the engine) - if a block height for upgrade is set and is equal to the last block's height then return true.