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

network: batch transactions on broadcast #681

Merged
merged 2 commits into from
Mar 2, 2020
Merged

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Feb 18, 2020

Closes #665 .

@codecov
Copy link

codecov bot commented Feb 19, 2020

Codecov Report

Merging #681 into master will decrease coverage by 0.19%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #681     +/-   ##
=========================================
- Coverage   65.22%   65.03%   -0.2%     
=========================================
  Files         125      125             
  Lines       10743    10775     +32     
=========================================
  Hits         7007     7007             
- Misses       3457     3489     +32     
  Partials      279      279
Impacted Files Coverage Δ
pkg/network/server.go 16.38% <0%> (-1.2%) ⬇️

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 b5ec94b...a271b86. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Feb 19, 2020

Codecov Report

Merging #681 into master will decrease coverage by 0.24%.
The diff coverage is 2.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #681      +/-   ##
==========================================
- Coverage   65.96%   65.72%   -0.25%     
==========================================
  Files         128      128              
  Lines       10992    11033      +41     
==========================================
  Hits         7251     7251              
- Misses       3459     3500      +41     
  Partials      282      282
Impacted Files Coverage Δ
pkg/network/server.go 15.15% <0%> (-1.34%) ⬇️
pkg/core/mempool/mem_pool.go 97.09% <100%> (ø) ⬆️

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 ff551d2...cbf26ba. Read the comment docs.

@fyrchik
Copy link
Contributor Author

fyrchik commented Feb 19, 2020

Some results on benchmarking:
I have tried neo-bench with different settings. Everytime RPS was higher after this patch.

Noticeable changes: after increasing mempool size to 500k, this bench showed interesting results.
.make/runner.sh -f $(DC_GO_IR) -f $(DC_GO_RPC) -i /dump.txs -d "Go4x1" -m rate -q 1000 -z 5m -t 30s -a go-node:20331

Before the patch (on the current master) amount of tx per block was roughly the same (8k -- 12k) with new blocks accepted ~every 20s.
After the patch amount of tx per block has been steadily increased during the bench up to 30k tx and 30s per block. Because we propose ALL currently verified transactions in a block, this can show that transactions become verified faster.

pkg/network/server.go Outdated Show resolved Hide resolved
pkg/network/server.go Show resolved Hide resolved
pkg/network/server.go Show resolved Hide resolved
pkg/network/server.go Outdated Show resolved Hide resolved
pkg/network/server.go Outdated Show resolved Hide resolved
Because transactions a iterated in an increasing order,
we can filter slice in-place.
@roman-khimov
Copy link
Member

From what I see in my testing of it, RPS is improved and block generation is changed a bit in that it really tends to produce bigger and bigger blocks over time. But at the same time I don't see any clear negative effect on TPS, so even if it just improves RPS it's a good change.

@roman-khimov roman-khimov merged commit a2b9d85 into master Mar 2, 2020
@roman-khimov roman-khimov deleted the feature/tx_batching branch March 2, 2020 12:54
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.

TX broadcast batching
3 participants