Chain is a data structure designed to record events occurring in a distributed system.
The Cellframe Network uses three types of chains:
The main idea is to make the abstraction level for common usage of DAG, Blockchain and No-Consensus modes. In the code its presented by pseudo object dap_chain_t
that holds all the abstractions.
Chain consists of atomic chain elements - chain atoms. Atom is only abstraction: it can be a block, an event or even just a database record for no-consensus storage. An atom can contain one or more datums - custom data that is stored in a chain. It can be a transaction, a certificate, a smart contract, a token declaration, a token emission or any another custom data.
Chain itself can be divided into cells (be sharded) or not. So it can be a single set of consistent data or a number of sets.
Keep in mind: the cell is not part of the chain. It's part of the network. The chain may or may not be associated with the cell. For CellFrame Network and CellFrame Chain a cell is just a kind of ID that is used for split the network into independent segments that have their own datasets - chains, whitelists, mempools, etc.
For such a chain structure, each atom is a block with a set of datums inside and usually only one hash link to the previous block. The first generation of blockchains uses PoW consensus, however, PoS consensus and others can be used with this type of chain.
More details here.
A DAG (Directed Acyclic Graph) chain is a more advanced version of a chain. A DAG consists of events, each event contains only one datum and usualy few more hash links to another events. Events are added in sets, forming connected graphs, each such set is called "round". While forming the round is in GDB, not in chains and may have different formation rules (Hashgraph, PoT).
More details here.
A chain can only be a wrapper around the GDB storage, with no guarantee of consistentcy and no consensus at all. This is the fastest way to store the ledger, it is designed to storing private ledgers where there is no need to protect the system from spam data but it is necessary to ensure maximum performance.
More details here.