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

refactor: improve debug logging of PrepareProposal and ProcessProposal #59

Merged
merged 5 commits into from
Mar 22, 2024

Conversation

QuantumExplorer
Copy link
Member

Issue being fixed or feature implemented

We were getting some very incoherent logs that looked like:

2024-03-20T17:57:29.133397Z TRACE main ThreadId(01) abci{endpoint="PrepareProposal" request_id="cf4cd98f-7b82-4abd-9a0e-8ba6e14a4f9e" height=242 round=0}: tenderdash_abci::application: sending ABCI response response=PrepareProposal(ResponsePrepareProposal { tx_records: [TxRecord { action: Unmodified, tx: [0, 0, 0, 55, 114, 93, 108, 17, 17, 56, 13, 209, 96, 40, 114, 236, 139, 226, 233, 33, 130, 102, 124, 23, 201, 218, 68, 243, 71, 25, 66, 46, 108, 18, 143, 0, 0, 0, 0, 0, 1, 0, 0, 1, 185, 56, 190, 248, 108, 141, 131, 219, 5, 227, 22, 201, 248, 210, 205, 195, 215, 32, 130, 212, 163, 192, 129, 100, 165, 136, 195, 43, 46, 157, 92, 196, 0, 30, 21, 115, 116, 114, 105, 110, 103, 32, 100, 111, 99, 95, 116, 121, 112, 101, 95, 49, 49, 54, 50, 49, 22, 5, 18, 4, 116, 121, 112, 101, 18, 6, 111, 98, 106, 101, 99, 116, 18, 10, 112, 114, 111, 112, 101, 114, 116, 105, 101, 115, 22, 15, 18, 11, 102, 105, 101, 108, 100, 95, 53, 52, 51, 57, 54, 22, 4, 18, 4, 116, 121, 112, 101, 18, 6, 110, 117, 109, 98, 101, 114, 18, 7, 109, 105, 110, 105, 109, 117, 109, 17, 63, 185, 153, 153, 153, 153, 153, 154, 18, 7, 109, 97, 120, 105, 109, 117, 109, 17, 64, 143, 64, 0, 0, 0, 0, 0, 18, 8, 112, 111, 115, 105, 116, 105, 111, 110, 2, 0, 18, 11, 102, 105, 101, 108, 100, 95, 49, 53, 53, 53, 56, 22, 4, 18, 4, 116, 121, 112, 101, 18, 6, 115, 116, 114, 105, 110, 103, 18, 6, 102, 111, 114, 109, 97, 116, 18, 9, 100, 97, 116, 101, 45, 116, 105, 109, 101, 18, 9, 109, 97, 120, 76, 101, 110, 103, 116, 104, 2, 10, 18, 8, 112, 111, 115, 105, 116, 105, 111, 110, 2, 1, 18, 11, 102, 105, 101, 108, 100, 95, 54, 51, 52, 51, 53, 22, 4, 18, 4, 116, 121, 112, 101, 18, 5, 97, 114, 114, 97, 121, 18, 8, 109, 97, 120, 73, 116, 101, 109, 115, 2, 251, 0, 255, 18, 9, 98, 121, 116, 101, 65, 114, 114, 97, 121, 19, 1, 18, 8, 112, 111, 115, 105, 116, 105, 111, 110, 2, 2, 18, 11, 102, 105, 101, 108, 100, 95, 53, 52, 52, 53, 54, 22, 4, 18, 4, 116, 121, 112, 101, 18, 6, 115, 116, 114, 105, 110, 103, 18, 6, 102, 111, 114, 109, 97, 116, 18, 9, 100, 97, 116, 101, 45, 116, 105, 109, 101, 18, 9, 109, 97, 120, 76, 101, 110, 103, 116, 104, 2, 10, 18, 8, 112, 111, 115, 105, 116, 105, 111, 110, 2, 3, 18, 11, 102, 105, 101, 108, 100, 95, 50, 48, 53, 55, 49, 22, 4, 18, 4, 116, 121, 112, 101, 18, 6, 110, 117, 109, 98, 101, 114, 18, 7, 109, 105, 110, 105, 109, 117, 109, 17, 63, 185, 153, 153, 153, 153, 153, 154, 18, 7, 109, 97, 120, 105, 109, 117, 109, 17, 64, 143, 64, 0, 0, 0, 0, 0, 18, 8, 112, 111, 115, 105, 116, 105, 111, 110, 2, 4, 18, 11, 102, 105, 101, 108, 100, 95, 50, 51, 50, 51, 50, 22, 4, 18, 4, 116, 121, 112, 101, 18, 6, 110, 117, 109, 98, 101, 114, 18, 7, 109, 105, 110, 105, 109, 117, 109, 17, 63, 185, 153, 153, 153, 153, 153, 154, 18, 7, 109, 97, 120, 105, 109, 117, 109, 17, 64, 143, 64, 0, 0, 0, 0, 0, 18, 8, 112, 111, 115, 105, 116, 105, 111, 110, 2, 5, 18, 10, 102, 105, 101, 108, 100, 95, 54, 50, 54, 48, 22, 4, 18, 4, 116, 121, 112, 101, 18, 5, 97, 114, 114, 97, 121, 18, 8, 109, 97, 120, 73, 116, 101, 109, 115, 2, 251, 0, 255, 18, 9, 98, 121, 116, 101, 65, 114, 114, 97, 121, 19, 1, 18, 8, 112, 111, 115, 105, 116, 105, 111, 110, 2, 6, ...

What was done?

We change a lot of the array vector into hex strings.

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@QuantumExplorer QuantumExplorer requested a review from lklimek March 21, 2024 16:14
abci/src/application.rs Fixed Show fixed Hide fixed
abci/src/application.rs Fixed Show fixed Hide fixed
@lklimek lklimek changed the title refactor: temp better debug info refactor: improve debug logging of PrepareProposal and ProcessProposal Mar 22, 2024
@lklimek lklimek merged commit 2606e70 into master Mar 22, 2024
11 checks passed
@lklimek lklimek deleted the refactor/tempBetterDebugInfo branch March 22, 2024 09:18
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