Documentation ¶
Index ¶
- Constants
- func LogGovernanceTransition(blockIndex uint32, outputID string, rootCommitment trie.VCommitment, ...)
- func LogStateTransition(blockIndex uint32, outputID string, rootCommitment trie.VCommitment, ...)
- func PublishGovernanceTransition(stateOutput *isc.AliasOutputWithID)
- func PublishRequestsSettled(chainID *isc.ChainID, stateIndex uint32, reqids []isc.RequestID)
- func PublishStateTransition(chainID *isc.ChainID, stateOutput *isc.AliasOutputWithID, reqIDsLength int)
- type AsynchronousCommonSubsetRunner
- type Chain
- type ChainCore
- type ChainEntry
- type ChainMetrics
- type ChainRequests
- type ChainRunner
- type ChainTransitionEventData
- type Committee
- type CommitteeInfo
- type Consensus
- type ConsensusInfo
- type ConsensusPipeMetrics
- type ConsensusWorkflowStatus
- type NodeConnection
- type PeerStatus
- type ReadyListRecord
- type RequestProcessingStatus
- type StateManager
- type SyncInfo
- type WAL
Constants ¶
View Source
const ( RequestProcessingStatusUnknown = RequestProcessingStatus(iota) RequestProcessingStatusBacklog RequestProcessingStatusCompleted )
View Source
const ( PeerMsgTypeMissingRequestIDs = iota PeerMsgTypeMissingRequest PeerMsgTypeOffLedgerRequest )
View Source
const ( // TimerTickPeriod time tick for consensus and state manager objects TimerTickPeriod = 100 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func LogGovernanceTransition ¶ added in v0.2.0
func LogGovernanceTransition(blockIndex uint32, outputID string, rootCommitment trie.VCommitment, log *logger.Logger)
LogGovernanceTransition
func LogStateTransition ¶ added in v0.2.0
func LogStateTransition(blockIndex uint32, outputID string, rootCommitment trie.VCommitment, reqids []isc.RequestID, log *logger.Logger)
LogStateTransition also used in testing
func PublishGovernanceTransition ¶ added in v0.2.0
func PublishGovernanceTransition(stateOutput *isc.AliasOutputWithID)
func PublishRequestsSettled ¶ added in v0.2.0
func PublishStateTransition ¶ added in v0.2.0
func PublishStateTransition(chainID *isc.ChainID, stateOutput *isc.AliasOutputWithID, reqIDsLength int)
Types ¶
type AsynchronousCommonSubsetRunner ¶ added in v0.2.0
type Chain ¶
type Chain interface { ChainCore ChainRequests ChainEntry ChainMetrics ChainRunner }
type ChainCore ¶ added in v0.2.0
type ChainCore interface { ID() *isc.ChainID GetCommitteeInfo() *CommitteeInfo StateCandidateToStateManager(state.VirtualStateAccess, *iotago.UTXOInput) TriggerChainTransition(*ChainTransitionEventData) Processors() *processors.Cache GlobalStateSync() coreutil.ChainStateSync GetStateReader() state.OptimisticStateReader GetChainNodes() []peering.PeerStatusProvider // CommitteeNodes + AccessNodes GetCandidateNodes() []*governance.AccessNodeInfo // All the current candidates. Log() *logger.Logger EnqueueDismissChain(reason string) EnqueueAliasOutput(*isc.AliasOutputWithID) }
type ChainEntry ¶ added in v0.2.0
ChainEntry interface to access chain from the chain registry side
type ChainMetrics ¶ added in v0.2.3
type ChainMetrics interface { GetNodeConnectionMetrics() nodeconnmetrics.NodeConnectionMessagesMetrics GetConsensusWorkflowStatus() ConsensusWorkflowStatus GetConsensusPipeMetrics() ConsensusPipeMetrics }
type ChainRequests ¶ added in v0.2.0
type ChainRequests interface { GetRequestReceipt(id isc.RequestID) (*blocklog.RequestReceipt, error) ResolveError(e *isc.UnresolvedVMError) (*isc.VMError, error) AttachToRequestProcessed(func(isc.RequestID)) (attachID *events.Closure) DetachFromRequestProcessed(attachID *events.Closure) EnqueueOffLedgerRequestMsg(msg *messages.OffLedgerRequestMsgIn) }
ChainRequests is an interface to query status of the request
type ChainRunner ¶ added in v0.3.0
type ChainRunner interface { GetAnchorOutput() *isc.AliasOutputWithID GetTimeData() time.Time GetVirtualState() (state.VirtualStateAccess, bool, error) }
type ChainTransitionEventData ¶ added in v0.2.0
type ChainTransitionEventData struct { IsGovernance bool VirtualState state.VirtualStateAccess ChainOutput *isc.AliasOutputWithID OutputTimestamp time.Time }
type Committee ¶ added in v0.2.0
type Committee interface { Address() iotago.Address Size() uint16 Quorum() uint16 OwnPeerIndex() uint16 IsAlivePeer(peerIndex uint16) bool QuorumIsAlive(quorum ...uint16) bool PeerStatus() []*PeerStatus IsReady() bool Close() RunACSConsensus(value []byte, sessionID uint64, stateIndex uint32, callback func(sessionID uint64, acs [][]byte)) GetRandomValidators(upToN int) []*cryptolib.PublicKey // TODO: Remove after OffLedgerRequest dissemination is changed. }
Committee is ordered (indexed 0..size-1) list of peers which run the consensus
type CommitteeInfo ¶ added in v0.2.0
type Consensus ¶ added in v0.2.0
type Consensus interface { EnqueueStateTransitionMsg(bool, state.VirtualStateAccess, *isc.AliasOutputWithID, time.Time) EnqueueDssIndexProposalMsg(msg *messages.DssIndexProposalMsg) EnqueueDssSignatureMsg(msg *messages.DssSignatureMsg) EnqueueAsynchronousCommonSubsetMsg(msg *messages.AsynchronousCommonSubsetMsg) EnqueueVMResultMsg(msg *messages.VMResultMsg) EnqueueTimerMsg(messages.TimerTick) IsReady() bool Close() GetStatusSnapshot() *ConsensusInfo GetWorkflowStatus() ConsensusWorkflowStatus ShouldReceiveMissingRequest(req isc.Request) bool GetPipeMetrics() ConsensusPipeMetrics SetTimeData(time.Time) }
type ConsensusInfo ¶ added in v0.2.0
type ConsensusPipeMetrics ¶ added in v0.2.5
type ConsensusWorkflowStatus ¶ added in v0.2.4
type ConsensusWorkflowStatus interface { IsStateReceived() bool IsBatchProposalSent() bool IsConsensusBatchKnown() bool IsVMStarted() bool IsVMResultSigned() bool IsTransactionFinalized() bool IsTransactionPosted() bool IsTransactionSeen() bool IsInProgress() bool GetBatchProposalSentTime() time.Time GetConsensusBatchKnownTime() time.Time GetVMStartedTime() time.Time GetVMResultSignedTime() time.Time GetTransactionFinalizedTime() time.Time GetTransactionPostedTime() time.Time GetTransactionSeenTime() time.Time GetCompletedTime() time.Time GetCurrentStateIndex() uint32 }
type NodeConnection ¶ added in v0.2.0
type NodeConnection interface { RegisterChain( chainID *isc.ChainID, stateOutputHandler, outputHandler func(iotago.OutputID, iotago.Output), milestoneHandler func(*nodebridge.Milestone), ) UnregisterChain(chainID *isc.ChainID) PublishTransaction(chainID *isc.ChainID, tx *iotago.Transaction) error PullLatestOutput(chainID *isc.ChainID) PullStateOutputByID(chainID *isc.ChainID, id *iotago.UTXOInput) AttachMilestones(handler func(*nodebridge.Milestone)) *events.Closure DetachMilestones(attachID *events.Closure) SetMetrics(metrics nodeconnmetrics.NodeConnectionMetrics) GetMetrics() nodeconnmetrics.NodeConnectionMetrics }
type PeerStatus ¶
func (*PeerStatus) String ¶
func (p *PeerStatus) String() string
type ReadyListRecord ¶ added in v0.2.0
type RequestProcessingStatus ¶
type RequestProcessingStatus int
type StateManager ¶
type StateManager interface { Ready() *ready.Ready EnqueueGetBlockMsg(msg *messages.GetBlockMsgIn) EnqueueBlockMsg(msg *messages.BlockMsgIn) EnqueueAliasOutput(*isc.AliasOutputWithID) EnqueueStateCandidateMsg(state.VirtualStateAccess, *iotago.UTXOInput) EnqueueTimerMsg(msg messages.TimerTick) GetStatusSnapshot() *SyncInfo SetChainPeers(peers []*cryptolib.PublicKey) Close() }
type SyncInfo ¶ added in v0.2.0
type SyncInfo struct { Synced bool SyncedBlockIndex uint32 SyncedStateCommitment trie.VCommitment SyncedStateTimestamp time.Time StateOutput *isc.AliasOutputWithID StateOutputCommitment trie.VCommitment StateOutputTimestamp time.Time }
Directories ¶
Path | Synopsis |
---|---|
Provides implementations for chain.ChainCore methods except the Enqueue*, which are provided in eventproc.go
|
Provides implementations for chain.ChainCore methods except the Enqueue*, which are provided in eventproc.go |
commoncoin
Package commoncoin implements a common coin abstraction needed by the HoneyBadgerBFT for synchronization and randomness.
|
Package commoncoin implements a common coin abstraction needed by the HoneyBadgerBFT for synchronization and randomness. |
Run a NonceDKG and sign the supplied hash.
|
Run a NonceDKG and sign the supplied hash. |
node
package node is a front-end to the Distributed Schnorr Signature subsystem.
|
package node is a front-end to the Distributed Schnorr Signature subsystem. |
mempool implements a buffer of requests sent to the ISC chain, essentially a backlog of requests It contains both on-ledger and off-ledger requests.
|
mempool implements a buffer of requests sent to the ISC chain, essentially a backlog of requests It contains both on-ledger and off-ledger requests. |
statemgr package implements object which is responsible for the smart contract ledger state to be synchronized and validated
|
statemgr package implements object which is responsible for the smart contract ledger state to be synchronized and validated |
Click to show internal directories.
Click to hide internal directories.