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

[Util] Add validation interface logging #2548

Merged

Conversation

random-zebra
Copy link

@random-zebra random-zebra commented Sep 10, 2021

Backports bitcoin#16688 [jkczyz], which should help us debug some intermittent failures on GA (e.g. for feature_reindex or wallet_basic tests).

Add logging of CValidationInterface callbacks using a new VALIDATION log flag (see 12994). A separate flag is desirable as the logging can be noisy and thus may need to be disabled without affecting other logging.

This could help debug issues where there may be race conditions at play, such as 12978.

Based on top of

This flag is for logging from within CValidationInterface (see
btc#12994).
A separate flag is desirable as the logging can be noisy and thus may
need to be disabled without affecting other logging.
@random-zebra
Copy link
Author

Rebased on master.

furszy
furszy previously approved these changes Sep 13, 2021
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

Nice logging, ACK 74ad1bf

There is a dangling strMessageMagic extern definition in messagesigner.h that can be removed as well.

random-zebra and others added 4 commits September 14, 2021 17:22
FormatStateMessage does not properly handle the case where
CValidationState::IsValid() returns true. Use "Valid" for the state in
this case.
All cases of CValidationState were condensed into one strprintf call.
This is no longer suitable as more cases are added (e.g., IsValid).
>>> backports bitcoin/bitcoin@f9abf4a

This could help debug issues where there may be race conditions at play,
such as btc#12978.
@random-zebra
Copy link
Author

removed extra strMessageMagic definition.

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

utACK d6fe150 after squash.

@furszy furszy merged commit 2f16162 into PIVX-Project:master Sep 23, 2021
random-zebra added a commit that referenced this pull request Sep 25, 2021
…e rpc/gui

7d5a01d [Refactor] Remove code duplication in sign/verify message rpc/gui (random-zebra)

Pull request description:

  Simple refactoring commit to remove some code duplication. No functional changes.

  note:
  currently this PR includes
  - [x] #2548

  for easier rebase later: as here we replace the `util/validation.h` header include (introduced in #2548) with `messagesigner.h`, where `strMessageMagic` was accessed directly.

ACKs for top commit:
  furszy:
    simple enough, utACK 7d5a01d
  Fuzzbawls:
    ACK 7d5a01d

Tree-SHA512: d43f85304f83e09a621b9526c77e2d3ed4fbeb6f2d69de35f062718b3796b2aa5616b82ffd5a2b2ea9d32429a354d7871d320b59e3bc8fa3f7eda2bc713fbc72
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.

3 participants