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

[sync] Check failed block before apply. #2794

Merged
merged 5 commits into from
Aug 16, 2021
Merged

[sync] Check failed block before apply. #2794

merged 5 commits into from
Aug 16, 2021

Conversation

jolestar
Copy link
Member

@jolestar jolestar commented Aug 16, 2021

在 apply 之前检查该 block 是否是以前验证失败的 block

@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #2794 (3184d82) into master (20b4b0b) will decrease coverage by 0.06%.
The diff coverage is 4.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2794      +/-   ##
==========================================
- Coverage   31.78%   31.72%   -0.05%     
==========================================
  Files         509      509              
  Lines       44824    44864      +40     
  Branches    19957    19975      +18     
==========================================
- Hits        14241    14227      -14     
- Misses      16756    16819      +63     
+ Partials    13827    13818       -9     
Flag Coverage Δ
unittests 31.72% <4.88%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
chain/api/src/errors.rs 36.37% <0.00%> (+1.59%) ⬆️
cmd/starcoin/src/lib.rs 100.00% <ø> (ø)
node/api/src/message.rs 0.00% <0.00%> (ø)
node/api/src/node_service.rs 2.57% <0.00%> (-0.29%) ⬇️
node/src/node.rs 12.58% <0.00%> (-0.40%) ⬇️
rpc/api/src/node_manager.rs 0.00% <0.00%> (ø)
rpc/client/src/lib.rs 12.28% <0.00%> (-0.63%) ⬇️
rpc/server/src/module/node_manager_rpc.rs 6.13% <0.00%> (-1.19%) ⬇️
...ync/src/block_connector/block_connector_service.rs 33.34% <0.00%> (ø)
sync/src/tasks/block_sync_task.rs 38.51% <14.29%> (-1.83%) ⬇️
... and 40 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 b543f58...3184d82. Read the comment docs.

@github-actions
Copy link

Benchmark for 114be0f

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.3±0.22ms 2.4±0.19ms -4.17%
block_apply/block_apply_10 440.6±10.72ms 437.4±7.64ms +0.73%
block_apply/block_apply_1000 46.2±0.55s 44.7±0.28s +3.36%
get_with_proof/db_store 38.2±0.37µs 38.7±0.33µs -1.29%
get_with_proof/mem_store 31.6±0.37µs 31.5±0.25µs +0.32%
put_and_commit/db_store/1 1340.2±62.17µs 1332.2±81.29µs +0.60%
put_and_commit/db_store/10 2.5±0.37ms 2.4±0.37ms +4.17%
put_and_commit/db_store/100 9.8±0.87ms 10.0±1.09ms -2.00%
put_and_commit/db_store/5 1968.9±147.12µs 1903.5±151.08µs +3.44%
put_and_commit/db_store/50 5.9±0.78ms 5.9±0.76ms 0.00%
put_and_commit/mem_store/1 63.2±5.63µs 63.2±5.60µs 0.00%
put_and_commit/mem_store/10 585.0±46.12µs 587.2±46.58µs -0.37%
put_and_commit/mem_store/100 5.7±0.82ms 5.8±0.82ms -1.72%
put_and_commit/mem_store/5 296.0±24.55µs 297.4±24.55µs -0.47%
put_and_commit/mem_store/50 2.9±0.18ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 3.5±0.07ms 3.5±0.05ms 0.00%
query_block/query_block_in(10)_times(1000) 35.3±0.49ms 35.6±0.92ms -0.84%
query_block/query_block_in(10)_times(10000) 354.2±9.57ms 353.6±6.88ms +0.17%
query_block/query_block_in(1000)_times(100) 920.6±6.40µs 920.5±4.27µs +0.01%
query_block/query_block_in(1000)_times(1000) 9.1±0.07ms 9.1±0.04ms 0.00%
query_block/query_block_in(1000)_times(10000) 92.4±1.02ms 92.9±0.53ms -0.54%
storage_transaction 50.5±3.90ms 51.5±8.43ms -1.94%
vm/transaction_execution/1 351.2±1.09ms 351.5±0.88ms -0.09%
vm/transaction_execution/10 124.1±0.27ms 124.0±0.75ms +0.08%
vm/transaction_execution/20 117.2±0.75ms 117.4±2.02ms -0.17%
vm/transaction_execution/5 146.9±0.42ms 147.6±2.00ms -0.47%
vm/transaction_execution/50 132.5±1.67ms 131.9±0.81ms +0.45%

@github-actions
Copy link

Benchmark for 0ce3711

Click to view benchmark
Test PR Benchmark Master Benchmark %
accumulator_append 2.2±0.09ms 2.3±0.14ms -4.35%
block_apply/block_apply_10 467.5±12.83ms 441.6±7.06ms +5.87%
block_apply/block_apply_1000 45.7±0.94s 45.3±0.87s +0.88%
get_with_proof/db_store 38.6±0.43µs 38.1±0.36µs +1.31%
get_with_proof/mem_store 31.8±0.28µs 31.6±0.27µs +0.63%
put_and_commit/db_store/1 1343.5±81.69µs 1404.5±109.41µs -4.34%
put_and_commit/db_store/10 2.4±0.38ms 2.5±0.39ms -4.00%
put_and_commit/db_store/100 10.0±1.37ms 9.9±1.10ms +1.01%
put_and_commit/db_store/5 1968.7±262.45µs 2.0±0.17ms -1.57%
put_and_commit/db_store/50 5.8±0.69ms 5.9±0.76ms -1.69%
put_and_commit/mem_store/1 63.5±5.66µs 63.4±5.61µs +0.16%
put_and_commit/mem_store/10 589.7±46.55µs 590.1±48.30µs -0.07%
put_and_commit/mem_store/100 5.7±0.81ms 5.8±0.82ms -1.72%
put_and_commit/mem_store/5 299.7±24.10µs 298.8±25.06µs +0.30%
put_and_commit/mem_store/50 2.9±0.19ms 2.9±0.18ms 0.00%
query_block/query_block_in(10)_times(100) 3.6±0.07ms 3.5±0.07ms +2.86%
query_block/query_block_in(10)_times(1000) 35.1±0.92ms 35.3±1.03ms -0.57%
query_block/query_block_in(10)_times(10000) 355.3±4.80ms 357.7±3.61ms -0.67%
query_block/query_block_in(1000)_times(100) 930.7±7.44µs 905.0±4.76µs +2.84%
query_block/query_block_in(1000)_times(1000) 9.3±0.07ms 9.3±0.22ms 0.00%
query_block/query_block_in(1000)_times(10000) 93.0±0.90ms 90.5±0.57ms +2.76%
storage_transaction 50.4±4.08ms 53.2±3.69ms -5.26%
vm/transaction_execution/1 349.9±0.82ms 350.9±2.20ms -0.28%
vm/transaction_execution/10 123.9±1.36ms 124.0±0.79ms -0.08%
vm/transaction_execution/20 117.2±1.86ms 116.7±0.68ms +0.43%
vm/transaction_execution/5 146.3±0.24ms 146.7±0.52ms -0.27%
vm/transaction_execution/50 132.4±2.73ms 131.4±0.43ms +0.76%

@nanne007 nanne007 merged commit 9706885 into master Aug 16, 2021
@nanne007 nanne007 deleted the sync_failed_block branch August 16, 2021 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants