Skip to content

Commit 5d4e10f

Browse files
committed
feat: detect if accounts have code via bytecode .size() rather than .hash()
This may help fix @ameziane's performance issue. Note: this deviates from the spec which identifies empty code using a comparison to KECCAK(()) It should be functionally equivalent.
1 parent b90b701 commit 5d4e10f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/AccountSnapshot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,6 @@ public EWord tracedCodeHash() {
281281
}
282282

283283
public boolean tracedHasCode() {
284-
return !this.tracedCodeHash().equals(EWord.of(Hash.EMPTY));
284+
return !this.deploymentStatus() && !this.code().isEmpty();
285285
}
286286
}

0 commit comments

Comments
 (0)