-
Notifications
You must be signed in to change notification settings - Fork 279
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
[refactor] #2664: Introduce new wsv #4061
[refactor] #2664: Introduce new wsv #4061
Conversation
04fe423
to
3f3b0f2
Compare
Pull Request Test Coverage Report for Build 7097081569
💛 - Coveralls |
dc0cc41
to
d4da9b7
Compare
d4da9b7
to
77e77da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job.
256bb41
to
c148b7c
Compare
I believe somewhere should be |
c148b7c
to
8e0439f
Compare
Pull Request Test Coverage Report for Build 8360992827Details
💛 - Coveralls |
fd14088
to
ef79703
Compare
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
ef79703
to
55de672
Compare
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
…ng latest Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
55de672
to
5508ecd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since you found a way to eliminate View vs Snapshot, I have no other complaints here.
I think this change is amazing improvement
Description
Introduce new in memory storage for iroha.
New approach provide single writer, multiple readers where readers don't block writers and writer doesn't block readers.
Single writer seems reasonable restriction since only single block is processed at the same time.
Instead of single
WorldStateView
multiple transactions are now used.Work is based on
concread
crate.State
in-memory iroha storageStateView
read-only snapshot of state at some point in timeStateBlock
aggregate state changes during block execution (need commit to take effect)StateTransaction
aggregate state changes during transaction execution (need commit to take effect)Linked issue
Closes #2664
Benefits
Benchmark results
Iroha tps benchmark was used. In this bechmark only small fraction of state is changed with single transaction (imo it's reasonable to expect that single transaction won't change whole state).
Genesis was generated with the following command:
cargo run --bin kagami genesis --domains 250 --accounts-per-domain 100 --assets-per-domain 100 > configs/peer/genesis.json
This command creates genesis about 400 Mb in size.
Set the following config for
clients/bench/config.json
Than bench two times before and after changes in wsv.
tps-oneshot results:
Before update: tps=3.3077273188803833
After update: tps=2339.2057925660447
To measure memory consumption heaptrack was used.
Allocation sizes and amounts:
Before:
After:
All relevant files: link.
TODO