# Functions
ApprovalWeights is an Option for the Tangle that allows to define how the approval weights of Blocks is determined.
BlockIDFromContext returns the BlockID from the given context.
BlockIDToContext adds the BlockID to the given context.
CacheTimeProvider is an Option for the Tangle that allows to override hard coded cache time.
CommitmentFunc is an Option for the Tangle that retrieves epoch commitments for blocks.
GenesisNode is an Option for the Tangle that allows to set the GenesisNode, i.e., the node that is allowed to attach to the Genesis Block.
GenesisTime is an Option for the Tangle that allows to set the genesis time.
Identity is an Option for the Tangle that allows to specify the node identity which is used to issue Blocks.
IncreaseMarkersIndexCallback is an Option for the Tangle that allows to change the strategy how new Markers are assigned in the Tangle.
IssueAndValidateBlockApproval issues the blk by the given alias and assets the expected weights.nolint:gomnd.
MaxRequestThreshold creates an option which defines how often the Requester should try to request blocks before canceling the request.
New is the constructor for the Tangle.
NewApprovalWeightManager is the constructor for ApprovalWeightManager.
NewAttachment creates an attachment object with the given information.
NewBlock creates a new block with the details provided by the issuer.
NewBlockFactory creates a new block factory.
NewBlockFactoryEvents returns a new BlockFactoryEvents object.
NewBlockID returns a new BlockID for the given data.
NewBlockIDs construct a new BlockID collection from the optional BlockIDs.
NewBlockMetadata creates a new BlockMetadata from the specified blockID.
NewBlockSignatureFilter creates a new block signature filter.
NewBlockTestFramework is the constructor of the BlockTestFramework.
NewBlockTestFrameworkBlockOptions is the constructor for the BlockTestFrameworkBlockOptions.
NewBlockTestFrameworkOptions is the constructor for the BlockTestFrameworkOptions.
NewBlockWithValidation creates a new block while performing ths following syntactical checks: 1.
NewBooker is the constructor of a Booker.
No description provided by the author
NewChild creates a new child relation to the given approved/referenced block.
NewCManaWeightProvider is the constructor for CManaWeightProvider.
NewConfirmationEvents returns a new ConfirmationEvents object.
NewConflictMarkersMapper is the constructor of the MarkersManager.
NewConflictVote derives a vote for th.
NewConflictVoters is the constructor for the ConflictVoters object.
NewConflictWeight creates a new ConflictWeight.
NewEventMock creates a new EventMock.
NewLatestConflictVotes creates a new LatestConflictVotes.
NewLatestMarkerVotes creates a new NewLatestMarkerVotes instance associated with the given details.
NewMarkerBlockMapping is the constructor for the MarkerBlockMapping.
NewMarkerIndexConflictIDMapping creates a new MarkerIndexConflictIDMapping for the given SequenceID.
NewMissingBlock creates new missing block with the specified blockID.
NewOrphanageManager returns a new OrphanageManager.
NewOTVConsensusManager returns a new Mechanism.
NewParentBlockIDs constructs a new ParentBlockIDs.
NewParser creates a new Block parser.
NewPowFilter creates a new PoW bytes filter.
NewRateSetter returns a new RateSetter.
NewRecentlySeenBytesFilter creates a new recently seen bytes filter.
NewReferenceProvider creates a new ReferenceProvider instance.
NewRequester creates a new block requester.
NewScheduler returns a new Scheduler.
No description provided by the author
NewSolidifier is the constructor of the Solidifier.
NewStorage creates a new Storage.
NewTestTangle returns a Tangle instance with a testing schedulerConfig.
NewTimeManager is the constructor for TimeManager.
NewTipManager creates a new tip-selector.
No description provided by the author
NewTransactionFilter creates a new transaction filter.
NewUtils is the constructor of the Utils component.
NewVoters is the constructor of the Voters type.
ProcessBlockScenario the approval weight and voter adjustments.nolint:gomnd.
ProcessBlockScenario2 creates a scenario useful to validate strong / weak propagation paths.nolint:gomnd.
RateSetterConfig is an Option for the Tangle that allows to set the rate setter.
RetryInterval creates an option which sets the retry interval to the given value.
RetryJitter creates an option which sets the retry jitter to the given value.
SchedulerConfig is an Option for the Tangle that allows to set the scheduler.
StartSynced is an Option for the Tangle that allows to define if the node starts as synced.
Store is an Option for the Tangle that allows to specify which storage layer is supposed to be used to persist data.
SyncTimeWindow is an Option for the Tangle that allows to define the time window in which the node will consider itself in sync.
TimeSinceConfirmationThreshold is an Option for the Tangle that allows to set threshold for Time Since Confirmation check.
Width is an Option for the Tangle that allows to change the strategy how Tips get removed.
WithColoredGenesisOutput returns a BlockTestFrameworkOption that defines a genesis Output that is loaded as part of the initial snapshot and that supports colored coins.
WithColoredOutput returns a BlockOption that is used to define a colored Output for the Transaction in the Block.
WithConflictDAGOptions is an Option for the Tangle that allows to set the ConflictDAG options.
WithECRecord returns a BlockOption that is used to define the ecr of the Block.
WithGenesisOutput returns a BlockTestFrameworkOption that defines a genesis Output that is loaded as part of the initial snapshot.
WithInputs returns a BlockOption that is used to provide the Inputs of the Transaction.
WithIssuer returns a BlockOption that is used to define the issuer of the Block.
WithIssuingTime returns a BlockOption that is used to set issuing time of the Block.
WithLatestConfirmedEpoch returns a BlockOption that is used to define the latestConfirmedEpoch of the Block.
WithOutput returns a BlockOption that is used to define a non-colored Output for the Transaction in the Block.
WithReattachment returns a BlockOption that is used to select payload of which Block should be reattached.
WithSequenceNumber returns a BlockOption that is used to define the sequence number of the Block.
WithShallowLikeParents returns a BlockOption that is used to define the shallow like parents of the Block.
WithStrongParents returns a BlockOption that is used to define the strong parents of the Block.
WithWeakParents returns a BlockOption that is used to define the weak parents of the Block.
# Constants
BlockIDLength defines the length of an BlockID.
BlockVersion defines the Version of the block structure.
ChildTypeLength contains the amount of bytes that a marshaled version of the ChildType contains.
Confirmed represents the Opinion that a given Conflict is the winning one.
DBSequenceNumber defines the db sequence number.
DefaultSyncTimeWindow is the default sync time window.
LastValidBlockType counts StrongParents, WeakParents, ShallowLikeParents.
MaxBlockSize defines the maximum size of a block.
MaxLocalQueueSize is the maximum local (containing the block to be issued) queue size in bytes.
MaxParentsBlocksCount defines the maximum number of parents each parents block must have.
MaxParentsCount defines the maximum number of parents each parents block must have.
MaxReattachmentTimeMin defines the max reattachment time.
MinMana is the minimum amount of Mana needed to issue blocks.
MinParentsBlocksCount defines the minimum number of parents each parents block must have.
MinParentsCount defines the minimum number of parents each parents block must have.
MinStrongParentsCount defines the minimum number of strong parents a block must have.
PrefixAttachments defines the storage prefix for attachments.
PrefixBlock defines the storage prefix for block.
PrefixBlockMetadata defines the storage prefix for block metadata.
PrefixChildren defines the storage prefix for children.
PrefixConflictVoters defines the storage prefix for the ConflictVoters.
PrefixConflictWeight defines the storage prefix for the ConflictWeight.
PrefixLatestConflictVotes defines the storage prefix for the LatestConflictVotes.
PrefixLatestMarkerVotes defines the storage prefix for the LatestMarkerVotes.
PrefixMarkerBlockMapping defines the storage prefix for the MarkerBlockMapping.
PrefixMarkerConflictIDMapping defines the storage prefix for the PrefixMarkerConflictIDMapping.
PrefixMissingBlock defines the storage prefix for missing block.
RateSettingDecrease global multiplicative decrease parameter (larger than 1).
RateSettingIncrease is the global additive increase parameter.
Rejected represents the Opinion that a given Conflict is the loosing one.
ShallowLikeChild is the ChildType that represents references formed by shallow like parents.
ShallowLikeParentType is the ParentsType for the shallow like parent.
StrongChild is the ChildType that represents references formed by strong parents.
StrongParentType is the ParentsType for a strong parent.
UndefinedOpinion represents the zero value of the Opinion type.
UndefinedParentType is the undefined parent.
WeakChild is the ChildType that represents references formed by weak parents.
WeakParentType is the ParentsType for a weak parent.
Wmax is the maximum inbox threshold for the node.
Wmin is the min inbox threshold for the node.
# Variables
DefaultRequesterOptions defines the default options that are used when creating Requester instances.
EmptyBlockID is an empty id.
ErrBlockTooSmall is returned when the block does not contain enough data for the PoW.
ErrBlockTypeIsUnknown is triggered when the block type is unknown.
ErrConflictingReferenceAcrossBlocks is triggered if there conflicting references across blocks.
ErrInvalidBlockAndTransactionTimestamp is returned when the block its transaction timestamps are invalid.
ErrInvalidIssuer is returned when an invalid block is passed to the rate setter.
ErrInvalidPOWDifficultly is returned when the nonce of a block does not fulfill the PoW difficulty.
ErrInvalidSignature is returned when a block contains an invalid signature.
ErrNoStrongParents is triggered if there no strong parents.
ErrNotBootstrapped is triggered when somebody tries to issue a Payload before the Tangle is fully bootstrapped.
ErrNotRunning is returned when a block is submitted when the scheduler has been stopped.
ErrParentsInvalid is returned when one or more parents of a block is invalid.
ErrReceivedDuplicateBytes is returned when duplicated bytes are rejected.
ErrStopped is returned when a block is passed to a stopped rate setter.
LatestMarkerVotesKeyPartition defines the partition of the storage key of the LastMarkerVotes model.
MarkerBlockMappingPartitionKeys defines the "layout" of the key.
MaxDeficit is the maximum cap for accumulated deficit, i.e.
ParentTypeToChildType represents a convenient mapping between a parent type and the child type.
ZeroWorker is a PoW worker that always returns 0 as the nonce.
# Structs
ApprovalWeightManager is a Tangle component to keep track of relative weights of conflicts and markers so that consensus can be based on the heaviest perception on the tangle as a data structure.
ApprovalWeightManagerEvents represents events happening in the ApprovalWeightManager.
Attachment stores the information which transaction was attached by which block.
Block represents the core block for the base layer Tangle.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlockFactory acts as a factory to create new blocks.
BlockFactoryEvents represents events happening on a block factory.
BlockID identifies a block via its BLAKE2b-256 hash of its bytes.
BlockInvalidEvent is struct that is passed along with triggering a blockInvalidEvent.
BlockMetadata defines the metadata for a block.
No description provided by the author
No description provided by the author
No description provided by the author
BlockParsedEvent holds the information provided by the BlockParsed event that gets triggered when a block was fully parsed and syntactically validated.
BlockProcessedEvent holds information about a processed block.
BlockRejectedEvent holds the information provided by the BlockRejected event that gets triggered when the Block was detected to be invalid.
No description provided by the author
No description provided by the author
BlockSignatureFilter filters blocks based on whether their signatures are valid.
No description provided by the author
No description provided by the author
No description provided by the author
BlockTestFramework implements a framework for conveniently issuing blocks in a tangle as part of unit tests in a simplified way.
BlockTestFrameworkBlockOptions is a struct that represents a collection of options that can be set when creating a Block with the BlockTestFramework.
BlockTestFrameworkOptions is a container that holds the values of all configurable options of the BlockTestFramework.
Booker is a Tangle component that takes care of booking Blocks and Transactions by assigning them to the corresponding Conflict of the ledger state.
BookerEvents represents events happening in the Booker.
BootstrappedEvent represents a bootstrapped event.
BytesRejectedEvent holds the information provided by the BytesRejected event that gets triggered when the bytes of a Block did not pass the parsing step.
Child is an child of a given referenced block.
CManaWeightProvider is a WeightProvider for consensus mana.
ConfirmationEvents are events entailing confirmation.
ConflictMarkersMapper is a Tangle component that takes care of managing the Markers which are used to infer structural information about the Tangle in an efficient way.
ConflictVote represents a struct that holds information about what Opinion a certain Voter has on a Conflict.
ConflictVoters is a data structure that tracks which nodes support a conflict.
ConflictWeight is a data structure that tracks the weight of a ConflictID.
ConflictWeightChangedEvent holds information about a conflict and its updated weight.
DBStatsResult is a structure containing all the statistics retrieved by DBStats() method.
DispatcherEvents represents events happening in the Dispatcher.
EventMock acts as a container for event mocks.
Events represents events happening in the Tangle.
LastBlock is a wrapper type for the last confirmed block, consisting of BlockID, BlockTime and UpdateTime.
LatestConflictVotes represents the conflict supported from an Issuer.
LatestMarkerVotes keeps track of the most up-to-date for a certain Voter casted on a specific Marker SequenceID.
LikedConflictMembers is a struct that holds information about which Conflict is the liked one out of a set of ConflictMembers.
MarkerBlockMapping is a data structure that denotes a mapping from a Marker to a Block.
No description provided by the author
MarkerIndexConflictIDMapping is a data structure that allows to map marker Indexes to a ConflictID.
MarkerWeightChangedEvent holds information about a marker and its updated weight.
MissingBlock represents a missing block.
No description provided by the author
MockConfirmationOracle is a mock of a ConfirmationOracle.
MockWeightProvider is a mock of a WeightProvider.
No description provided by the author
Options is a container for all configurable parameters of the Tangle.
OrphanageManager is a manager that tracks orphaned blocks.
No description provided by the author
OTVConsensusManager is the component in charge of forming opinions about conflicts.
Parent is a parent that can be either strong or weak.
Parser parses blocks and bytes and emits corresponding events for parsed and rejected blocks.
ParserEvents represents events happening in the Parser.
PowFilter is a block bytes filter validating the PoW nonce.
PrePostStepTuple is a tuple of TestStep(s) called before and after the actual test step is called.
QueueElement is an element in the TimedQueue.
RateSetter is a Tangle component that takes care of congestion control of local node.
RateSetterEvents represents events happening in the rate setter.
RateSetterParams represents the parameters for RateSetter.
RecentlySeenBytesFilter filters so that bytes which were recently seen don't pass the filter.
ReferenceProvider is a component that takes care of creating the correct references when selecting tips.
Requester takes care of requesting blocks.
RequesterEvents represents events happening on a block requester.
RequesterOptions holds options for a block requester.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Scheduler is a Tangle component that takes care of scheduling the blocks that shall be booked.
SchedulerEvents represents events happening in the Scheduler.
SchedulerParams defines the scheduler config parameters.
SimpleMockOnTangleVoting is mock of OTV mechanism.
Solidifier is the Tangle's component that solidifies blocks.
SolidifierEvents represents events happening in the Solidifier.
Storage represents the storage of blocks.
StorageEvents represents events happening on the block store.
SyncChangedEvent represents a sync changed event.
Tangle is the central data structure of the IOTA protocol.
TestScenario is a sequence of steps applied onto test scenario.
TimeManager is a Tangle component that keeps track of the TangleTime.
TimeManagerEvents represents events happening in the TimeManager.
TimeUpdate represents an update in Tangle Time.
TipEvent holds the information provided by the TipEvent event that gets triggered when a block gets added or removed as tip.
TipManager manages a map of tips and emits events for their removal and addition.
TipManagerEvents represents events happening on the TipManager.
No description provided by the author
No description provided by the author
TransactionFilter filters blocks based on their timestamps and transaction timestamp.
Utils is a Tangle component that bundles methods that can be used to interact with the Tangle, that do not belong into public API.
Voters is a set of node identities that votes for a particular Conflict.
# Interfaces
BlockFilter filters based on blocks and peers.
BytesFilter filters based on byte slices and peers.
ConfirmationOracle answers questions about entities' confirmation.
A TipSelector selects two tips, parent2 and parent1, for a new block to attach to.
WeightProvider is an interface that allows the ApprovalWeightManager to determine approval weights of Blocks in a flexible way, independently of a specific implementation.
A Worker performs the PoW for the provided block in serialized byte form.
# Type aliases
ActivityUpdatesCount stores the counters on how many times activity record was updated.
BlockIDs is a set of BlockIDs where every BlockID is stored only once.
BlockOption is the type that is used for options that can be passed into the CreateBlock method to configure its behavior.
BlockTestFrameworkOption is the type that is used for options that can be passed into the BlockTestFramework to configure its behavior.
CachedLatestMarkerVotesByVoter represents a cached LatestMarkerVotesByVoter mapped by Voter.
ChildType is a type that represents the different kind of reverse mapping that we have for references formed by strong and weak parents.
ConfirmedEpochRetrieverFunc is a function type to retrieve the confirmed epoch index.
ManaRetrieverFunc is a function type to retrieve consensus mana (e.g.
NodeIdentities defines a set of node identities mapped through an alias.
Opinion is a type that represents the Opinion of a node on a certain Conflict.
Option represents the return type of optional parameters that can be handed into the constructor of the Tangle to configure its behavior.
ParentBlockIDs is a map of ParentType to BlockIDs.
ParentsType is a type that defines the type of the parent.
ReferencesFunc is a function type that returns like references a given set of parents of a Block.
RequesterOption is a function which inits an option.
TestStep defines a test scenario step.
TimedHeap defines a heap based on times.
TimeRetrieverFunc is a function type to retrieve the time.
The TipSelectorFunc type is an adapter to allow the use of ordinary functions as tip selectors.
VotePower is used to establish an absolute order of votes, regardless of their arrival order.
Voter is a type wrapper for identity.ID and defines a node that supports a conflict or marker.
The WorkerFunc type is an adapter to allow the use of ordinary functions as a PoW performer.