400 likes | 429 Views
Proof-of-Consistency (PoCo). An approach to high performance blockchains. Background.
E N D
Proof-of-Consistency (PoCo) An approach to high performance blockchains
Background • So far, human brain contains the most advanced consensus model which is drastically DECENTRALIZED by its parallel processing units (Neuron Cells) that SHARE their jobs (not put them in race) including huge storage space and multi routes among nodes with the least rate of power-consumption..
Entities of Ecosystem Transaction End User Mining Pool Miner Mining Club Node HolderNode
Proof-of-Work (PoW) • Users submit raw tansactions to a node. • Nodes sync transactions in mempool. • Solo/Pool miners collect transactions with higher amount of fees into a candidate block, then try to solve the difficulty. • Who solves the difficulty faster, will benefit the block reward and transaction fees.
Proof-of-Work (PoW) mempool
When fork happens in PoW • Process power is the foundation of PoW • The proof in PoW is based on race. • The longest chain is the valid one. • This simplicity causes huge amount of power consumption to achieve consensus. • The 51% attack and selfish mining could threaten the entities involve in PoW.
When fork happens in PoW Block 34577 Block 34578 Block 34579 Block 34576 Block 34577 Block 34577 Orphan Block Winner Block
Blockchain in PoW Block 34576 Block 34577 Block 34578 Merkle-Tree Merkle-Tree Merkle-Tree Record -1 Record -2 Record -3 Record -4 Record -1 Record -2 Record -3 Record -4 Record -1 Record -2 Record -3 Record -4
Proof-of-Consistency (PoCo) • Users submit raw transactions to a miner. • Miners submit pre-mined txs to masternode • Then a masternode becomes a Holder Node • h-node express they have txs in RingPool • h-nodes begin sharing of txs along a Ring • Each h-node that receives all expressed txs, begins to broadcast it to the network. • Holder Nodes (h-nodes) benefit from block rewards, but miners benefit from transfer fee.
Proof-of-Consistency (PoCo) RingPool HolderNode Get in Ring
When fork happens in PoCo • Quantization is the foundation of PoCo. • The proof in PoCo is based on accounting. • The chain with more tx is the valid one. • The built-in pool in PoCo consumes huge amount of disk space and bandwidth. • An attacker could fill a block with his own txs and postpone the legitimate txs.
When RingFork happens in PoCo The Ring 1 3 Block 34576 Block 34577 2 2+1+3 3 2+5 Orphan Block Winner Block
Ring Mechanism • HolderNodes connect like a ring. Their position in ring identifies by their address • HolderNodes sync their local txs. • Miners see all candidate blocks. • Miners submit their vote on winner block. • Wrong voting destroys benefits of the fee
Ring Mechanism RingPool Winner Block Accounting Pool
Cluster Mechanism • Some amount of blocks create a cluster. • Master Nodes vote on miner’s income of a cluster and reward of other master nodes. • Minority will lose the benefits of reward • Master nodes can’t reject the miners vote. They only can reject conflict with protocol. • Txs get back to RingPool when a cluster rejects. Miners do not need to do anything
Cluster Mechanism # 51 - Winner # 50 - Winner Accounting Pool # 49 - Winner # 48 - Winner # 47 - Winner # 46 - Winner Approved Cluster # 45 - Winner Immature Cluster
Flash-Back-Pinning in PoCo • To reach the maximum consistency, PoCo needs users to provide some info about previous known clusters, before signing a transaction. • This happens by adding 2 new field in transaction structure: “flash_back_block” and “flash_back_hash”
Flash-Back-Pinning in PoCo 576 577 578 579 580 581 582 583 575 576 577 578 579 580 581 582 583
How fork happens in PoCo • Because of flash-back-pinning in raw body of txs, attacker can’t use txs of RingPool for fabricated blocks/clusters. • Attackers also need some master nodes in their control to fabricate a RingPool. • This makes attack of 51% much harder, because the attacker still needs to have enough valid coins to perform an attack.
How fork happens in PoCo 79 80 76 77 78 79 80 81 Orphan Blocks Winner Blocks
When Fork happens in PoCo • The attack of 51% may be very simple and cheap in low traffic times. • Depend on protocol, master nodes aim at preventing such attacks should renew their deposit transaction in a cluster. • A cluster with the majority of renewing deposit transactions is the valid one. • This is why master nodes receive rewards.
When Fork happens in PoCo # 51 - Winner # 51 - Winner # 50 - Winner # 50 - Winner # 49 - Winner # 49 - Winner # 48 - Winner # 48 - Winner # 47 - Winner # 47 - Winner # 46 - Winner # 46 - Winner Orphan Cluster # 45 - Winner # 45 - Winner Approved Cluster Immature Cluster # 44 - Winner
Shahin Go-Round • Shahin Go-Round is a data structure. • Including Merkle-Tree, two extra hash roots adds to the block content. • Linear hashing of left-to-right and right-to-left will generate two extra hash roots. • In some circumstances, validating among linear hashing is more rapid than logarithmic trees.
Blockchain in PoCo Block 34576 Block 34577 Block 34578 Shahin Go-Round Ring Shahin Go-Round Ring Shahin Go-Round Ring Record -1 Record -2 Record -3 Record -4 Record -1 Record -2 Record -3 Record -4 Record -1 Record -2 Record -3 Record -4
The RingChain • In fact, with RingPool and Shahin Go-Round as new data structure for block content, we could say, after this we have a ring-chain instead of block-chain • Rings (with sorted data) show great performance in solving “Symmetric Differences” and “indexing/clustering” that is crucial in all syncing and validation processes among nodes.
The RingChain Session Ring Record .. Record -9 Record .. Record .. Record -9 Record -8 Record .. Record -8 Record .. Record -7 Record .. Record -7 488 Record .. 487 Record -6 Record .. Record -6 Record .. Record -5 Record .. Record -5 Record -1 Record -4 Record -2 Record -3 Record -1 Record -4 Record -2 Record -3 Shahin Go-Round
Rewards and Fees in PoCo • Master Nodes and Miners always receive 70% of their incomes in fix amounts. For next 30% they should compare the hash value that comes out from their processing session with the final result. • The exact amount of their income should submit with their claims to accounting pool • This 30% generates noise in the network
Rewards and Fees in PoCo Network Fee Rewards Oxidation Fee Network Fee Transaction Fee
Oxidation Fee • These sort of fees apply on unspent txs with more than 1 year old in the blockchain • Technology: shorten the active part of blockchain provides us a rapid ledger • Economy: if everyone put money into a bank, the economy would grind to a halt • Business model: economists accuse cryptos being like ponzi /pyramid schemes
Oxidation Fee Archived chain of transactions 576 577 578 579 580 581 582 583 584 Oxidized unspent transaction Active chain of transactions
PoCo the Quantizer • In mathematics, Quantization is the process of mapping input values from a large set to output values in a (countable) smaller set, often with a finite number of elements. • Quantization also forms the core of essentially all lossy compression algorithms.
Quantization causes distortion • The difference between an input value and its quantized value (such as round-off or truncation error) is referred to as quantization error. • With rate-distortion theory, the source (the minimal input signal R) can be approximately reconstructed at the receiver (output signal) without exceeding a given distortion D.
Applying dither to distortion • Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns • Dither should be added to any low-amplitude or highly periodic signal before any quantization process, in order to prevent non-linear behavior (distortion) • the lesser the bit depth, the greater the dither must be.
Weaknesses in PoCo #1 • Problem: Because of pre-mining policy in PoCo, miners work separately on transactions. So a malicious user could submit same raw transaction to different miners and waste their resources. • Solution: a KYC Pool that shares early information of submitted txs from unknown users could prevent such redundancy.
Weaknesses in PoCo #1 RingPool KYC Pool Holder Node Malicious User
Azim Blockchian Project Shahin Nourslahei / private blue skies researcher • Homepage: www.mixoftix.net • Email: mixoftix@gmail.com • Twitter: https://twitter.com/shn_noursalehi • Telegram: https://t.me/mixoftix Sponsored by: Iran Kish Credit Card Company • Homepage: www.IranKish.com