Difference between revisions of "Chain"

From wiki.cellframe.net
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Cellframe Chains =
+
General idea is to make abstraction level for common usage of [[chain_dag|DAG]], [[chain_blocks|Blockchain]] and [[chain_gdb|No-Chain]] mode.
 
 
General idea is to make abstraction level for common usage of DAG, Blockchain and No-Chain mode.
 
 
In the code its present pseudo object *dap_chain_t* that holds all the abstractions.
 
In the code its present pseudo object *dap_chain_t* that holds all the abstractions.
  
 
== Chain structure: atoms, organization ==
 
== Chain structure: atoms, organization ==
 
 
Chain consists from atomic chain elements - chain ''atoms''. ''Atom'' is only abstraction: it could be [[chain_block|block]], [[chain_event|event]] or just id for database record for no-chain storage.
 
Chain consists from atomic chain elements - chain ''atoms''. ''Atom'' is only abstraction: it could be [[chain_block|block]], [[chain_event|event]] or just id for database record for no-chain storage.
 
An atom could hold inside one or more [[datum| datums ]] - custom data that stores in chain. It could be [[tx|transaction]], [[chain_ca|certificate]], [[smart_contract|smart contract]], [[token_decl| token declaration]], [[token_emission| token emission]] or any another custom data.
 
An atom could hold inside one or more [[datum| datums ]] - custom data that stores in chain. It could be [[tx|transaction]], [[chain_ca|certificate]], [[smart_contract|smart contract]], [[token_decl| token declaration]], [[token_emission| token emission]] or any another custom data.
  
== Cells, Network, Chains ==
+
== Celled, non-celled chains ==
Chain itself could be [[Cellframe_cell|celled]] (sharded) or non-celled. So it could be single set of consistent data or lot of them.
+
Chain itself could be [[cell|celled]] (sharded) or non-celled. So it could be single set of consistent data or lot of them.
Keep in mind: cell is not part of the Chain. Its part of the [[chain_network|network]]. Chain could be or not to be associated with cell. For [[chain_network|CellFrame Network]] and [[chain|CellFrame Chain]] the cell its just kind of id thats used for breaking down the network on independent segemnts thats has its own datasets - chains, [[gdb | whitelist (GDB - GlobalDB) ], [[mempool| mempools ]]
+
Keep in mind: [[cell|cell]] is not a part of [[chain|chain]]. Its part of the [[chain_network|network]]. [[chain|Chain]] could be or not to be associated with [[cell|cell]]. For [[chain_network|CellFrame Network]] and [[chain|CellFrame Chain]] the [[cell|cell]] its just kind of id thats used for breaking down the [[chain_network|network]] on independent segemnts thats has its own datasets - [[chain|chains]], [[gdb| whitelist (GDB - GlobalDB) ]], [[mempool| mempools ]] and etc
 +
 
 +
== Blockchain ==
 +
One of the variant of realization for chain. If its blockchain, every atom is [[chain_block|block]] with lot of [[datum|datums]] inside and usualy only one [[hash_link|hash link]] to the previous block. Usualy its prefered for [[chain_cs_pow |PoW consensus]] chains but possible to use it for [[chain_cs_pos|PoS]] or anything else.
 +
More details [[chain_blocks|here]]
 +
 
 +
== DAG ==
 +
[[chain_dag|Directed acyclic graph]] is most used chain variant. DAG consists from [[chain_event|events]], every event nests only one datum and usualy few more [[hash_link|hash links]] to another events.  Events are adding by sets, forming connected graphs and called [[chan_dag_round|"round"]]. Round while forming is in [[gdb|GDB]], not in chains and could have different rules for the forming (Hashgraph, PoT).
 +
More details [[chain_dag|here]]
 +
 
 +
== No-Chain (GDB mode) ==
 +
Chain could be only wrap for [[gdb|GDB storage]], without consistent guarantee and ever without consensus at all. Its the fastest way to store [[chain_ledger|ledger]] and designed for private ledgers store where there is no needs to protect the system from spam data but there is needing to provide top performance.
 +
More details [[chain_gdb|here]]

Latest revision as of 13:57, 29 September 2019

General idea is to make abstraction level for common usage of DAG, Blockchain and No-Chain mode. In the code its present pseudo object *dap_chain_t* that holds all the abstractions.

Chain structure: atoms, organization

Chain consists from atomic chain elements - chain atoms. Atom is only abstraction: it could be block, event or just id for database record for no-chain storage. An atom could hold inside one or more datums - custom data that stores in chain. It could be transaction, certificate, smart contract, token declaration, token emission or any another custom data.

Celled, non-celled chains

Chain itself could be celled (sharded) or non-celled. So it could be single set of consistent data or lot of them. Keep in mind: cell is not a part of chain. Its part of the network. Chain could be or not to be associated with cell. For CellFrame Network and CellFrame Chain the cell its just kind of id thats used for breaking down the network on independent segemnts thats has its own datasets - chains, whitelist (GDB - GlobalDB) , mempools and etc

Blockchain

One of the variant of realization for chain. If its blockchain, every atom is block with lot of datums inside and usualy only one hash link to the previous block. Usualy its prefered for PoW consensus chains but possible to use it for PoS or anything else. More details here

DAG

Directed acyclic graph is most used chain variant. DAG consists from events, every event nests only one datum and usualy few more hash links to another events. Events are adding by sets, forming connected graphs and called "round". Round while forming is in GDB, not in chains and could have different rules for the forming (Hashgraph, PoT). More details here

No-Chain (GDB mode)

Chain could be only wrap for GDB storage, without consistent guarantee and ever without consensus at all. Its the fastest way to store ledger and designed for private ledgers store where there is no needs to protect the system from spam data but there is needing to provide top performance. More details here