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 for missed block detection #1471

Merged
merged 5 commits into from
Nov 11, 2022
Merged

Conversation

herr-seppia
Copy link
Member

@herr-seppia herr-seppia commented Nov 4, 2022

See also #1448
Resolves #1470

@herr-seppia herr-seppia self-assigned this Nov 4, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 4, 2022

Codecov Report

Base: 40.18% // Head: 40.09% // Decreases project coverage by -0.08% ⚠️

Coverage data is based on head (a5c2967) compared to base (57c6bbd).
Patch coverage: 26.66% of modified lines in pull request are covered.

❗ Current head a5c2967 differs from pull request most recent head 2df486f. Consider uploading reports for the commit 2df486f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1471      +/-   ##
==========================================
- Coverage   40.18%   40.09%   -0.09%     
==========================================
  Files         147      147              
  Lines        9651     9705      +54     
==========================================
+ Hits         3878     3891      +13     
- Misses       5144     5189      +45     
+ Partials      629      625       -4     
Impacted Files Coverage Δ
pkg/config/genesis/config.go 0.00% <ø> (ø)
pkg/config/genesis/presets.go 69.23% <ø> (ø)
...nsensus/blockgenerator/candidate/blockgenerator.go 0.00% <0.00%> (ø)
...core/consensus/blockgenerator/candidate/genesis.go 0.00% <0.00%> (ø)
...kg/core/consensus/blockgenerator/candidate/mock.go 0.00% <0.00%> (ø)
pkg/core/data/ipc/transactions/fixtures.go 13.76% <0.00%> (-0.21%) ⬇️
pkg/gql/query/blocks.go 63.22% <0.00%> (ø)
pkg/gql/query/mempool.go 30.00% <0.00%> (ø)
pkg/gql/query/types.go 13.79% <ø> (ø)
pkg/util/nativeutils/sortedset/sortedset.go 48.14% <0.00%> (-0.45%) ⬇️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -509,6 +521,12 @@ func (c *Chain) runStateTransition(tipBlk, blk block.Block) (*block.Block, error
WithField("state_hash", util.StringifyBytes(respStateHash)).WithField("e_prov", eligibleProvisioners).
Info("state transition completed")

provisioner, _ := base58.Encode(blk.Header.GeneratorBlsPubkey)
logger.WithField("provisioner", provisioner).
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: Should we name it block_generator or just "generator" instead of "provisioner"?

for iteration := uint8(0); iteration < missedIterations; iteration++ {
step := iteration*3 + 1
committee := c.p.CreateVotingCommittee(tipBlk.Header.Seed, blk.Header.Height, step, config.ConsensusSelectionMaxCommitteeSize)
expectedkey, _ := base58.Encode(committee.MemberKeys()[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

As a rule of thumb, always ensure "committee.MemberKeys()" is not empty.

@herr-seppia herr-seppia requested a review from goshawk-3 November 9, 2022 11:14
@herr-seppia herr-seppia merged commit 2409dbd into master Nov 11, 2022
@herr-seppia herr-seppia deleted the missing-block-detection branch November 11, 2022 08:20
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.

Missing block detection
3 participants