Zilliqa / zq2

Zilliqa 2.0 code base
Apache License 2.0
10 stars 0 forks source link

Change how we store state to reduce state growth #1503

Closed DrZoltanFazekas closed 1 day ago

DrZoltanFazekas commented 2 months ago

Even in absence of transactions the persisted state is growing by approx. 250-300 MB/day. This is because rewards are issued to validators on each block and we produce 86,400 bocks per day and we store state trie updates. We shall consider a more efficient way of storing the state and only construct the trie on the fly to compute its root. Please add your thought @JamesHinshelwood

shawn-zil commented 1 week ago

Simple data compression would yield only expected impact:

-rw-r--r-- 1 root root 578M Nov 15 04:02 db.sqlite3
-rw-r--r-- 1 root root 262M Nov 15 04:02 test.gz
shawn-zil commented 1 week ago

This is related to issue #1748

shawn-zil commented 1 day ago

Closing for now, as size of SQLite database has gone down by 20% with the SQLite changes. However, if that is insufficient, then we will need an alternative to having an SQLite database and/or choosing a different window to store things e.g. daily data only.