-
Notifications
You must be signed in to change notification settings - Fork 11
Util UpdateSet
Generate UpdateSet from substate. UpdateSet is a merge of substate range. Used as precomputed sets of merged substates for quicker advancing world state. TODO: extend overview
![updateset](https://private-user-images.githubusercontent.com/40288710/240555220-efda76e8-0d6e-4b34-9fac-9431caae3f6f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNDU2OTQsIm5iZiI6MTczOTE0NTM5NCwicGF0aCI6Ii80MDI4ODcxMC8yNDA1NTUyMjAtZWZkYTc2ZTgtMGQ2ZS00YjM0LTlmYWMtOTQzMWNhYWUzZjZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIzNTYzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgxYTcwYjFkMjI3NmNhMzc2MWM2MmJiYzNkNTg1YmZhZDM4YjNjZjQ1NTFhY2IwZjU4N2Q1ZmU2MDQ0MDA2NzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Dd9oOHcSEp7k1sj7-V_aJA8rVn47rV72g9EopTswLv8)
TODO
You need a configured Go language environment to build the CLI application. Please check the Go documentation for the details of installing the language compiler on your system.
TODO
To build the util-updateset
application, run make util-updateset
.
The build process downloads all the needed modules and libraries, you don't need to install these manually.
The util-updateset
executable application will be created in /build
folder.
To use Util UpdateSet, execute the compiled binary with the command and flags for the desired operation.
./build/util-updateset command [command options] [arguments...]
command | description |
---|---|
generate | Generate update-set from substate |
stats | Print number of accounts and storage keys in update-set |
Generate the UpdateSet.
./build/util-updateset generate --world-state path/to/world-state --update-db path/to/update-db `<blockNumLast>` `<interval>`
generates piecewise update-sets (merges of output substates) at every <interval>
blocks starting from block 4564026 to block <blockNumLast>
and stores them in updateDB. SubstateAlloc of block 4564025 from the world state is reocrded as the first update-set if --world-state is provided. The subsequence update-sets happen every <interval>
blocks afterwards.
GenUpdateSet:
--chainid choose chain id
--deletion-db sets the directory containing deleted accounts database
--update-db set update-set database directory
--update-buffer-size buffer size for holding update set in MiB (default: 1<<64 - 1)
--validate enables validation (default: false)
--world-state world state snapshot database path
--workers number of worker threads that execute in parallel (default: 4)
--substate-db data directory for substate recorder/replayer
--log level of the logging of the app action ("critical", "error", "warning", "notice", "info", "debug"; default: INFO)
Print number of accounts and storage keys in update-set.
./build/util-updateset stats --aida-db /path/to/aida-db --update-db path/to/update-db `<blockNumLast>`
The stats command requires one arguments: <blockNumLast>
- the last block of update-set.
UpdateSetStats:
--update-db set update-set database directory
--aida-db set substate, updateset and deleted accounts directory