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

Algod: fix nil deref while fetching stateproof secrets #4554

Merged
merged 7 commits into from
Sep 19, 2022

Conversation

algonathan
Copy link
Contributor

Summary

Test Plan

@algonathan algonathan changed the title Algod: fix to get stateproof secrets Algod: fix nil deref while fetching stateproof secrets Sep 15, 2022
cce
cce previously approved these changes Sep 15, 2022
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #4554 (1c7004a) into master (7e8ca90) will decrease coverage by 0.02%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master    #4554      +/-   ##
==========================================
- Coverage   54.11%   54.09%   -0.03%     
==========================================
  Files         401      401              
  Lines       51549    51552       +3     
==========================================
- Hits        27898    27889       -9     
- Misses      21311    21318       +7     
- Partials     2340     2345       +5     
Impacted Files Coverage Δ
data/accountManager.go 71.25% <50.00%> (ø)
data/account/participationRegistry.go 78.50% <100.00%> (+0.15%) ⬆️
network/wsPeer.go 66.03% <0.00%> (-4.86%) ⬇️
cmd/algoh/blockWatcher.go 77.77% <0.00%> (-3.18%) ⬇️
ledger/blockqueue.go 85.63% <0.00%> (-2.88%) ⬇️
network/wsNetwork.go 64.82% <0.00%> (ø)
ledger/acctupdates.go 70.19% <0.00%> (+0.59%) ⬆️
ledger/tracker.go 78.72% <0.00%> (+3.82%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@winder winder 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, just a couple minor suggestions.

cce
cce previously approved these changes Sep 15, 2022
partRndSecrets, err := manager.registry.GetStateProofSecretsForRound(part.ParticipationID, rnd)
if err != nil {
manager.log.Errorf("error while loading round secrets from participation registry: %w", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

why removed the err wrapping?

Copy link
Contributor

Choose a reason for hiding this comment

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

It is due to the fact that we don't return a wrapped error here, just log the message.
Current, the log will contain a line like this:

error while loading round secrets from participation registry: %!w(*fmt.wrapError=&{...})

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, right, logging, thanks!

@id-ms
Copy link
Contributor

id-ms commented Oct 11, 2022 via email

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.

6 participants