4

So during my testing I found out that with just 1 node running, on an npos consensus, my chain grew from 110 Mb to 990 Mb within two days. Is this expected? Are there strategies for controlling the blockchain growth rate?

3
  • What you mean by growth rate? The rate of how the storage requirements are growing? Or the rate of how fast you produce blocks?
    – bkchr
    Commented Apr 8, 2022 at 10:12
  • @bkchr I mean the growth rate from the perspective of storage* (i will edit the question). Im thinking if the chain generates 900 MB of data in 2 days without any transactions, or just 1 validator, a back of the envelope calucalation suggests that within a year it will grow to around 180 GB. I don't know if that's a good size because apparently ethereum is a much larger network, running since 7 years now and is less than 1 TB today. Commented Apr 8, 2022 at 10:24
  • 1
    You are comparing here a Substrate archive node (validators are currently by default still archive nodes) vs an ethereum pruned node. Looking at the stats here: etherscan.io/chartsync/chainarchive You see that an ethereum archive nodes requires more than 10 TB today.
    – bkchr
    Commented Apr 8, 2022 at 10:39

1 Answer 1

2

To control the storage usage of a full node, you can try to:

  • Raise the base transaction fee to discourage dust transaction on your blockchain
  • Lower down the block weight so that less extrinsics can be included in each block
  • Lower down the block producing time (from 6s to something like 1min)
2
  • How can I influence the block weight? Commented Apr 13, 2022 at 6:49
  • There are some good explanation in the Substrate docs site: docs.substrate.io/v3/runtime/weights-and-fees. You should also check your runtime src/lib.rs file. There are constants to define the max weight for the block.
    – h4x3rotab
    Commented Apr 14, 2022 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.