Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm

Blocks and transactions are produced and confirmed respectively in blockchains by participating nodes through a consensus algorithm, one of which is Proof­ofWork (PoW). The principle of PoW is to compute a complex mathematical problem, and the complexity of this computation, is governed by the diffi...

Full description

Saved in:
Bibliographic Details
Main Author: Chin, Zi Hau
Format: Thesis
Published: 2021
Subjects:
Tags: Add Tag
No Tags, Be the first to tag this record!
id my-mmu-ep.11357
record_format uketd_dc
spelling my-mmu-ep.113572023-04-18T06:12:49Z Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm 2021-01 Chin, Zi Hau QA76.75-76.765 Computer software Blocks and transactions are produced and confirmed respectively in blockchains by participating nodes through a consensus algorithm, one of which is Proof­ofWork (PoW). The principle of PoW is to compute a complex mathematical problem, and the complexity of this computation, is governed by the difficulty, adjusted on a periodic basis to control the rate of new block creation. This is determined by the network hash rate, and if the hash rate grows or declines exponentially, the block creation interval cannot be maintained. Genetic algorithm (GA) is proposed as an additional mechanism to the existing difficulty adjustment algorithm as a response to suppress the slow difficulty adjustment reaction due to fluctuation of hash rate caused by miners leaving or entering the network such as an attack or sudden events, by optimizing the blockchain parameters. This research aims to achieve a more dynamic difficulty adjustment mechanism that is able to meet the network objectives. Reparameterization of blockchain was performed on forks of actual Bitcoin blockchain network with virtual machines. Mining was also performed in order to measure the effects of reparameterization. Study was performed using SimBlock, a blockchain network simulator as a base. Difficulty adjustment algorithm and the capacity to increase or decrease hash rate dynamically were then added to the simulator and the efficacy of the implementation was investigated. With new implementations, SimBlock is able to more accurately simulate an actual Bitcoin blockchain network in terms of obtained block time than before especially in the case of fluctuating hash rate. Furthermore, SimBlock is now capable of reproducing the occurrence of fluctuating hash rate in an actual blockchain network. Non­dominated sorting genetic algorithm II (NSGA­II) is then implemented into SimBlock and simulation of different scenarios (default without GA, fixed block interval with GA, fixed difficulty adjustment interval with GA & variable block and difficulty adjustment intervals with GA) were carried out. All the scenarios with GA were able to respond more quickly to sudden increase or decrease in hash rate. This can be proven by the result of obtaining lower standard deviation of average block time and difficulty as compared to the default blockchain network without GA. Based on observation, if the block interval decreases, the stale block rate will increases accordingly as a low block interval raises the likelihood of several miners mining a valid block at the simultaneously. Moreover, an increasing stale block rate would result in a higher median block propagation time as more bandwidth was required to propagate stale blocks. Thus by finding a middle ground, the scenario of fixed difficulty adjustment interval with GA achieved the best overall performance with the lowest standard deviation of average block time and difficulty in addition to moderate median block propagation time and stale block rate. 2021-01 Thesis http://shdl.mmu.edu.my/11357/ http://erep.mmu.edu.my/ masters Multimedia University Faculty of Computing and Informatics (FCI) EREP ID: 10282
institution Multimedia University
collection MMU Institutional Repository
topic QA76.75-76.765 Computer software
spellingShingle QA76.75-76.765 Computer software
Chin, Zi Hau
Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm
description Blocks and transactions are produced and confirmed respectively in blockchains by participating nodes through a consensus algorithm, one of which is Proof­ofWork (PoW). The principle of PoW is to compute a complex mathematical problem, and the complexity of this computation, is governed by the difficulty, adjusted on a periodic basis to control the rate of new block creation. This is determined by the network hash rate, and if the hash rate grows or declines exponentially, the block creation interval cannot be maintained. Genetic algorithm (GA) is proposed as an additional mechanism to the existing difficulty adjustment algorithm as a response to suppress the slow difficulty adjustment reaction due to fluctuation of hash rate caused by miners leaving or entering the network such as an attack or sudden events, by optimizing the blockchain parameters. This research aims to achieve a more dynamic difficulty adjustment mechanism that is able to meet the network objectives. Reparameterization of blockchain was performed on forks of actual Bitcoin blockchain network with virtual machines. Mining was also performed in order to measure the effects of reparameterization. Study was performed using SimBlock, a blockchain network simulator as a base. Difficulty adjustment algorithm and the capacity to increase or decrease hash rate dynamically were then added to the simulator and the efficacy of the implementation was investigated. With new implementations, SimBlock is able to more accurately simulate an actual Bitcoin blockchain network in terms of obtained block time than before especially in the case of fluctuating hash rate. Furthermore, SimBlock is now capable of reproducing the occurrence of fluctuating hash rate in an actual blockchain network. Non­dominated sorting genetic algorithm II (NSGA­II) is then implemented into SimBlock and simulation of different scenarios (default without GA, fixed block interval with GA, fixed difficulty adjustment interval with GA & variable block and difficulty adjustment intervals with GA) were carried out. All the scenarios with GA were able to respond more quickly to sudden increase or decrease in hash rate. This can be proven by the result of obtaining lower standard deviation of average block time and difficulty as compared to the default blockchain network without GA. Based on observation, if the block interval decreases, the stale block rate will increases accordingly as a low block interval raises the likelihood of several miners mining a valid block at the simultaneously. Moreover, an increasing stale block rate would result in a higher median block propagation time as more bandwidth was required to propagate stale blocks. Thus by finding a middle ground, the scenario of fixed difficulty adjustment interval with GA achieved the best overall performance with the lowest standard deviation of average block time and difficulty in addition to moderate median block propagation time and stale block rate.
format Thesis
qualification_level Master's degree
author Chin, Zi Hau
author_facet Chin, Zi Hau
author_sort Chin, Zi Hau
title Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm
title_short Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm
title_full Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm
title_fullStr Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm
title_full_unstemmed Improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm
title_sort improved difficulty adjustment for proof-of-work based blockchains with genetic algorithm
granting_institution Multimedia University
granting_department Faculty of Computing and Informatics (FCI)
publishDate 2021
_version_ 1776101399812112384