IF: Bring back is_needed to avoid adding redundant QCs to blocks; enforce sensible finalizer policy in setfinalizers host function #2137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If the QC claim in the to-be-assembled block is the same (same block number and strong/weak status) as the QC claim in the previous block, then the QC should not be included in the block extension.
is_needed
was removed by IF: Simplify code path when validating a received block. #2111 due to test failure. There was actually a bug in the original use ofis_needed
. It should have been used against parent block. This PR brings backis_needed
and fixes the bug.If the sum of weights is less than threshold, the quorum will never be met. This PR asserts that the sum of the weights is greater than or equal to the threshold within the setfinalizers host function,
Resolved #2136