A cryptocurrency mining method implemented in a cryptocurrency miner, the miner comprising processing hardware executing computer-usable programs, the miner being connected to a plurality of other miners by a cryptocurrency network, the method comprising:
- (a) storing a copy of a cryptocurrency main blockchain, the main blockchain containing a plurality of blocks linked to one another forming a chain, each block containing cryptocurrency transaction data and a hash of its immediate previous block;
- (b) storing a copy of a miners' blockchain, the miners' blockchain containing a plurality of FeedBlocks linked to one another forming a chain, the miners' blockchain being separate from the main blockchain, each FeedBlock of the miners' blockchain containing a timestamp, a hash of an immediate previous FeedBlock on the miners' blockchain, an address of a last-checked-for-fork block on the main blockchain which is a latest block on the main blockchain at a time the FeedBlock was created, a reduced mining difficulty index, a malicious-fork-detected flag which is a true/false flag that indicates whether a malicious fork has been detected, and a hash of the FeedBlock which is a hash of all contents of the FeedBlock except the timestamp;
- (c) performing mining operation using the reduced mining difficulty index to add blocks to the main blockchain;
- (d) after adding a predefined number of blocks to the main blockchain, performing a malicious fork detection process which includes:
- (d1) obtaining the address of the last-checked-for-fork block on the main blockchain from the last FeedBlock;
- (d2) detecting any malicious fork in the main blockchain that forks at or after the last-checked-for-fork block, a malicious fork being a forked branch of the main blockchain where all blocks in the branch were generated by a same miner;
- and
- (d3) adding a new FeedBlock to the miners' blockchain, the new FeedBlock containing a timestamp, a hash of an immediate previous FeedBlock on the miners' blockchain, an address of a last-checked-for-fork block on the main blockchain which is a latest block on the main blockchain at a time the new FeedBlock is created, the reduced mining difficulty index, a malicious-fork-detected flag which is a true/false flag that indicates whether a malicious fork has been detected in step (d2), and a hash of the new FeedBlock which is a hash of all contents of the new FeedBlock except the timestamp;
- (e) in response to no malicious fork being detected in the malicious fork detection process in step (d), repeating steps (c) and (d);
- and
- (f) in response to a malicious fork being detected in the malicious fork detection process in step (d):
- (f1) severing the malicious fork from the main blockchain;
- (f2) thereafter, for a predefined time period, performing mining operation using a default mining difficulty index to add blocks to the main blockchain, without performing the malicious fork detection process, the default mining difficulty index being more difficult than the reduced mining difficulty index;
- and
- (f3) after the predefined time period, repeating steps (c) and (d).