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

add(log): Log the amount of time it takes to rebuild note commitment trees after a chain fork #4795

Merged
merged 5 commits into from
Jul 21, 2022

Conversation

teor2345
Copy link
Contributor

Motivation

This is a diagnostic to set the priority of fixing bug #4794.

Review

This is urgent, because bug #4794 might be causing syncing to fail.

Reviewer Checklist

  • Logs do what is expected

@teor2345 teor2345 added P-High 🔥 I-slow Problems with performance or responsiveness A-diagnostics Area: Diagnosing issues or monitoring performance A-state Area: State / database changes labels Jul 19, 2022
@teor2345 teor2345 requested a review from a team as a code owner July 19, 2022 21:48
@teor2345 teor2345 requested review from conradoplg and removed request for a team July 19, 2022 21:48
@teor2345 teor2345 self-assigned this Jul 19, 2022
@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #4795 (086140a) into main (81727d7) will increase coverage by 0.03%.
The diff coverage is 21.42%.

@@            Coverage Diff             @@
##             main    #4795      +/-   ##
==========================================
+ Coverage   78.75%   78.79%   +0.03%     
==========================================
  Files         305      305              
  Lines       38066    38098      +32     
==========================================
+ Hits        29980    30018      +38     
+ Misses       8086     8080       -6     

@teor2345
Copy link
Contributor Author

The ubuntu failure looks like a spurious timing issue in the Zcash listener port and state conflict tests.

conradoplg
conradoplg previously approved these changes Jul 20, 2022
Copy link
Collaborator

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

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

Looks good, I'll also leave my node running in this branch to see the results

@conradoplg
Copy link
Collaborator

1 minute in my machine 😬

2022-07-20T15:16:30.432763Z  INFO {zebrad="29df68a" net="Main"}:{peer=Out("46.249.236.211:8233")}:msg_as_req{msg="inv"}:inbound:download_and_verify{hash=0000000001532b507edfb3bf783a7905e4972bd67ee473f5babc13918964e387}:state: zebra_state::service::non_finalized_state::chain: starting to rebuild note commitment trees after a non-finalized chain fork fork_height=Height(1744261) fork_tip=block::Hash("000000000068ab847a10a3de6d8e4a82df8a24cae0a1cc06cd228947cfe45e33")
2022-07-20T15:17:37.426615Z  INFO {zebrad="29df68a" net="Main"}:{peer=Out("46.249.236.211:8233")}:msg_as_req{msg="inv"}:inbound:download_and_verify{hash=0000000001532b507edfb3bf783a7905e4972bd67ee473f5babc13918964e387}:state: zebra_state::service::non_finalized_state::chain: finished rebuilding note commitment trees after a non-finalized chain fork rebuild_time=66.993852503s fork_height=Height(1744261) fork_tip=block::Hash("000000000068ab847a10a3de6d8e4a82df8a24cae0a1cc06cd228947cfe45e33")

But it only happened once in a ~1 hour span

@teor2345 teor2345 requested a review from a team as a code owner July 20, 2022 23:46
@teor2345 teor2345 requested review from conradoplg and removed request for a team July 20, 2022 23:49
Copy link
Contributor Author

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

I made some time formatting changes, which meant I needed to move a module to another crate

zebra-chain/Cargo.toml Show resolved Hide resolved
zebra-chain/Cargo.toml Show resolved Hide resolved
zebra-chain/src/fmt/time.rs Show resolved Hide resolved
@teor2345 teor2345 changed the title add(log): Log the amount of time it takes to rebuild note commitment trees after a chain fork 0. add(log): Log the amount of time it takes to rebuild note commitment trees after a chain fork Jul 21, 2022
@teor2345 teor2345 changed the title 0. add(log): Log the amount of time it takes to rebuild note commitment trees after a chain fork add(log): Log the amount of time it takes to rebuild note commitment trees after a chain fork Jul 21, 2022
Copy link
Collaborator

@conradoplg conradoplg left a comment

Choose a reason for hiding this comment

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

Looks good!

@teor2345 teor2345 merged commit 7b1d452 into main Jul 21, 2022
@teor2345 teor2345 deleted the fork-log branch July 21, 2022 23:17
@teor2345
Copy link
Contributor Author

I admin-merged this PR because it is a diagnostic for urgent sync fixes.

@oxarbitrage oxarbitrage mentioned this pull request Jul 28, 2022
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Diagnosing issues or monitoring performance A-state Area: State / database changes I-slow Problems with performance or responsiveness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants