mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-02 15:24:01 +00:00
Fix 'value out of range' RangeDefect in block witness generation. (#2072)
* Fix 'value out of range' RangeDefect caused by large/expensive blocks/transactions during DOS period. * Clear witness cache in AccountCache persist. * Revert previous fix and force clear cache after processing each block. * Revert clear cache in process block.
This commit is contained in:
parent
14a5f46d13
commit
a147ff7553
@ -694,6 +694,10 @@ proc makeMultiKeys*(ac: AccountsCache): MultiKeysRef =
|
||||
result.add(k, v.codeTouched, multiKeys(v.storageKeys))
|
||||
result.sort()
|
||||
|
||||
# reset the witness cache after collecting the witness data
|
||||
# so it is clean before executing the next block
|
||||
ac.witnessCache.clear()
|
||||
|
||||
proc accessList*(ac: AccountsCache, address: EthAddress) {.inline.} =
|
||||
ac.savePoint.accessList.add(address)
|
||||
|
||||
|
@ -32,7 +32,7 @@ type
|
||||
MultiKeysRef* = ref MultiKeys
|
||||
|
||||
Group* = object
|
||||
first*, last*: int16
|
||||
first*, last*: int
|
||||
|
||||
BranchGroup* = object
|
||||
mask*: uint
|
||||
|
Loading…
x
Reference in New Issue
Block a user