Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage size #37

Open
ncying opened this issue Jul 17, 2018 · 7 comments
Open

storage size #37

ncying opened this issue Jul 17, 2018 · 7 comments
Assignees

Comments

@ncying
Copy link
Contributor

ncying commented Jul 17, 2018

Test Net: SanMateo
Block number: ~40000
Blockchain size: ~330MB
State size: ~60MB

~ 10KB per block (only one minting transaction per block)

@virtualeconomy
Copy link
Contributor

why is each block so big? how many transactions does each block contain?

the state size seems more reasonable.

@ncying
Copy link
Contributor Author

ncying commented Jul 17, 2018

shenzhen team use SanMateo to test their wallet, maybe some transfer transactions. but < 2 transactions per block (1 minting tx)

@virtualeconomy
Copy link
Contributor

then I don't understand why the block size is 10KB.

@ncying
Copy link
Contributor Author

ncying commented Jul 17, 2018

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

@pkubear
Copy link
Contributor

pkubear commented Jul 17, 2018

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

@ncying
Copy link
Contributor Author

ncying commented Jul 17, 2018

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()

@ncying
Copy link
Contributor Author

ncying commented Jul 19, 2018

update: test base on #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

@virtualeconomy virtualeconomy removed their assignment Nov 21, 2018
@pkubear pkubear self-assigned this Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants