mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
Disable reverted tx optimization in block-stm validation (#891)
A reverted transaction, X, can incorrectly write to a slot, which might be read by another transaction, Y. If we skip checking states written by X, then Y might end up with reading the wrong value and we won't be able to detect this error.
This commit is contained in:
parent
47f8e8682a
commit
f96c668baf
1 changed files with 0 additions and 7 deletions
|
|
@ -269,13 +269,6 @@ func ValidateVersion(txIdx int, lastInputOutput *TxnInputOutput, versionedData *
|
|||
mvResult := versionedData.Read(rd.Path, txIdx)
|
||||
switch mvResult.Status() {
|
||||
case MVReadResultDone:
|
||||
// Having a write record for a path in MVHashmap doesn't necessarily mean there is a conflict, because MVHashmap
|
||||
// is a superset of the actual write set.
|
||||
// Check if the write record is actually in write set. If not, skip the key.
|
||||
if mvResult.depIdx >= 0 && !lastInputOutput.HasWritten(mvResult.depIdx, rd.Path) {
|
||||
continue
|
||||
}
|
||||
|
||||
valid = rd.Kind == ReadKindMap && rd.V == Version{
|
||||
TxnIndex: mvResult.depIdx,
|
||||
Incarnation: mvResult.incarnation,
|
||||
|
|
|
|||
Loading…
Reference in a new issue