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

Store applog with tx #2305

Merged
merged 2 commits into from
Dec 9, 2021
Merged

Store applog with tx #2305

merged 2 commits into from
Dec 9, 2021

Conversation

roman-khimov
Copy link
Member

Problem

We're a bit slow.

Solution

Increase da TPS.

It will interfere with #2299, so we can wait for a while before merging it, maybe improve some naming or things along the way (for example, RPC server can now technically get both tx and aer for getrawtransaction request in a single query, but I'm not sure it's worth doing this, there are no other similar simultaneous uses).

A bit longer script easily solves the size problem.
@roman-khimov roman-khimov added this to the v0.98.1 milestone Dec 8, 2021
@roman-khimov roman-khimov force-pushed the store-applog-with-tx branch 2 times, most recently from d083162 to 0fd95e1 Compare December 8, 2021 09:35
Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice optimisation!

pkg/core/dao/dao.go Show resolved Hide resolved
pkg/core/native_management_test.go Show resolved Hide resolved
Two times less keys inserted into the DB per tx leads to ~13% TPS
improvement. We also drop one goroutine with it which isn't bad as well.
@codecov
Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #2305 (4c39b66) into master (06fc450) will increase coverage by 0.00%.
The diff coverage is 73.23%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #2305    +/-   ##
========================================
  Coverage   84.04%   84.05%            
========================================
  Files         306      306            
  Lines       29775    29906   +131     
========================================
+ Hits        25025    25136   +111     
- Misses       3330     3333     +3     
- Partials     1420     1437    +17     
Impacted Files Coverage Δ
pkg/core/statesync/module.go 85.42% <0.00%> (ø)
pkg/core/storage/store.go 91.66% <ø> (ø)
pkg/core/dao/dao.go 80.26% <72.34%> (-0.82%) ⬇️
pkg/core/blockchain.go 79.03% <80.95%> (+0.62%) ⬆️
pkg/core/block/block.go 84.76% <100.00%> (-0.15%) ⬇️
pkg/services/stateroot/validators.go 76.74% <0.00%> (-8.14%) ⬇️
cli/wallet/wallet.go 76.25% <0.00%> (+1.94%) ⬆️
pkg/core/native/ledger.go 93.96% <0.00%> (+3.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06fc450...4c39b66. Read the comment docs.

@roman-khimov roman-khimov merged commit f14f7b9 into master Dec 9, 2021
@roman-khimov roman-khimov deleted the store-applog-with-tx branch December 9, 2021 13:05
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

Successfully merging this pull request may close these issues.

2 participants