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

Optimize network message handle #2350

Merged
merged 3 commits into from
Mar 30, 2021
Merged

Conversation

jolestar
Copy link
Member

  1. 优化了一下 CompatBlock 消息的处理机制,同步状态下依然继续处理 CompatBlock 消息。
  2. 增加了配置项目,节点可以定义 p2p 网络支持的连接数。

@jolestar jolestar force-pushed the optimize_network_message_handle branch from c28e423 to 877637c Compare March 30, 2021 06:59
@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #2350 (877637c) into master (ae80c23) will increase coverage by 0.26%.
The diff coverage is 48.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2350      +/-   ##
==========================================
+ Coverage   33.12%   33.38%   +0.26%     
==========================================
  Files         477      477              
  Lines       41153    41159       +6     
  Branches    18463    18465       +2     
==========================================
+ Hits        13628    13736     +108     
+ Misses      13721    13524     -197     
- Partials    13804    13899      +95     
Flag Coverage Δ
unittests 33.38% <48.00%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
block-relayer/src/block_relayer.rs 30.00% <0.00%> (+0.46%) ⬆️
config/src/tests.rs 28.00% <ø> (ø)
network/src/worker.rs 36.85% <0.00%> (-2.04%) ⬇️
txpool/src/lib.rs 47.33% <ø> (ø)
network/src/service.rs 26.81% <28.58%> (-0.59%) ⬇️
config/src/network_config.rs 53.61% <71.43%> (+1.70%) ⬆️
network-p2p/src/request_responses.rs 30.20% <0.00%> (-0.34%) ⬇️
...able-jellyfish-merkle/src/jellyfish_merkle_test.rs 18.85% <0.00%> (-0.22%) ⬇️
commons/stream-task/src/tests.rs 31.43% <0.00%> (ø)
... and 11 more

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 ae80c23...877637c. Read the comment docs.

@github-actions
Copy link

Benchmark for c886b38

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 1204.3±63.19µs 1269.1±81.13µs -5.11%
block_apply/block_apply_10 363.0±2.10ms 363.7±1.56ms -0.19%
block_apply/block_apply_1000 37.8±0.51s 38.0±0.37s -0.53%
get_with_proof/db_store 42.5±0.59µs 43.7±0.60µs -2.75%
get_with_proof/mem_store 32.6±0.45µs 33.0±0.26µs -1.21%
put_and_commit/db_store/1 531.3±24.87µs 540.1±28.60µs -1.63%
put_and_commit/db_store/10 1616.2±89.78µs 1532.5±128.29µs +5.46%
put_and_commit/db_store/100 9.3±0.46ms 9.2±0.45ms +1.09%
put_and_commit/db_store/5 1006.7±75.08µs 1002.7±89.88µs +0.40%
put_and_commit/db_store/50 5.2±0.26ms 5.2±0.25ms 0.00%
put_and_commit/mem_store/1 72.8±3.75µs 73.7±3.78µs -1.22%
put_and_commit/mem_store/10 649.6±29.25µs 646.2±31.33µs +0.53%
put_and_commit/mem_store/100 6.2±0.55ms 6.1±0.57ms +1.64%
put_and_commit/mem_store/5 333.7±17.04µs 335.8±17.83µs -0.63%
put_and_commit/mem_store/50 3.1±0.13ms 3.1±0.12ms 0.00%
query_block/query_block_in(10)_times(100) 3.2±0.08ms 3.3±0.05ms -3.03%
query_block/query_block_in(10)_times(1000) 32.8±1.38ms 32.0±0.87ms +2.50%
query_block/query_block_in(10)_times(10000) 322.5±4.55ms 322.7±6.52ms -0.06%
query_block/query_block_in(1000)_times(100) 1312.0±25.06µs 1324.4±4.71µs -0.94%
query_block/query_block_in(1000)_times(1000) 13.1±0.10ms 13.2±0.04ms -0.76%
query_block/query_block_in(1000)_times(10000) 130.7±0.45ms 131.6±0.65ms -0.68%
storage_transaction 12.8±0.78ms 13.8±0.73ms -7.25%
vm/transaction_execution/1 379.0±2.61ms 379.1±2.91ms -0.03%
vm/transaction_execution/10 123.3±0.33ms 123.1±1.00ms +0.16%
vm/transaction_execution/20 114.4±0.64ms 114.4±1.14ms 0.00%
vm/transaction_execution/5 148.5±0.28ms 150.0±1.61ms -1.00%
vm/transaction_execution/50 130.3±0.77ms 133.5±1.95ms -2.40%

@sanlee42 sanlee42 merged commit d4a696f into master Mar 30, 2021
@sanlee42 sanlee42 deleted the optimize_network_message_handle branch March 30, 2021 09:00
naughtyvenom pushed a commit to naughtyvenom/starcoin that referenced this pull request Jul 19, 2021
* [network] Optimize BlockMessage broadcast handle.

* [config] Network config support set peers count.

* [config] Update barnard k8s config.
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