Skip to content

Commit

Permalink
Merge pull request #23 from Consensys/feature/fix-is-cleared
Browse files Browse the repository at this point in the history
Fix trielog shipping issue during selfdestruct
  • Loading branch information
garyschulte authored Jan 3, 2024
2 parents 411634d + 62ff68f commit 91c6ad5
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
releaseVersion=0.2.2-SNAPSHOT
besuVersion=23.4.1
besuVersion=23.10.4-SNAPSHOT
7 changes: 6 additions & 1 deletion src/main/java/net/consensys/shomei/trielog/TrieLogValue.java
Original file line number Diff line number Diff line change
@@ -28,7 +28,12 @@ public T getUpdated() {
}

@Override
public boolean isCleared() {
public boolean isLastStepCleared() {
return false;
}

@Override
public boolean isClearedAtLeastOnce() {
return cleared;
}
}
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ public TrieLog create(final TrieLogAccumulator accumulator, final BlockHeader bl
var codeToUpdate = accumulator.getCodeToUpdate();
var storageToUpdate = accumulator.getStorageToUpdate();

LOG.info(
LOG.debug(
"creating ZkTrieLog for block {}:{}", blockHeader.getNumber(), blockHeader.getBlockHash());

return new PluginTrieLogLayer(
@@ -247,7 +247,7 @@ public static <T> void writeInnerRlp(
} else {
writer.accept(output, value.getUpdated());
}
if (!value.isCleared()) {
if (!value.isClearedAtLeastOnce()) {
output.writeNull();
} else {
output.writeInt(1);

0 comments on commit 91c6ad5

Please sign in to comment.