skalenetwork / skaled

Running more than 20 production blockchains, SKALED is Ethereum-compatible, high performance C++ Proof-of-Stake client, tools and libraries. Uses SKALE consensus as a blockchain consensus core. Includes dynamic Oracle. Implements file storage and retrieval as an EVM extension.
https://skale.network
GNU General Public License v3.0
88 stars 41 forks source link

Decrease leveldb storage usage #1601

Open olehnikolaiev opened 1 year ago

olehnikolaiev commented 1 year ago

run the following test: add 100mb data to state - leveldb storage usage grows up to 250mb erase the data

leveldb storage usage is still ~200mb need to investigate the reason and fix it

@oleksandrSydorenkoJ to add more details and logs

oleksandrSydorenkoJ commented 1 year ago

skalenetwork/schain:3.17.0-beta.5 skale_schain_polite-friendly-alphard

0x8a6B98607a18B5855009E644c666505Bf0384594 before test

"skaledDBUsage":{"blocks.db_disk_usage":101725369,"contractStorageUsed":2137664,"pieceUsageBytes":232798489,"state.db_disk_usage":82198395}}

after load of 100 MB

"skaledDBUsage":{"blocks.db_disk_usage":103025913,"contractStorageUsed":106612384,"pieceUsageBytes":233597727,"state.db_disk_usage":195984235}}}

after self-destruct of 100 MB

"skaledDBUsage":{"blocks.db_disk_usage":103129051,"contractStorageUsed":106612352,"pieceUsageBytes":233610683,"state.db_disk_usage":262751272}}}

self-destruct-doesnt-works.txt