Bitcoin’s dynamic consensus upgrade implemented in PHC
PRESS RELEASE: July 27, 2019 — Profit Hunters Coin
An in-depth look into the “consensus” source code found in the most recent version of Bitcoin reveals limited dynamic consensus among peers.
As previously discussed this in the article: The Difference Between General And Specific Consensus In Bitcoin (BTC) In summary, nodes lack secondary checks to verify their current chain validity without the use of Dynamic Checkpoints and Chain Buddy classes with assistance from Block Shield in cooperation with Chain Shield.
Dynamic Checkpoints
Dynamic Checkpoints have been implemented into PHC as a foundation for the new peer to peer consensus upgrade. Static checkpoints used in the past are only effective after a scheduled hard fork to ensure network integrity.
During attack attempts or normal chain splits (shallow chain re-organizations), nodes sometimes get stuck on the wrong chain. This simple, yet required validation source code was never developed into Bitcoin in the past.
Nodes running version PHC 1.0.0.7 on the Test-net will automatically send their nBestHeight and nBestChainHash to all active & connected peers in one minute intervals. This soft-fork upgrade is also scheduled at a undefined future time on the Main-net.
These most recently received checkpoint from nodes automatically gets recorded into the altered CNode class and can be queried with CNodeStateStats class within the source code.
Chain Buddy
Nodes stats are collected on an interval of every 5 blocks in a ConsensusCheckpointMap containing Node IP, Timestamp, Hash, Height information in a sequential list, with a maximum amount of entries of 50.
The ConsensusCheckpointMap is evaluated using the ChainBuddy::FindConsensus() function and queried using ChainBuddy::WalletHasConsensus() function to return a TRUE or FALSE value.
Further protection can be used in conjunction with Chain Shield to halt local block creation until the network nodes have reached a majority consensus.
Chain Shield
ChainShield::Protect() is called to evaluate network consensus versus the local wallet blockchain state. If any discrepancies are found while Chain Buddy halts any further chain splitting; The local wallet will “roll back” their blockchain 5 blocks and re-sync to the network to receive the most valid chain split/fork from the majority of peers connected.
This can also be useful during a double-spend attack, as live-monitoring can detect non-consensus among the peers automatically and rejoin the proper chain without massive disruption or loss of funds.
Dynamic Coin Distribution
DynamicCoinDistribution::ASIC_Choker() function uses the external Block Shield function to prevent time-warp mining, block time-spans with massive discrepancies from the expected target time, or malicious timestamp attacks.
All new blocks accepted from nodes are collected within a new class called PeerBlockIndex with essential information about the node and new block (Height, Timestamp, Node IP Address, PoW/PoS).
This is later evaluated using DynamicCoinDistribution::Adjust(int nHeight) function that will ensure all accepted blocks follow strict decentralized rules. If a small amount of mining nodes are on the network the Adjust function will ensure the same amount of Proof of Work vs. Proof of Stake blocks in 100 are a fixed percentage as well as each node are only allowed to receive a fixed percentage compared to all other nodes.
This will ensure CPU mining stays profitable on the PHC network, during the entire block-chain’s lifetime.
Take a look at the source code here:
https://github.com/profithunterscoin/phc/blob/1.0.0.7-dev/src/consensus.cpp
Published at Sun, 28 Jul 2019 00:59:48 +0000
Bitcoin Pic Of The Moment
Like it? Would send me some bitcoin as a tip?
1H76GsGpfkyg2PtwnsZnTYgED3NinWgsG6
Or QR code here: www.flickr.com/photos/sightrays/8672657341/
By Electric-Eye on 2008-04-18 07:42:08
