Foundational Concepts
Last updated
Was this helpful?
Last updated
Was this helpful?
CryptoArena is an experimental venture at the bleeding edge of defi & blockchain technology.
Our distribution blockchain is a Layer 2 solution built as a Parachain that shares its security and interoperability with Polkadot's Relay Chain (Layer 1) and the rest of L2s in the network.
This section is a handy reference guide for concepts and terminology relating to our the technologies involved in our solution and related to our .
Parachains share in the security of the overall network and can interact without trust bonds much like smart contracts on Ethereum can interact without trust bonds — they share state and validation logic with the greater network.
Because Polkadot provides the security and validity guarantees, parachains are not subject to normal blockchain attack scenarios, like a 51% attack. Polkadot validators will reject invalid blocks, so a parachain only needs a single honest collator to submit blocks.
This model opens up a new area of crypto-economics that could include token-less parachains, proof-of-stake parachains that use either a native parachain token or dot tokens, or other collator selection mechanisms. Block author information is normally part of the block header’s digest and is easy to verify.
A means of specifying a passing threshold for a referendum based on voter turnout. Positive turnout bias means that as more votes are cast, the passing threshold decreases; i.e. a higher turnout positively increases the likelihood of a referendum passing. Negative turnout bias means that the passing threshold increases as more votes are cast. Negative turnout bias is also called "default carries" as, given an apathetic voting body, the referendum will pass by default. A neutral turnout bias specifies a simple majority passing threshold. AQB removes the need for strict quorums, which are arbitrary and create undesirable governance mechanics. AQB is implemented in the , which provides the interfaces for a number of on-chain bodies (e.g. a or any token holder) to call referenda with positive, neutral, or negative biases.
An internal codename for "Al's Finality Gadget", which is named after who invented it. AfG is synonymous with .
Call
- published functions that may be called with a set of arguments
Error
- used to inform users why a function invocation (Call
) failed
Event
- pallets can emit events to make users aware of some state changes
Log
- an extensible header item
Metadata
- information that allows inspection of the above
Origin
- specifies the source of a function invocation (Call
)
Voting system where voter can vote for as many candidates as desired. The candidate with highest overall amount of votes wins. Notably:
voting for all candidates is exactly equivalent to voting for none; and
it is possible to vote "against" a single candidate by voting for all other candidates.
The loss of a system service due to a Byzantine Fault (i.e. components in the system fail and there is imperfect information about whether a component has failed) in systems that require consensus.
An early approach to Byzantine fault tolerance. pBFT systems tolerate Byzantine behavior from up to one-third of participants. The communication overhead for such systems is O(n²)
, where n
is the number of nodes (participants) in the system.
A term that refers to concepts like signature schemes and hashing algorithms. Cryptographic primitives are essential to many aspects of the Substrate ecosystem:
In these systems, finality is expressed in terms of a probability, denoted by p
, that a proposed block, denoted by B
, will remain in the canonical chain; as more blocks are produced on top of B
, p
approaches 1.
A piece of data that can be used to prove that a particular block is finalized.
A subsystem in Substrate for managing keys for the purpose of producing new blocks.
A mechanism for interacting with a computer program that allows developers to easily query the computer program or even invoke its logic with parameters they supply. Substrate nodes expose an RPC server on HTTP and WebSocket endpoints.
Democratic voting system that uses one-vote-per-token, rather than one-vote-per-head.
An data structure that is used to represent sets of items where:
a cryptographic digest of the dataset is needed; and/or
it is cheap to recompute the digest with incremental changes to the dataset even when it is very large; and/or
a concise proof that the dataset contains some item/pair (or lacks it) is needed.
Used in the context of , " aggregation" means combining analogous types from multiple runtime modules into a single type. This allows each module's analogous types to be represented. Currently there are six such data types:
Approval voting is used by the that materializes as a governing on a number of Substrate-based chains.
The that is responsible for the creation of a ; block authors may be referred to as block "producers". In a proof-of-work chain these nodes are called "miners".
Authorities are the who, as a collective, manage on a network. In a network (such as one using from ), authorities are determined through a token-weighted nomination/voting system.
The terms "authorities" and "" may sometimes seem to refer the same thing. "Validators" is a broader term that can include other aspects of chain maintenance such as parachain validation. In general authorities are a (non-strict) subset of validators and many validators will be authorities.
Deterministic protocol where production is limited to a rotating list of that take turns creating blocks; the majority of online authorities are assumed to be honest. Learn more by reading for the Aura consensus algorithm.
A scheme where is used for block production and short-term , with provided through .
protocol similar to , however win based on a verifiable random function (VRF) as opposed to Aura's round-robin selection method. The winning authority can select a chain and submit a new block for it. Learn more about BABE by referring to its .
A single element of a blockchain that binds a set of data (the "body") to a "". Blocks are arranged into a tree through parent pointers (implemented as a hash of the parent) and the tree is pruned into a list via a , and optional .
A blockchain is a distributed network of computers that uses to allow a group of participants to trustlessly come to on the of a system as it evolves over time. The computers that compose the blockchain network are called .
The ability of a distributed computer system to remain operational in the face of a proportion of defective or . "Byzantine" refers to the ultimate level of defectiveness, with such nodes assumed to be actively malicious and coordinating rather than merely offline or buggy. Typically, BFT systems remain functional with up to around one-third of Byzantine nodes.
: must be hashed under some algorithm and reference their parent block's hash.
: Substrate storage is encoded as a , a data structure that uses hashing to facilitate efficient verification.
: often use digital signature schemes of some kind.
authentication: in where transactions and are used, accounts are identified and authenticated through the use of cryptography.
The term "Council" is used on a number of Substrate-based networks, such as and to refer to an instance of that is used as a part of the network's -based . The Council primarily serves as a body to optimize and check/balance the more inclusive referendum system.
The means by which the of a network is persisted between invocations of the application. There is that explains the implementation of the database backend that is used by Substrate-based chains.
A that is intentionally made public. All of the (Alice, Bob, Charlie, Dave, Ferdie, and Eve) are generated from the same dev phrase. The dev phrase is: bottom drive obey lake curtain smoke basket hold race lonely fit walk
.
Many tools in the Substrate ecosystem, such as , allow users to implicitly specify the dev phrase by only specifying a derivation path such as //Alice
.
An extensible field of the that encodes information needed by several actors in a blockchain network including, for chain synchronization, consensus engines for block verification, and the runtime itself in the case of pre-runtime digests.
A dispatch is the execution of a function with a pre-defined set of arguments. In the context of development with , this refers specifically to the "runtime dispatch" system, a means of taking some pure data (the type is known as Call
by convention) and interpreting it in order to call a published function in a runtime module ("") with some arguments. Such published functions take one additional parameter, known as , that allows the function to securely determine the provenance of its execution.
A type of (erroneous/malicious) behavior that involves backing multiple mutually-exclusive options within the mechanism.
A function used by some systems, notably that which is used by the Ethereum blockchain. It was developed by .
A means of recording, for the benefit of the off-chain world, that some particular transition happened. Within the context of , events are one of a number of composable data types that each may individually define. Events in FRAME are implemented as a set of transient storage items that are inspected immediately after a block has executed and reset during block-initialization.
A means of executing a function call in a given with a set of dependencies. There are two implementations present in Substrate, Wasm and Native.
This executor uses a natively compiled runtime embedded in the to execute calls. This is a performance optimization that up-to-date nodes can take advantage of.
This executor uses a binary and a Wasm interpreter to execute calls. The binary is guaranteed to be up-to-date regardless of the version of the blockchain since it is persisted in the of the Substrate-based chain.
A piece of data that is bundled into a in order to express something from the "external" (i.e. off-chain) world. There are, broadly speaking, two types of extrinsics: transactions, which may be or , and , which are inserted by .
Within the , this is the minimum balance an account may have. Accounts cannot be created with a balance less than this amount, and if an account's balance ever drops below this amount, the Balances pallet will use to drop its references to that account. If all the references to an account are dropped, it .
A part of that deals with making a progression irreversible. If a is "finalized", then any changes it encapsulates are irreversible without a hard fork and it is safe to effect any off-chain repercussions that depend on them. The consensus algorithm must guarantee that finalized blocks never need reverting.
is the gadget that is used by the .
In these systems, all blocks are guaranteed to be the canonical block for that chain upon block inclusion. Deterministic finality is desirable in situations where the full chain is not available, such as in the case of . is a deterministic finality gadget.
A non-probabilistic consensus protocol that gives a guarantee of finality immediately upon block production. These tend to be -based and thus very expensive in terms of communication requirements.
Forks occur when two have the same parent. Forks must be so that only one canonical chain exists.
Flaming Fir is a -maintained Substrate-based that exists for developing and testing the Substrate blockchain development framework.
is Substrate's system for development. The name is an acronym for the "Framework for Runtime Aggregation of Modularized Entities". FRAME allows developers to create blockchain runtimes by composing modules, called "". Runtime developers interact with FRAME by way of a language that makes it easy for developers to define custom pallets (e.g. , , , and compose pallets (e.g. into a working runtime that can easily be used to power a Substrate-based blockchain. The convention used in is to preface FRAME's core modules with frame_
and the optional pallets with pallet_*
. For instance, the macros mentioned above are all defined in the module and all FRAME-based runtimes must include the module. Once the frame_support::construct_runtime
macro has been used to create a runtime that includes the frame_system
module, optional pallets such as the pallet may be used to extend the runtimes core capabilities.
A that is able to synchronize a block chain in a maximally secure manner through execution (and thus verification) of all logic. Full clients stand in contrast to .
A mechanism for specifying the initial (genesis) of a . Genesis configuration of Substrate-based chains is accomplished by way of a file, which makes it easy to use a single Substrate codebase to underpin multiple independently configured chains.
A gadget for that is implemented in the programming language. The is maintained by the
A structure that is used to aggregate pieces of (primarily ) information that summarize a . This information is used by to get a minimally-secure but very efficient synchronization of the chain.
is a Substrate-based that implements a design similar to the . Kusama is a "" network and is referred to as . The differences between a canary network and a true test network are related to the expectations of permanence and stability; although Kusama is expected to be more stable than a true test network, like , it should not be expected to be as stable as an enterprise production network like . Unlike Westend, which is maintained by , Kusama (like Polkadot) is . The level of stability offered by canary networks like Kusama is intended to encourage meaningful experimentation.
A peer-to-peer networking stack that allows use of many transport mechanisms, including WebSockets (usable in a web browser). Substrate uses the of the libp2p networking stack.
A light client is a type of blockchain that does not store the or produce () blocks. It encapsulates basic capabilities for verifying and exposes an server to allow blockchain users to interact with the blockchain network.
Macros are features of some programming languages, , that allow developers to "write code that writes code". provides a number of that make it easy to compose a .
Metadata is information about a system, such as a , that makes it easier to interact with that system. Blockchain that are built with expose .
A node correlates to a running instance of a blockchain client; it is part of the network that allows blockchain participants to interact with one another. Substrate nodes can fill a number of roles in a blockchain network. For instance, are the block-producing nodes that power the blockchain, while facilitate scalable interactions in resource-constrained environments like or embedded devices.
A means of determining a set of (and thus ) from a number of accounts willing to commit their stake to the proper (non-) functioning of one or more /validator nodes. The Polkadot protocol describes validator selection as a constraint optimization problem to eventually give a maximally staked set of validators each with a number of supporting nominators lending their stake. Slashing and rewards are done in a pro-rata manner.
A primitive that identifies the source of a function call into the . The FRAME System module defines ; developers can easily define custom origins, such as those defined by the .
A parachain is a that derives shared infrastructure and security from a "". You can .
A module that can be used to extend the capabilities of a -based . Pallets bundle domain-specific logic along with related runtime primitives like , and .
The is a that serves as the central hub of a heterogeneous blockchain network. It serves the role of "" and supports the other chains (the "") by providing shared infrastructure and security. The Polkadot Network is progressing through a and does not currently support parachains.
A mechanism that deters attacks by requiring work on the part of network participants. For instance, some proof-of-work systems require participants to use the function to calculate a hash as a proof of completed work.
The central hub in a heterogenous ("chain-of-chains") network. Relay chains are that provide shared infrastructure and security to the other blockchains in the network (the ""). In addition to providing capabilities, relay chains also allow parachains to communicate and exchange digital assets without needing to trust one another.
A standard way to call functions on a remote system by using a JSON protocol. For Substrate, this is implemented through the crate.
An , algorithm. One of a number of adaptions of for blockchains. Refer to its .
Rococo is the Network's test network. It is a Substrate-based that is an evolving testbed for the capabilities of heterogeneous blockchain networks.
The block execution logic of a blockchain, i.e. the . In Substrate, this is stored as a binary in the .
A fixed, equal interval of time used by consensus engines such as and . In each slot, a subset of is permitted (or obliged, depending on the engine) to a .
In a , the state refers to the cryptographically secure data that persists between blocks and can be used to create new blocks as part of the state transition function. In Substrate-based blockchains, state is stored in a , a data structure that supports the efficient creation of incremental digests. This trie is exposed to the as where both keys and values can be arbitrary byte arrays.
The logic of a that determines how the state changes when a is processed. In Substrate, this is effectively equivalent to the .
primitives that provide type-safe data persistence capabilities to the . Learn more about storage items in the Knowledge Base article for .
A flexible framework for building modular, efficient, and upgradeable . Substrate is written in the programming language and is maintained by .
A type of that can be safely gossiped between on the network thanks to efficient through or .
A definable period, expressed as a range of numbers, where a transaction may be included in a block. Transaction eras are used to protect against transaction replay attacks in the event that an account is reaped and its (replay-protecting) nonce is reset to zero.
A collection of transactions that are not yet included in but have been determined to be valid.
A generic Substrate-based transaction pool implementation that allows the to specify whether a given transaction is valid, how it should be prioritized, and how it relates to other transactions in the pool in terms of dependency and mutual-exclusivity. It is designed to be easily extensible and general enough to express both the and account-based transaction models.
A semi-trusted (or untrusted but well-incentivized) actor that helps maintain a network. In Substrate, validators broadly correspond to the running the system. In , validators also manage other duties such as guaranteeing data availability and validating candidate .
An execution architecture that allows for the efficient, platform-neutral expression of deterministic, machine-executable logic. is easily compiled from the programming language and is used by Substrate-based chains to provide portable that can be included as part of the chain's .
Westend is a -maintained, Substrate-based that serves as the test network for .