Midnight Network Glossary
Block
A block is a collection of validated transactions grouped together and added to the blockchain in sequence. Each block contains a reference to the previous block, forming a chain. In Midnight, blocks are produced by active nodes and finalized through the network's finalization mechanism.
Block producer
A participant in the Midnight network whose role is to propose and add new blocks to the blockchain. Block producers are selected based on the consensus mechanism and are rewarded in coins for their participation. They are responsible for ordering transactions and ensuring the integrity of each block they produce.
Blinding factor
A random value used in cryptographic commitment schemes, such as Pedersen commitments, to hide the underlying data being committed to. The blinding factor ensures that two commitments to the same value produce different outputs, preventing observers from inferring the committed value by comparison. Without knowledge of the blinding factor, the committed value cannot be recovered.
Bech32m
An address encoding format used in blockchain networks for wallet addresses. It's an improved version of the original Bech32 format that provides better error detection when typing or copying addresses.
Coin
A coin is a digital asset that exists on a blockchain. It is a unit of account used as a store of value. Block producers are rewarded in coins, and coins are used to pay transaction fees. A coin is distinct from a token, which is any digital asset that means something to a decentralized application, including representing a real-world asset. That means all coins are tokens, but not all tokens are coins.
Compact
Compact is the domain-specific language, based on TypeScript, in which Midnight's smart contracts are expressed. While the language does allow contracts to be expressed concisely, the primary derivation of the name is from the noun form of the word compact, meaning an agreement, contract, or covenant among people or institutions.
Concurrency
Concurrency is the ability of many users to perform tasks simultaneously without blocking each other. This ensures increased throughput and makes transaction and smart contract processing more efficient.
Commitment
A cryptographic primitive that allows a party to commit to a chosen value while keeping it hidden. The commitment binds the value so it cannot change and hides the value from others. To verify the committed data, the user presents the original value and randomness, and the system checks that it matches the commitment. Midnight uses commitments to represent private state on the public ledger without exposing the underlying data.
Contract address
A unique identifier assigned to a smart contract when it is deployed to the Midnight network. The contract address is used by DApps and wallets to locate and interact with a specific deployed contract. It is derived from the contract's deployment transaction and remains fixed for the lifetime of the contract on-chain.
Contract deployment
The process of publishing a compiled Compact smart contract to the Midnight network, making it available for interaction. During deployment, the contract's initial ledger state is established and a contract address is assigned. Deployment requires a transaction to be submitted and confirmed on-chain and typically involves paying a fee in DUST.
Consensus mechanism
The consensus mechanism of a blockchain is the set of rules that govern the way that the participants in the network agree to add blocks to the chain. Each block must conform to the chain’s rules, and the blocks must be chained in the correct sequence, avoiding or resolving forks in the chain.
Cryptocurrency
A digital asset stored on a blockchain ledger that is intended to be used as a medium of exchange for goods or services. Blockchain protocols use cryptography to ensure the security and verification of ownership and fund movements. Unlike traditional currencies, a cryptocurrency is not controlled by a government. Its value is determined by the dynamics of market supply and demand.
Custom spend logic
A term used to indicate a potential feature of Midnight, where spending a coin involves executing attached logic so that certain invariants of token lifecycle can be enforced. An example use case may be requiring a known/ allowed source of tokens.
Custom token
Custom tokens are user-defined tokens designed to fulfill specific features and functionalities, like voting and governance. Custom tokens in Midnight are managed by the ledger alongside Midnight’s native tokens using the same mechanics.
DApp
A DApp, short for decentralized application, is a computer program that operates on a network without a single central server, typically a blockchain.
DApp developer
An individual or organization that creates and maintains DApps.
DApp operator
An individual or organization responsible for the management, operation, and support of a decentralized application. DApp operators often engage DApp developers, or are themselves DApp developers.
DApp connector
A software interface that allows a DApp running in a browser or application to communicate with a user's Web3 wallet. The DApp connector handles permission requests, transaction signing, and proof submissions on behalf of the user, without exposing the user's private keys to the DApp. In Midnight, the DApp connector also coordinates with the proof server to generate ZK proofs before a transaction is submitted.
Decentralized
A system or organization where there is no single authority in control. Instead, the system or organization is run by numerous decision makers with equal or comparable standing.
Devnet
Short for ‘development network’, a devnet is a blockchain that behaves like the Mainnet and is used for testing DApps that are in development. It uses test tokens with no value. Some governance parameters may be set differently from Mainnet for the convenience of developers. In Midnight, the process of DApp deployment proceeds from a devnet to one or more testnets, such as Preview and Preprod, before the DApp is released on the Mainnet. Midnight's devnet has been deprecated in favor of the current testnet.
Distributed
A blockchain is distributed because a copy of it is stored on many computers across the world.
Domain separator
A field used when a DApp asks a user to sign a message. It helps ensure that a message from one DApp cannot be used in a different DApp or on a different network.
DUST
A shielded, non-transferable, consumable network resource used exclusively to pay transaction fees on Midnight.
Faucet
A web service that distributes free test tokens to developers building on a testnet. On Midnight, the faucet provides tNIGHT, which generates tDUST for paying transaction fees during development. Faucet tokens have no real-world value and exist only for testing purposes.
Federated Node Operators (FNO)
A network of independent node operators that work together to maintain and secure the Midnight blockchain. These operators validate transactions, produce blocks, and ensure the network remains decentralized and reliable. Unlike a single centralized authority, FNOs distribute control across multiple trusted entities, enhancing security and reducing single points of failure.
Fungible token
Fungible tokens are identical to one another, have the same value, and are interchangeable.
Gadget
A gadget is a specialized entry point, specific to zero-knowledge cryptography, designed to bring ZK Snark circuit development within reach of a wide range of developers. Midnight cryptography (Midnight's cryptographic backend library) provides several gadgets, including a signing gadget, an encryption gadget, and a hashing gadget.
Halo 2
A high-performance ZK Snark implementation from the Electric Coin company.
Hard-fork
An event of changing the way transactions are being processed in a backwards-incompatible way (e.g. when introducing new features). It requires all nodes in the network to upgrade software to continue participation in the network.
Hash
In cryptography, a hash value, or hash for short, is the output of a mathematical operation called a hash function. A hash function takes a string of any length and produces a string of fixed length such that it is infeasible to derive the input value, there is a very low probability of two strings producing the same hash function, and even a small change to the input will always result in a different output.
HD wallet
Short for Hierarchical Deterministic wallet. A type of cryptocurrency wallet that can generate multiple addresses and private keys from a single master seed phrase, usually 12 or 24 words. This means you only need to back up one seed phrase to recover all your addresses and funds. Midnight uses HD wallets for deriving and managing the three different types of addresses used in the network: Unshielded, Shielded, and DUST.
Kachina
Kachina is a unified security model for data-protecting smart contracts that bridge the gap between a private state on the user’s local machine and a public state on the blockchain. It is based on the universally composable (UC) model. By relying on ZK Snarks, Kachina establishes a smart contract protocol that ensures data protection while operating within the UC security framework.
Ledger
The public record of contract state and token state on the blockchain. The ledger does not exist as a single document on the blockchain at any point. Instead, the current ledger, as of some block, can be synthesized by reading the blockchain up to that block.
In Compact, the ledger declaration specifies the contract's contributions to the global ledger.
Light client
A blockchain light client interacts with full nodes to find information about the blockchain, but only stores part of the ledger itself. By verifying headers and using Merkle proofs, light clients can ensure that the data they receive from full nodes is valid and accurate. Light clients require less processing power and storage capacity compared to full nodes, making them more suitable for devices with limited resources such as smartphones or IoT devices.
Mainnet
The fully developed and deployed blockchain where transactions are verified and recorded.
Merkle tree
A data structure used in cryptography and computer science to verify the integrity and consistency of large data sets. Named after its inventor Ralph Merkle, a Merkle tree is a binary tree where each leaf node represents a hash value of a specific data block.
MeshSDK
MeshSDK is an open-source library for Cardano that provides comprehensive tools and APIs for building decentralized applications. It offers TypeScript support, React hooks, wallet integration, and development utilities for Midnight Network DApps.
Multi-asset
Multi-asset refers to the capability of a blockchain platform or protocol to support and handle various types of digital assets or tokens simultaneously.
NIGHT
Midnight’s native utility token, transferable and persistent, used for governance, incentives, and as the source of DUST generation.
Non-fungible token (NFT)
Non-fungible tokens are unique and indivisible tokens recorded on a blockchain. They can represent ownership rights to tangible assets like real estate or artwork, or to intangible assets such as a rare magical sword in a Web3 game.
Nonce
A unique number that is used only once in cryptographic communications. In blockchain transactions, a nonce prevents replay attacks by ensuring each transaction is unique and can't be duplicated or reused maliciously. Think of it as a one-time serial number that protects your transactions from being copied and submitted again.
Node
A blockchain node is a computer or device that participates in a blockchain network. It plays a crucial role in maintaining the decentralized and distributed nature of blockchain technology. There are several types of nodes, and one node can be more than one type.
- An active node is one whose purpose is to mint blocks for the blockchain.
- A full node stores a copy of the entire blockchain, that is, all the transactions and data records ever executed within the network.
- A passive node is one that is receiving blocks and transactions from its peers (and in the future, will share these with its peers).
Nullifier
A unique value derived from a coin or private state element that is revealed on-chain when that element is consumed. Nullifiers allow the network to detect and reject double-spend attempts without revealing which specific coin or private value was spent. Once a nullifier appears on the ledger, the corresponding element can never be used again.
Oracle
An oracle is a service or mechanism that provides external data to smart contracts. It means smart contracts can interact with external information sources by using data from oracles to automate actions.
Pedersen commitments
A cryptographic technique introduced by Torben Pedersen in a 1992 conference paper that enables the commitment to a value without revealing the value itself. It involves combining the value with a random blinding factor using mathematical operations to create a commitment. The committed value remains hidden and computationally difficult to reverse-engineer without knowing the blinding factor. Pedersen commitments are homomorphically additive, allowing one to ‘add’ commitments to two values to get a commitment to the sum of the original values. This can be further stretched to sums of arbitrary-dimension vectors by committing each dimension with a different base.
Private oracle
The set of witness functions and the private state over which they operate constitute the private oracle for a contract.
Private state
The portion of a smart contract's state that is stored locally on a user's device and is never published to the blockchain. Private state is only accessible to the user who owns it and is used as input to witness functions when generating zero-knowledge proofs. It contrasts with ledger state, which is public and visible to all participants on the network.
Proof server
A local service that generates zero-knowledge proofs on behalf of a user's DApp. When a user initiates a transaction that involves private data, the DApp sends the relevant inputs to the proof server, which computes the ZK proof and returns it for inclusion in the transaction. The proof server runs on the user's own machine and requires a set of proving keys that are downloaded during initial setup. It does not have access to the user's private keys.
Proving key
A large piece of cryptographic data generated during the setup phase of a ZK Snark scheme. The proving key is used by the proof server to construct valid zero-knowledge proofs for a specific circuit. Each Compact contract function that involves private state has a corresponding proving key. Proving keys are typically distributed alongside compiled contracts and must be present on the user's machine before proofs can be generated.
Public state
The portion of a smart contract's state that is stored on the blockchain and is visible to all participants in the network. In Compact, public state is declared using the ledger keyword and forms the contract's contribution to the global ledger. Public state can be updated by submitting a valid transaction and is used to coordinate interactions between users without revealing private data.
Prover
An entity or party that aims to convince another party, known as the verifier, about the validity or truthfulness of a statement without revealing any sensitive or confidential information. The prover's role is to construct a proof that demonstrates knowledge of certain data or the ability to perform a specific computation, while maintaining confidentiality.
Midnight Indexer
It is a component that follows the Midnight chain to index events and data in a queryable database. Light clients can subscribe to this service to receive any relevant data such as token transactions associated with a given set of wallet addresses, or transactions related to a given smart contract.
Qualified coin
A coin registered in the ledger's commitment Merkle tree with a known index and so qualified to be spent in a transaction.
Runtime upgrade
An approach to evolve Substrate-based networks through storing code to process transactions on-chain (which is called runtime) and allowing to update that code with dedicated types of transactions. In some cases this approach allows to avoid executing hard-forks in a network.
Self-sovereign identity (SSI)
Self-sovereign identity is a lifetime portable identity for a person, organization or thing. It does not depend on any centralized authority and cannot be taken away. Individuals have the right to decide what personal information they share and with whom. They can selectively disclose only the necessary information for a specific transaction or interaction.
Selective disclosure
A privacy mechanism that allows a user to reveal only a specific subset of their personal data or attributes to a verifier, without exposing any unrelated information. In Midnight, selective disclosure is implemented using zero-knowledge proofs, enabling users to prove the validity of a claim, such as being above a certain age, without revealing the underlying data, such as their exact date of birth. Selective disclosure is a core building block of self-sovereign identity on Midnight.
Shielded
Shielded tokens allow for interactions to occur without metadata leakage. Wallet addresses and transaction details are not disclosed to counterparties or made available on a public ledger.
Smart contract
A program encoded on a blockchain that executes predefined actions when specific conditions are met. Smart contracts eliminate the need for intermediaries by enforcing the terms of the contract through computer code. Smart contracts enable transparent, secure, and tamper-resistant transactions because they are executed on a decentralized network with no single point of failure.
Snark
See ZK-Snark.
Soft-fork
An event of changing the way transactions are being processed in a backwards-compatible way (e.g. when adjusting some parameters). It requires active nodes in the network to upgrade software to continue participation in the network, but full and passive nodes do not require to be updated.
SPECK
The atomic unit of DUST: 1 DUST = 1015 SPECK.
STAR
The atomic unit of NIGHT: 1 NIGHT = 106 STAR.
State
State refers to the current data or information stored within a smart contract. It represents the values of variables, storage locations, and any other relevant information that is necessary for the contract’s execution and functioning.
Swap
The exchange or trading of one cryptocurrency or token for another directly on the blockchain, without the need for an intermediary. These swaps are often facilitated through specialized smart contracts or decentralized exchanges (DEXs).
Testnet
A testnet is an intermediate step between a devnet and the mainnet. Like a devnet, it is a blockchain with all the characteristics of the mainnet except that it uses test tokens with no real-world value. Some governance parameters may be set differently from the main chain for the convenience of developers. The process of DApp deployment normally proceeds from a devnet to one or more testnets, such as Preview and Preprod, before the DApp is released on the mainnet. Testnet parameters may be set closer to their production values than on a devnet.
tDUST
Test DUST tokens used on Midnight testnets like Preprod. The 't' prefix stands for 'test', indicating these tokens have no real-world value and are only for development and testing purposes. Like regular DUST, tDUST is used to pay transaction fees and is generated from tNIGHT holdings.
tNIGHT
Test NIGHT tokens used on Midnight testnets like Preprod. The 't' prefix stands for 'test', indicating these tokens have no real-world value and are only for development and testing purposes. tNIGHT can be freely obtained from a faucet and used to test DApp functionality that involves NIGHT tokens, including generating tDUST for transaction fees.
Token
A token is any digital asset that means something to a decentralized application, including acting as a store of value or representing a real-world asset.
Transaction
The transfer or exchange of digital assets or information on a blockchain network. A transaction involves records such as the sender, recipient, and the amount or type of assets being transferred, into a block within the blockchain. Transactions are verified, validated, and added to the blockchain through a consensus mechanism, ensuring their integrity and immutability.
Transaction balancing
If a wallet receives a transaction that is not balanced (that is - for a token type transaction the value of inputs does not equal the value of outputs), the wallet balances the transaction by providing necessary inputs and outputs so that it can be accepted by the ledger.
TypeScript
A programming language developed by Microsoft that adds features to JavaScript. It allows developers to catch errors during development and improves code quality. TypeScript code is turned into JavaScript for execution and is commonly used for web development, providing better tooling support and productivity, particularly for larger code bases and teams.
Unshielded
Referring to tokens or transactions where metadata such as wallet addresses and transfer amounts are visible on the public ledger. Unshielded interactions do not benefit from the privacy protections provided by ZK proofs and are equivalent to standard transparent blockchain transactions. In Midnight, unshielded and shielded assets can coexist and interact within the same application.
Universally Composable (UC) security framework
A theoretical framework described by Ran Canetti in a 2020 paper. It is used to analyze and prove the security of cryptographic protocols in a composable manner. In the UC framework, protocols are treated as building blocks that can be composed together to form more complex protocols. The framework allows for the analysis of the security properties of a protocol when it is used as a component in a larger system.
Verifier
An entity or party that aims to verify the validity or truthfulness of a statement presented by another party, known as the prover, without requiring full knowledge of the underlying data or computation. The verifier's role is to examine the proof provided by the prover and determine its correctness based on the agreed-upon rules and cryptographic protocols.
Verification key
A compact cryptographic artifact derived from the same setup process as the proving key. The verification key is used by the network or a verifier to confirm that a submitted ZK proof is valid for a given circuit, without re-executing the computation or learning anything about the private inputs. Verification keys are small and fast to evaluate, making on-chain verification efficient.
Wallet
A digital tool or software that allows users to view, send, and receive digital assets securely. These wallets store private keys and public addresses, enabling users to manage their digital assets on a blockchain network.
Web3
Web3 is a decentralized version of the WorldWide Web built on blockchain technology and cryptographic principles. It provides a trustless, and more user-centric online experience. It aims to transform the way information, value, and digital assets are shared, accessed, and interacted with.
Web3 wallet
A Web3 wallet extends a digital asset wallet by enabling connection to DApps, and allowing the management of assets other than cryptocurrency, such as NFTs.
Witness
In mathematical logic, a witness is a value that satisfies an assertion. For example, a witness for 'there exists an integer greater than 0' is the number 5. For the zero-knowledge proofs in Midnight, a witness is a function that satisfies a different kind of assertion: there exists a function with a specified type signature. The circuits defined in Compact can call such witness functions, but the definitions of the witnesses are outside Compact, and their effects on private state are not recorded in the public ledger.
Zero-knowledge proof (ZKP)
A zero-knowledge proof allows someone to prove they know a secret without revealing the secret. For example, a ZKP can prove that an attribute has a value within a range without revealing its exact value. A potential client of a DApp or service can use ZKP to selectively disclose information from their self-sovereign identity without disclosing other information.
Zero-knowledge (ZK) circuit
Arithmetic circuits are short programs, consisting of a fixed number of multiplications and additions in a modular prime field. A zero-knowledge circuit is a special case that demonstrates the existence of a solution to an arithmetic circuit without revealing the input values or intermediate steps.
ZKIR
Zero-Knowledge Intermediate Representation. A low-level format that Compact smart contracts are compiled into before being converted to zero-knowledge circuits. ZKIR makes it possible to translate readable contract logic into the mathematical format needed for zero-knowledge cryptography.
ZK Snarks
A zero-knowledge succinct non-interactive argument of knowledge (ZK Snark) is a specific type of zero-knowledge proof. They are particularly efficient and powerful for two reasons. First, ZK Snarks are succinct, meaning that the proof size remains constant, regardless of the complexity or size of the statement being proved. This property is highly desirable because it provides efficient verification and reduces the amount of data that needs to be transmitted. Second, ZK Snarks are non-interactive, meaning that the prover can generate a proof without requiring any additional interaction with the verifier. This makes them more efficient than other types of ZK proofs, which typically involve multiple rounds of communication.
Zswap
Midnight uses Zswap – a transaction scheme that combines the strengths of Zcash and SwapCT – to create a straightforward transaction protocol based on ZK Snarks. Zswap enables the merging of transactions while preserving the confidentiality of data. It addresses the limitations of privacy-oriented cryptocurrencies by providing a mechanism for supporting multiple asset types and facilitating atomic swaps, thereby offering a scalable and secure solution for DeFi applications.