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
Fix 'value out of range' RangeDefect in block witness generation. #2072
Changes from all commits
b37f2d3
66ec9f4
40bf10e
6e542a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ type | |
MultiKeysRef* = ref MultiKeys | ||
|
||
Group* = object | ||
first*, last*: int16 | ||
first*, last*: int | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So even with the clearing of the cache it would still be possible to hit the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, actually in the scenario which I tested we don't hit the limit when processing only a single block or clearing the cache between blocks. Having said that, I think it's worth to leave this fix in so that we don't need to worry about it in the future. 32767 isn't that large and I wonder if there might be any large blocks which could still trigger the issue when processing only a single block. |
||
|
||
BranchGroup* = object | ||
mask*: uint | ||
|
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.
We need to clear the witnessData just after collecting the keys, not during the AccountCache.persist because otherwise the data would be cleared before being accessed.