While browsing various Blockchain implementations online, I came across different examples. But the question remains: are these truly scalable Blockchain systems? You can see in this code snippet that a blockchain is initiated as an array:
var blockchain = [getGenesisBlock()];
Similarly, here we have another instance of the same setup:
constructor() {
this.chain = [this.createGenesis()];
}
This article also suggests a similar approach:
constructor(genesisNode) {
this.chain = [this.createGenesisBlock()];
The concern lies in whether any of these implementations are truly equipped to handle scalability.
According to maerics,
The maximum length of an array according to the ECMA-262 5th Edition specification is bound by an unsigned 32-bit integer due to the ToUint32 abstract operation, so the longest possible array could have 232-1 = 4,294,967,295 = 4.29 billion elements.
In terms of size, Ethereum has utilized 'only' 7 million blocks, while Bitcoin has 'only' 500k. So there seems to be sufficient capacity for future growth. The real concern arises when considering the time it would take to read the last element of the array and its scalability implications. Since reading the hash of the last block is essential in a blockchain structure, as it scales up, the time required for this task may increase significantly.
In case a Blockchain array of Blocks reaches its storage limit, what measures would Bitcoin and/or Ethereum take? Would the Blockchain simply come to an end?