LISTEN TO THE PODCAST:
The process of building a Decred block is actually pretty interesting and is the area that gives the project its security and efficiency.
It’s important to note that Decred’s block construction is based on a hybrid mechanism of proof of work and proof of stake. A lot of the earlier blockchains rely on one mechanism or the other, but Decred takes advantage of the best bits of both of these mechanisms.
For example, Proof of stake is used for its coin holder voting and verification properties and proof of work is used for its block production properties. Both of which combine to amplify the security and cost of attacking the platform.
Decred aims to have a block interval of 5 minutes with a maximum block size of 393.216 KB, which is approximately 0.39 MB. Currently, Decred processes on average about 5000 transactions each day. This amount has very gradually increased since 2020. In its current configuration, the platform can process 10 times this number of transactions without having full blocks or needing to dynamically scale its block size. As a final note, due to these factors, Decred has one of the most lightweight blockchains in the space. After continuously running for over 7 years, the blockchain is approximately 11.5 GB in size, and is currently growing at just over 1 GB per year. When you compare this with other blockchains, you can see how much more efficient Decred is and how much easier it would be to run a fully validating node.
Ethereum = 844 GB
Bitcoin = 530 GB
ZCash = 260 GB
Litecoin = 128 GB
Dash = 31 GB
Decred = 11 GB
Note: Decred can scale its block size with a consensus vote if blocks become continuously full.
Constructing a block
Step 1: Transactions enter into the mempool. Each fully validating node operates its own mempool and synchronises with other known peers to organise and validate each transaction, ready to enter into a block. Identifying, synchronising and ordering transactions over a peer to peer network can take a little. Generally speaking, this is one of the reasons it’s a good idea to have block production intervals greater than a few minutes.
As a side note, people that use a peer to peer network with a fully validating node can transmit transactions instantly, as they are also part of the validating process. This avoids the need to wait for a third party to do this on their behalf. Using a fully validating node makes transacting with the network permissionless and a lot safer.
Step 2: Once the proof of work miner finds a new block, they use the transaction from the mempool to populate it.
Step 3: This block then gets validated by the proof of stake mechanism. For example, up to five tickets are called randomly to vote on the validity of each block. If all the rules are followed and the block is considered valid, it gets entered into the blockchain and the miner gets rewarded for their work.
If the block is considered as invalid, it gets rejected, and never enters the blockchain. The process for finding the next block is then repeated.
Due to the proof of stake validation process, Decred protects itself from a whole host of issues and problematic mining behaviour, including:
- Disincentivising miners to mine empty blocks
- Mitigating against secret mining and large reorgs of the blockchain
- Making the Decred blockchain resistant to contentious hard forks
- and finally, making the chain extremely secure against 51% attacks or double spend attacks
There are numerous advantages to Decred’s hybrid block production mechanism. But ultimately, it makes the protocol extremely secure, ridiculously resilient, hyperefficient and has the flexibility to adapt to seen and unforeseen challenges.
Have your say: Which block production mechanism do you prefer?