Open ncying opened 6 years ago
why is each block so big? how many transactions does each block contain?
the state size seems more reasonable.
shenzhen team use SanMateo to test their wallet, maybe some transfer transactions. but < 2 transactions per block (1 minting tx)
then I don't understand why the block size is 10KB.
update: Test Net : Worcester (34.224.6.187) Block number: 69267 blockchain.dat : 377.7MB state.dat : 245.8kB
~ 5KB per block (no minting transaction in each block)
blocksize: Worcester: "blocksize" = 218 SanMateo: "blocksize" = 388
so far , there are two miners to run, and each produces one block per 25 seconds. if one block size is max 1M, so one day's storage useage is 6912M, it it too crazy! if one block is 5KB, so one day's storage usage is 34.56M
https://github.com/excelsia/VEE/blob/master/src/main/scala/com/wavesplatform/history/HistoryWriterImpl.scala blockchain.dat includes 4 MVStore maps
val h = height() + 1
val score = (if (height() == 0) BigInt(0) else this.score()) + block.blockScore
blockBodyByHeight.mutate(_.put(h, block.bytes))
scoreByHeight.mutate(_.put(h, score))
blockIdByHeight.mutate(_.put(h, block.uniqueId))
heightByBlockId.mutate(_.put(block.uniqueId, h))
db.commit()
update: test base on https://github.com/excelsia/VEE/pull/41
height: 1035 blockchain.dat : 1.8 MB (1,822,720 bytes) state.dat : 565.2 kB (565,248 bytes)
height: 2048 blockchain.dat : 3.7 MB (3,723,264 bytes) state.dat : 1.3 MB (1,286,144 bytes)
height: 3064 blockchain.dat : 5.3 MB (5,312,512 bytes) state.dat : 1.6 MB (1,617,920 bytes)
height: 5060 blockchain.dat : 6.5 MB (6,451,200 bytes) state.dat : 3.2 MB (3,235,840 bytes)
only one minting transaction per block, no extra transaction "blocksize" = 440
Test Net: SanMateo Block number: ~40000 Blockchain size: ~330MB State size: ~60MB
~ 10KB per block (only one minting transaction per block)