# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
No description provided by the author
AddressToRegisterOwner converts 8-byte address to register owner.
AllChainIDs returns a list of all supported chain IDs.
BuildIdentityTable constructs the full identity table for the target epoch by combining data from: 1.
ByReferenceOrder return a function for sorting identities based on the order of the given nodeIDs.
No description provided by the author
No description provided by the author
BytesToAddress returns Address with value b.
No description provided by the author
Canonical is a function that defines a weak strict ordering "<" for identities.
No description provided by the author
No description provided by the author
No description provided by the author
ClusterQCVoteDataFromQC converts a quorum certificate to the representation used by the smart contract, essentially discarding the block ID and view (which are protocol-defined given the EpochSetup event).
No description provided by the author
CollectionFromTransactions creates a new collection from the list of transactions.
CompatibleAlgorithms returns true if the signature and hash algorithms are compatible.
ComposeFullIdentities combines identity skeletons and dynamic identities to produce a flow.IdentityList.
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
No description provided by the author
DecodeRuntimeAccountPublicKey decode bytes into AccountPublicKey but it is designed to accept byte-format used by Cadence runtime (currently same as SDK, but we don't want to keep explicit dependency on SDK).
Deduplicate entities in a slice by the ID method The original order of the entities is preserved.
DynamicIdentityEntryListFromIdentities converts IdentityList to DynamicIdentityEntryList.
EmptyPayload returns an empty block payload.
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
EventsMerkleRootHash calculates the root hash of events inserted into a merkle trie with the hash of event as the key and encoded event as value.
No description provided by the author
No description provided by the author
No description provided by the author
GetIDs gets the IDs for a slice of entities.
No description provided by the author
HexStringToIdentifier converts a hex string to an identifier.
HexToAddress converts a hex string to an Address.
IdentifierCanonical is a function that defines a weak strict ordering "<" for identifiers.
IdentityListEqualTo checks if the other list if the same, that it contains the same elements in the same order.
IdentitySkeletonListEqualTo checks if the other list if the same, that it contains the same elements in the same order.
No description provided by the author
No description provided by the author
IsCanonical returns true if and only if the given Identities are in canonical order.
No description provided by the author
No description provided by the author
IsIdentifierCanonical returns true if and only if the given identifiers are in canonical order.
IsIdentifierListCanonical returns true if and only if the given list is _strictly_ sorted with regards to the canonical order.
IsIdentityListCanonical returns true if and only if the given IdentityList is _strictly_ sorted with regards to the canonical order.
IsInvalidSealingSegmentError returns true if err is or wraps an instance of InvalidSealingSegmentError.
No description provided by the author
No description provided by the author
MakeID creates an ID from a hash of encoded data.
MakeIDFromFingerPrint is similar to MakeID but skipping fingerprinting step.
No description provided by the author
No description provided by the author
NewBlockDigest constructs a new block digest.
NewCertifiedBlock constructs a new certified block.
No description provided by the author
NewChunkDataPack returns an initialized chunk data pack.
NewClusterList creates a new cluster list based on the given cluster assignment and the provided list of identities.
NewEpochStateEntry constructs a EpochStateEntry from an MinEpochStateEntry and additional data.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewRichEpochStateEntry constructs a RichEpochStateEntry from an EpochStateEntry.
NewSealingSegmentBuilder returns *SealingSegmentBuilder.
NewTransactionBody initializes and returns an empty transaction body.
NormalizedExecutionTimePerComputationUnit returns the normalized time per computation unit If the computation estimation is correct (as per the FLIP https://github.com/onflow/flow/pull/753) the value should be 1.
NoSlashable returns the zero value for Slashable[T].
ParseEpochParticipationStatus converts string representation of EpochParticipationStatus into a typed value.
ParseRole will parse a role from string.
No description provided by the author
PublicKeyToID creates an ID from a public key.
No description provided by the author
Sample returns non-deterministic random sample of length 'size' of the ids.
StringToAddress converts a string to an Address and return an error if the string is malformed.
ToDKGParticipantLookup constructs a DKG participant lookup from an identity list and a key list.
ToStateCommitment converts a byte slice into a StateCommitment.
No description provided by the author
# Constants
Account level keys.
No description provided by the author
AddressLength is the size of an account address in bytes.
No description provided by the author
Benchnet is the chain ID for the transient benchmarking chain.
BftTestnet is the chain ID for testing attack vector scenarios.
BlockStatusFinalized is the status of a finalized block.
BlockStatusSealed is the status of a sealed block.
BlockStatusUnknown indicates that the block status is not known.
No description provided by the author
No description provided by the author
threshold for re-requesting approvals: min height difference between the latest finalized block and the block incorporating a result.
DefaultChunkAssignmentAlpha is the default number of verifiers that should be assigned to each chunk.
DefaultEmergencySealingActive is a flag which indicates when emergency sealing is active, this is a temporary measure to make fire fighting easier while seal & verification is under development.
DefaultInitialWeight is the default initial weight for a node identity.
~3MB.
DefaultMaxCollectionSize is the default maximum number of transactions allowed inside a collection.
10M.
DefaultMaxTransactionByteSize is the default maximum transaction byte size.
DefaultMaxTransactionGasLimit is the default maximum value for the transaction gas limit.
DefaultProtocolVersion is the default protocol version, indicating none was explicitly set during bootstrapping.
DefaultRequiredApprovalsForSealConstruction is the default number of approvals required to construct a candidate seal for subsequent inclusion in block.
DefaultRequiredApprovalsForSealValidation is the default number of approvals that should be present and valid for each chunk.
DefaultTransactionExpiry is the default expiry for transactions, measured in blocks.
DefaultTransactionExpiryBuffer is the default buffer time between a transaction being ingested by a collection node and being included in a collection and block.
DefaultValueLogGCWaitDuration is the default wait duration before we repeatedly call the badger value log GC.
DKGEndStateDKGFailure - the underlying DKG library reported an error.
DKGEndStateInconsistentKey - the DKG completed, this node has an invalid beacon key.
DKGEndStateNoKey - this node did not store a key, typically caused by a crash mid-DKG.
DKGEndStateSuccess - the DKG completed, this node has a valid beacon key.
DKGEndStateUnknown - zero value for this enum, indicates unset value.
DomainTagLength is set to 32 bytes.
Emulator is the chain ID for the emulated chain.
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
No description provided by the author
No description provided by the author
No description provided by the author
EpochSetupRandomSourceLength is the required length of the random source included in an EpochSetup service event.
EstimatedComputationPerMillisecond is the approximate number of computation units that can be performed in a millisecond.
List of built-in event types.
List of built-in event types.
No description provided by the author
Localnet is the chain ID for the local development chain.
Mainnet is the chain ID for the mainnet chain.
MonotonicEmulator is the chain ID for the emulated node chain with monotonic address generation.
Previewet is the chain ID for an external preview chain.
No description provided by the author
Enumeration of the available flow node roles.
Enumeration of the available flow node roles.
Enumeration of the available flow node roles.
Enumeration of the available flow node roles.
Enumeration of the available flow node roles.
Sandboxnet is the chain ID for internal sandboxnet chain.
No description provided by the author
Protocol State version applies to all nodes and uses an _integer version_ of the _protocol_.
No description provided by the author
No description provided by the author
VersionBeacon only controls version of ENs, describing software compatability via semantic versioning.
No description provided by the author
Testnet is the chain ID for the testnet chain.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TransactionStatusExecuted is the status of an executed transaction.
TransactionStatusExpired is the status of an expired transaction.
TransactionStatusFinalized is the status of a finalized transaction.
TransactionStatusPending is the status of a pending transaction.
TransactionStatusSealed is the status of a sealed transaction.
TransactionStatusUnknown indicates that the transaction status is not known.
No description provided by the author
Service level keys (owner is empty):.
# Variables
No description provided by the author
DummyStateCommitment is an arbitrary value used in function failure cases, although it can represent a valid state commitment.
EmptyAddress is the default value of a variable of type Address.
No description provided by the author
No description provided by the author
GenesisTime defines the timestamp of the genesis block.
No description provided by the author
CAUTION: Json and MsgPack are to be used only for trusted data sources.
CAUTION: Json and MsgPack are to be used only for trusted data sources.
TransactionDomainTag is the prefix of all signed transaction payloads.
ZeroID is the lowest value in the 32-byte ID space.
# Structs
Account represents an account on the Flow network.
AccountPrivateKey is a private key associated with an account.
AccountPublicKey is a public key associated with an account.
AggregatedSignature contains a set of of signatures from verifiers attesting to the validity of an execution result chunk.
Attestation confirms correctness of a chunk of an exec result.
Block (currently) includes the header, the payload hashes as well as the payload contents.
BlockDigest holds lightweight block information which includes only block id, block height and block timestamp.
BlockEvents contains events emitted in a single block.
BlockExecutionDataRoot represents the root of a serialized execution_data.BlockExecutionData.
CertifiedBlock holds a certified block, which is a block and a QC that is pointing to the block.
No description provided by the author
No description provided by the author
ChunkDataPack holds all register touches (any read, or write).
ClusterQCVoteData represents the votes for a cluster quorum certificate, as gathered by the ClusterQC smart contract.
Collection is set of transactions.
CollectionGuarantee is a signed hash for a collection, which is used to announce collections to consensus nodes.
Note that this is the basic version of the List, we need to substitute it with something like Merkle tree at some point.
No description provided by the author
DynamicIdentity represents the dynamic part of public identity of one network participant (node).
DynamicIdentityEntry encapsulates nodeID and dynamic portion of identity.
EpochCommit is a service event emitted when the preparation process for the next epoch is complete.
EpochExtension represents a range of views, which contiguously extends this epoch.
EpochRecover service event is emitted when network is in Epoch Fallback Mode(EFM) in an attempt to return to happy path.
EpochSetup is a service event emitted when the network is ready to set up for the upcoming epoch.
EpochStateContainer holds the data pertaining to a _single_ epoch but no information about any adjacent epochs.
EpochStateEntry is a MinEpochStateEntry that has additional fields that are cached from the storage layer for convenience.
No description provided by the author
EventIDs is a container for IDs of epoch service events.
ExecutedTransaction are generated by computer and pass to chunker.
ExecutionReceipt is the full execution receipt, as sent by the Execution Node.
ExecutionReceiptMeta contains the fields from the Execution Receipts that vary from one executor to another (assuming they commit to the same result).
ExecutionResult is cryptographic commitment to the computation result(s) from executing a block.
Header contains all meta-data for a block, as well as a hash representing the combined payload of the entire block.
Identity is combined from static and dynamic part and represents the full public identity of one network participant (node).
IdentitySkeleton represents the static part of a network participant's (i.e.
IncorporatedResult is a wrapper around an ExecutionResult which contains the ID of the first block on its fork in which it was incorporated.
IncorporatedResultSeal is a wrapper around a seal that keeps track of which IncorporatedResult the seal corresponds to.
No description provided by the author
InvalidSealingSegmentError is returned either when building or validating a SealingSegment, when the segment is found to be invalid, or when attempting to add an entity to a segment under construction would cause the resulting SealingSegment to become invalid.
LightCollection is a collection containing references to the constituent transactions rather than full transaction bodies.
LightTransactionResult represents a TransactionResult, omitting any fields that are prone to non-determinism; i.e.
MinEpochStateEntry is the most compact snapshot of the epoch state and identity table (set of all notes authorized to be part of the network) at some specific block.
No description provided by the author
Payload is the actual content of each block.
A ProposalKey is the key that specifies the proposal key and sequence number for a transaction.
ProtocolStateEntryWrapper is a wrapper coupling two data sources.
ProtocolStateVersionUpgrade is a service event emitted by the FlowServiceAccount to signal an upgrade to the Protocol State version.
PSKeyValueStoreData is a binary blob with a version attached, specifying the format of the marshaled data.
QuorumCertificate represents a quorum certificate for a block proposal as defined in the HotStuff algorithm.
QuorumCertificateWithSignerIDs is a QuorumCertificate, where the signing nodes are identified via their `flow.Identifier`s instead of indices.
No description provided by the author
No description provided by the author
ResultApproval includes an approval for a chunk, verified by a verification node.
ResultApprovalBody holds body part of a result approval.
RichEpochStateEntry is a EpochStateEntry that additionally holds the canonical representation of the identity table (set of all notes authorized to be part of the network) at some specific block.
A Seal is produced when an Execution Result (referenced by `ResultID`) for particular block (referenced by `BlockID`) is committed into the chain.
SealedVersionBeacon is a VersionBeacon with a SealHeight field.
SealingSegment is a continuous segment of recently finalized blocks that contains enough history for a new node to execute its business logic normally.
SealingSegmentBuilder is a utility for incrementally building a sealing segment.
ServiceEvent represents a service event, which is a special event that when emitted from a service account smart contract, is propagated to the protocol and included in blocks.
Slashable represents an message we got from a different node, whose validity has not been _entirely_ confirmed.
TimeoutCertificate proves that a super-majority of consensus participants want to abandon the specified View.
Transaction is the smallest unit of task.
TransactionBody includes the main contents of a transaction.
TransactionResult contains the artifacts generated after executing a Cadence transaction.
A TransactionSignature is a signature associated with a specific account key.
TransactionTiming is used to track the timing/durations of a transaction through the system.
VersionBeacon represents a service event specifying the required software versions for executing upcoming blocks.
VersionBoundary represents a boundary between semver versions.
# Interfaces
No description provided by the author
Chain is the interface for address generation implementations.
Entity defines how flow entities should be defined Entities are flat data structures holding multiple data fields.
GenericIdentity defines a constraint for generic identities.
No description provided by the author
ServiceEventMarshaller marshals and unmarshals all types of service events.
# Type aliases
Address represents the 8 byte address of an account.
AssignmentList is a list of identifier lists.
BlockStatus represents the status of a block.
A ChainID is a unique identifier for a specific Flow network instance.
No description provided by the author
TODO: This is the basic version of the list, we need to substitute it with something like Merkle tree at some point.
ClusterList is a list of identity lists.
DKGEndState captures the final state of a completed DKG.
No description provided by the author
EpochParticipationStatus represents the status of a node's participation.
EpochPhase represents a phase of the Epoch Preparation Protocol.
No description provided by the author
No description provided by the author
ExecutionReceiptGroupedList is a partition of an ExecutionReceiptList.
ExecutionReceiptGroupingFunction is a function that assigns an identifier to each receipt.
ExecutionReceiptList is a slice of ExecutionReceipts with the additional functionality to group receipts by various properties.
ExecutionReceiptMetaGroupedList is a partition of an ExecutionReceiptMetaList.
ExecutionReceiptMetaGroupingFunction is a function that assigns an identifier to each receipt meta.
ExecutionReceiptMetaList is a slice of ExecutionResultMetas with the additional functionality to group them by various properties.
ExecutionResultGroupedList is a partition of an ExecutionResultList.
ExecutionResultGroupingFunction is a function that assigns an identifier to each ExecutionResult.
ExecutionResultList is a slice of ExecutionResults with the additional functionality to group them by various properties.
No description provided by the author
GetProtocolStateEntryFunc is a getter function for protocol state entries No errors are expected during normal operation.
GetResultFunc is a getter function for results by ID.
GetSealByBlockIDFunc is a getter function for seals by block ID, returning the latest seals incorporated as of the given block.
Identifier represents a 32-byte unique identifier for an entity.
IdentifierFilter is a filter on identifiers.
IdentifierList defines a sortable list of identifiers.
IdentifierOrder is an order function for identifiers.
IdentityFilter is a filter on identities.
IdentityMapFunc is a modifier function for map operations for identities.
IdentityOrder is an order function for identities.
IncorporatedResultGroupedList is a partition of an IncorporatedResultList.
IncorporatedResultGroupingFunction is a function that assigns an identifier to each IncorporatedResult.
IncorporatedResultList is a slice of IncorporatedResults with the additional functionality to group them by various properties.
handy container for sorting TODO(ramtin): add canonical encoding and fingerprint for RegisterEntries.
handy container for sorting.
RegisterValue (value part of Register).
Role represents a role in the flow system.
RoleList defines a slice of roles in flow system.
ServiceEventList is a handy container to enable comparisons.
No description provided by the author
No description provided by the author
StateCommitment holds the root hash of the tree (Snapshot) TODO: solve the circular dependency and define StateCommitment as ledger.State.
StorageProof (proof of a read or update to the state, Merkle path of some sort).
TransactionField represents a required transaction field.
TODO(ramtin): add canonical encoding and ID.
TransactionStatus represents the status of a transaction.