Conversation
|
for future claude fixes, can we link them under development of a PR? Then when we merge the PR, the issue should auto-close i did it for this one |
|
haven't looked into it but this test is failing |
…e round This commit limits block verification at any round to a single block at a time when receiving the block as a block message. This is to prevent from a malicious leader from sending many distinct blocks and overwhelming the node. Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
Fixed the tests |
| // Create a task that will verify the block in the future, after its predecessors have also been verified. | ||
| blockVerificationTask := e.createBlockVerificationTask(e.oneTimeVerifier.Wrap(block), from, vote) | ||
| // Mark the round as pending and wrap the task with a task that will cleanup the pending round after the block verification task is executed. | ||
| task := e.markPendingRoundAndCleanupAfter(md.Round, blockVerificationTask) |
There was a problem hiding this comment.
shouldnt we do this after the check below? otherwise if we receive an invalid block we will mark it as pending forever
Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
|
hmm weird failure on |
83bc3a9 to
62de7c4
Compare
| } | ||
|
|
||
| // Create a task that will verify the block in the future, after its predecessors have also been verified. | ||
| task := e.createBlockVerificationTask(e.oneTimeVerifier.Wrap(block), from, vote) |
There was a problem hiding this comment.
where do we set this block as being processing? if the leader just sends via the handleBlockMessage() then don't we still run into this issue?
There was a problem hiding this comment.
// mark in future messages while we are verifying the block
msgForRound, exists := e.futureMessages[string(from)][md.Round]
if !exists {
msgsForRound := &messagesForRound{}
msgsForRound.proposalBeingProcessed = true
e.futureMessages[string(from)][md.Round] = msgsForRound
} else {
msgForRound.proposalBeingProcessed = true
}
Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
This commit limits block verification at any round to a single block at a time when receiving the block as a block message.
This is to prevent from a malicious leader from sending many distinct blocks and overwhelming the node.