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

[DKG] improve logging #1162

Merged
merged 6 commits into from
Aug 27, 2021
Merged

[DKG] improve logging #1162

merged 6 commits into from
Aug 27, 2021

Conversation

tarakby
Copy link
Contributor

@tarakby tarakby commented Aug 18, 2021

Improve logging for DKG broadcasted messages.

b.log.Warn().Msgf("DKG broadcast number %d", b.broadcasts+1)
b.log.Warn().Msgf("DKG broadcast number %d with header %d", b.broadcasts+1, data[0])
} else {
b.log.Info().Msgf("DKG message broadcast with header %d", data[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't we rather indicating that we're entering a DKG message broadcast phase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are already logs for finishing a DKG phase and entering a new one. Here I'm adding a more granular log for every broadcast. It helps me understand what is happening in unhappy paths.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, maybe "DKG initial message broadcast" makes sense in the message then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The log here is made for every call to broadcast, and not necessarily for the initial broadcast. This includes the initial message, the complaint(s) and their answer(s).

Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

LGTM

b.log.Warn().Msgf("DKG broadcast number %d", b.broadcasts+1)
b.log.Warn().Msgf("DKG broadcast number %d with header %d", b.broadcasts+1, data[0])
} else {
b.log.Info().Msgf("DKG message broadcast with header %d", data[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, maybe "DKG initial message broadcast" makes sense in the message then?

@huitseeker
Copy link
Contributor

This is probably a good PR to try using bors with 😁

@tarakby
Copy link
Contributor Author

tarakby commented Aug 27, 2021

bors merge

bors bot added a commit that referenced this pull request Aug 27, 2021
1162: [DKG] improve logging r=tarakby a=tarakby

Improve logging for DKG broadcasted messages. 

Co-authored-by: Tarak Ben Youssef <tarak.benyoussef@dapperlabs.com>
Co-authored-by: Tarak Ben Youssef <50252200+tarakby@users.noreply.github.com>
@bors
Copy link
Contributor

bors bot commented Aug 27, 2021

Canceled.

@tarakby
Copy link
Contributor Author

tarakby commented Aug 27, 2021

bors merge

@bors
Copy link
Contributor

bors bot commented Aug 27, 2021

@bors bors bot merged commit a91c69d into master Aug 27, 2021
@bors bors bot deleted the tarak/dkg-logging branch August 27, 2021 18:08
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.

None yet

3 participants