-
Notifications
You must be signed in to change notification settings - Fork 69
consensus: verify with masternodes list instead of candidates, close XFN-62 #1724
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
Conversation
| } | ||
|
|
||
| snapshot, err := x.getSnapshot(chain, vote.GapNumber, true) | ||
| masternodes, err:= x.GetMasternodesFromGapNumber(chain, vote.GapNumber) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is vote proposedBlockInfo with block number, use that number to get header is faster
|
please change merge target branch to |
| } | ||
|
|
||
| snapshot, err := x.getSnapshot(chain, vote.GapNumber, true) | ||
| prevBlockHeader := chain.GetHeaderByNumber(vote.ProposedBlockInfo.Number.Uint64()-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check how vote.gap number get calculated and use the same method for calculated getEpochSwitchInfo
| verified, err := engineV2.VerifyVoteMessage(blockchain, voteMsg) | ||
| assert.False(t, verified) | ||
| assert.NotNil(t, err) | ||
| assert.Nil(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then you can delete this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this task when epochswitchinfo is not found
|
won't merge in this mainnet release due to change risk |
Proposed changes
verify from masternodes instead of snap.NextEpochCandidates (masternodes = candidates - standbys - penalties)
ref audit ticket: XFN-62
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which part of the codebase this PR will touch base on,
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that