diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/BlakeModexpDataOperation.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/BlakeModexpDataOperation.java index e06078d040..f61c1b8538 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/BlakeModexpDataOperation.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/BlakeModexpDataOperation.java @@ -167,7 +167,7 @@ private void traceModexpResult(Trace trace, final UnsignedByte stamp) { private void commonTrace(Trace trace, UnsignedByte stamp, int index, Bytes input, int indexMax) { trace - .stamp(stamp) + .stamp(stamp.toInteger()) .id(id) .index(UnsignedByte.of(index)) .indexMax(UnsignedByte.of(indexMax)) diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/Trace.java index 56d0f6c493..d634f17119 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/blake2fmodexpdata/Trace.java @@ -58,7 +58,7 @@ public class Trace { static List headers(int length) { return List.of( - new ColumnHeader("blake2fmodexpdata.ID", 6, length), + new ColumnHeader("blake2fmodexpdata.ID", 4, length), new ColumnHeader("blake2fmodexpdata.INDEX", 1, length), new ColumnHeader("blake2fmodexpdata.INDEX_MAX", 1, length), new ColumnHeader("blake2fmodexpdata.IS_BLAKE_DATA", 1, length), @@ -70,7 +70,7 @@ static List headers(int length) { new ColumnHeader("blake2fmodexpdata.IS_MODEXP_RESULT", 1, length), new ColumnHeader("blake2fmodexpdata.LIMB", 16, length), new ColumnHeader("blake2fmodexpdata.PHASE", 1, length), - new ColumnHeader("blake2fmodexpdata.STAMP", 1, length)); + new ColumnHeader("blake2fmodexpdata.STAMP", 2, length)); } public Trace(List buffers) { @@ -104,11 +104,9 @@ public Trace id(final long b) { filled.set(0); } - if (b >= 281474976710656L) { + if (b >= 4294967296L) { throw new IllegalArgumentException("id has invalid value (" + b + ")"); } - id.put((byte) (b >> 40)); - id.put((byte) (b >> 32)); id.put((byte) (b >> 24)); id.put((byte) (b >> 16)); id.put((byte) (b >> 8)); @@ -262,14 +260,18 @@ public Trace phase(final UnsignedByte b) { return this; } - public Trace stamp(final UnsignedByte b) { + public Trace stamp(final long b) { if (filled.get(12)) { throw new IllegalStateException("blake2fmodexpdata.STAMP already set"); } else { filled.set(12); } - stamp.put(b.toByte()); + if (b >= 1024L) { + throw new IllegalArgumentException("stamp has invalid value (" + b + ")"); + } + stamp.put((byte) (b >> 8)); + stamp.put((byte) b); return this; } @@ -335,7 +337,7 @@ public Trace validateRow() { public Trace fillAndValidateRow() { if (!filled.get(0)) { - id.position(id.position() + 6); + id.position(id.position() + 4); } if (!filled.get(1)) { @@ -383,7 +385,7 @@ public Trace fillAndValidateRow() { } if (!filled.get(12)) { - stamp.position(stamp.position() + 1); + stamp.position(stamp.position() + 2); } filled.clear(); diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/EcDataOperation.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/EcDataOperation.java index b7dcf22bc1..f5cca40f0a 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/EcDataOperation.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/EcDataOperation.java @@ -677,9 +677,9 @@ void trace(Trace trace, final int stamp, final long previousId) { .id(id) .index(isData ? i : i - nRowsData) .limb(limb.get(i)) - .totalSize(Bytes.ofUnsignedLong(getTotalSize(precompileFlag, isData))) + .totalSize(getTotalSize(precompileFlag, isData)) .phase(getPhase(precompileFlag, isData)) - .indexMax(Bytes.ofUnsignedLong(getIndexMax(precompileFlag, isData))) + .indexMax(getIndexMax(precompileFlag, isData)) .successBit(successBit) .isEcrecoverData(precompileFlag == PRC_ECRECOVER && isData) .isEcrecoverResult(precompileFlag == PRC_ECRECOVER && !isData) @@ -689,11 +689,11 @@ void trace(Trace trace, final int stamp, final long previousId) { .isEcmulResult(precompileFlag == PRC_ECMUL && !isData) .isEcpairingData(precompileFlag == PRC_ECPAIRING && isData) .isEcpairingResult(precompileFlag == PRC_ECPAIRING && !isData) - .totalPairings(Bytes.ofUnsignedLong(totalPairings)) + .totalPairings(totalPairings) .accPairings( precompileFlag == PRC_ECPAIRING && isData - ? Bytes.ofUnsignedLong(1 + i / (INDEX_MAX_ECPAIRING_DATA_MIN + 1)) - : Bytes.of(0)) + ? 1 + i / (INDEX_MAX_ECPAIRING_DATA_MIN + 1) + : 0) .internalChecksPassed(internalChecksPassed) .hurdle(hurdle.get(i)) .byteDelta( diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/Trace.java index 36062466b9..da3cc136a9 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ecdata/Trace.java @@ -123,7 +123,7 @@ public class Trace { static List headers(int length) { return List.of( - new ColumnHeader("ecdata.ACC_PAIRINGS", 32, length), + new ColumnHeader("ecdata.ACC_PAIRINGS", 2, length), new ColumnHeader("ecdata.ACCEPTABLE_PAIR_OF_POINTS_FOR_PAIRING_CIRCUIT", 1, length), new ColumnHeader("ecdata.BYTE_DELTA", 1, length), new ColumnHeader("ecdata.CIRCUIT_SELECTOR_ECADD", 1, length), @@ -147,7 +147,7 @@ static List headers(int length) { new ColumnHeader("ecdata.HURDLE", 1, length), new ColumnHeader("ecdata.ID", 4, length), new ColumnHeader("ecdata.INDEX", 2, length), - new ColumnHeader("ecdata.INDEX_MAX", 32, length), + new ColumnHeader("ecdata.INDEX_MAX", 2, length), new ColumnHeader("ecdata.INTERNAL_CHECKS_PASSED", 1, length), new ColumnHeader("ecdata.IS_ECADD_DATA", 1, length), new ColumnHeader("ecdata.IS_ECADD_RESULT", 1, length), @@ -168,8 +168,8 @@ static List headers(int length) { new ColumnHeader("ecdata.PHASE", 2, length), new ColumnHeader("ecdata.STAMP", 4, length), new ColumnHeader("ecdata.SUCCESS_BIT", 1, length), - new ColumnHeader("ecdata.TOTAL_PAIRINGS", 32, length), - new ColumnHeader("ecdata.TOTAL_SIZE", 32, length), + new ColumnHeader("ecdata.TOTAL_PAIRINGS", 2, length), + new ColumnHeader("ecdata.TOTAL_SIZE", 2, length), new ColumnHeader("ecdata.WCP_ARG1_HI", 16, length), new ColumnHeader("ecdata.WCP_ARG1_LO", 16, length), new ColumnHeader("ecdata.WCP_ARG2_HI", 16, length), @@ -244,28 +244,18 @@ public int size() { return this.currentLine; } - public Trace accPairings(final Bytes b) { + public Trace accPairings(final long b) { if (filled.get(1)) { throw new IllegalStateException("ecdata.ACC_PAIRINGS already set"); } else { filled.set(1); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "accPairings has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - accPairings.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - accPairings.put(bs.get(j)); + if (b >= 65536L) { + throw new IllegalArgumentException("accPairings has invalid value (" + b + ")"); } + accPairings.put((byte) (b >> 8)); + accPairings.put((byte) b); return this; } @@ -673,27 +663,18 @@ public Trace index(final long b) { return this; } - public Trace indexMax(final Bytes b) { + public Trace indexMax(final long b) { if (filled.get(24)) { throw new IllegalStateException("ecdata.INDEX_MAX already set"); } else { filled.set(24); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException("indexMax has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - indexMax.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - indexMax.put(bs.get(j)); + if (b >= 65536L) { + throw new IllegalArgumentException("indexMax has invalid value (" + b + ")"); } + indexMax.put((byte) (b >> 8)); + indexMax.put((byte) b); return this; } @@ -961,54 +942,34 @@ public Trace successBit(final Boolean b) { return this; } - public Trace totalPairings(final Bytes b) { + public Trace totalPairings(final long b) { if (filled.get(45)) { throw new IllegalStateException("ecdata.TOTAL_PAIRINGS already set"); } else { filled.set(45); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "totalPairings has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - totalPairings.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - totalPairings.put(bs.get(j)); + if (b >= 65536L) { + throw new IllegalArgumentException("totalPairings has invalid value (" + b + ")"); } + totalPairings.put((byte) (b >> 8)); + totalPairings.put((byte) b); return this; } - public Trace totalSize(final Bytes b) { + public Trace totalSize(final long b) { if (filled.get(46)) { throw new IllegalStateException("ecdata.TOTAL_SIZE already set"); } else { filled.set(46); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "totalSize has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - totalSize.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - totalSize.put(bs.get(j)); + if (b >= 65536L) { + throw new IllegalArgumentException("totalSize has invalid value (" + b + ")"); } + totalSize.put((byte) (b >> 8)); + totalSize.put((byte) b); return this; } @@ -1379,7 +1340,7 @@ public Trace validateRow() { public Trace fillAndValidateRow() { if (!filled.get(1)) { - accPairings.position(accPairings.position() + 32); + accPairings.position(accPairings.position() + 2); } if (!filled.get(0)) { @@ -1476,7 +1437,7 @@ public Trace fillAndValidateRow() { } if (!filled.get(24)) { - indexMax.position(indexMax.position() + 32); + indexMax.position(indexMax.position() + 2); } if (!filled.get(25)) { @@ -1560,11 +1521,11 @@ public Trace fillAndValidateRow() { } if (!filled.get(45)) { - totalPairings.position(totalPairings.position() + 32); + totalPairings.position(totalPairings.position() + 2); } if (!filled.get(46)) { - totalSize.position(totalSize.position() + 32); + totalSize.position(totalSize.position() + 2); } if (!filled.get(47)) { diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/ExtOperation.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/ExtOperation.java index e64e04d6db..53e468f58f 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/ExtOperation.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/ExtOperation.java @@ -28,7 +28,6 @@ import net.consensys.linea.zktracer.module.ext.calculator.AbstractExtCalculator; import net.consensys.linea.zktracer.opcode.OpCode; import net.consensys.linea.zktracer.types.UnsignedByte; -import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.units.bigints.UInt256; @@ -273,13 +272,13 @@ void trace(Trace trace, int stamp) { .ofJ(this.overflowJ[i]) .ofI(this.overflowI[i]) .ofRes(this.overflowRes[i]) - .ct(Bytes.of(i)) - .inst(Bytes.of(this.opCode.byteValue())) + .ct(i) + .inst(UnsignedByte.of(this.opCode.byteValue())) .oli(this.isOneLineInstruction) .bit1(this.getBit1()) .bit2(this.getBit2()) .bit3(this.getBit3()) - .stamp(Bytes.ofUnsignedLong(stamp)) + .stamp(stamp) .validateRow(); } } diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/Trace.java index 7fbf4bd49f..a39dc55903 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/ext/Trace.java @@ -155,61 +155,61 @@ public class Trace { static List headers(int length) { return List.of( - new ColumnHeader("ext.ACC_A_0", 32, length), - new ColumnHeader("ext.ACC_A_1", 32, length), - new ColumnHeader("ext.ACC_A_2", 32, length), - new ColumnHeader("ext.ACC_A_3", 32, length), - new ColumnHeader("ext.ACC_B_0", 32, length), - new ColumnHeader("ext.ACC_B_1", 32, length), - new ColumnHeader("ext.ACC_B_2", 32, length), - new ColumnHeader("ext.ACC_B_3", 32, length), - new ColumnHeader("ext.ACC_C_0", 32, length), - new ColumnHeader("ext.ACC_C_1", 32, length), - new ColumnHeader("ext.ACC_C_2", 32, length), - new ColumnHeader("ext.ACC_C_3", 32, length), - new ColumnHeader("ext.ACC_DELTA_0", 32, length), - new ColumnHeader("ext.ACC_DELTA_1", 32, length), - new ColumnHeader("ext.ACC_DELTA_2", 32, length), - new ColumnHeader("ext.ACC_DELTA_3", 32, length), - new ColumnHeader("ext.ACC_H_0", 32, length), - new ColumnHeader("ext.ACC_H_1", 32, length), - new ColumnHeader("ext.ACC_H_2", 32, length), - new ColumnHeader("ext.ACC_H_3", 32, length), - new ColumnHeader("ext.ACC_H_4", 32, length), - new ColumnHeader("ext.ACC_H_5", 32, length), - new ColumnHeader("ext.ACC_I_0", 32, length), - new ColumnHeader("ext.ACC_I_1", 32, length), - new ColumnHeader("ext.ACC_I_2", 32, length), - new ColumnHeader("ext.ACC_I_3", 32, length), - new ColumnHeader("ext.ACC_I_4", 32, length), - new ColumnHeader("ext.ACC_I_5", 32, length), - new ColumnHeader("ext.ACC_I_6", 32, length), - new ColumnHeader("ext.ACC_J_0", 32, length), - new ColumnHeader("ext.ACC_J_1", 32, length), - new ColumnHeader("ext.ACC_J_2", 32, length), - new ColumnHeader("ext.ACC_J_3", 32, length), - new ColumnHeader("ext.ACC_J_4", 32, length), - new ColumnHeader("ext.ACC_J_5", 32, length), - new ColumnHeader("ext.ACC_J_6", 32, length), - new ColumnHeader("ext.ACC_J_7", 32, length), - new ColumnHeader("ext.ACC_Q_0", 32, length), - new ColumnHeader("ext.ACC_Q_1", 32, length), - new ColumnHeader("ext.ACC_Q_2", 32, length), - new ColumnHeader("ext.ACC_Q_3", 32, length), - new ColumnHeader("ext.ACC_Q_4", 32, length), - new ColumnHeader("ext.ACC_Q_5", 32, length), - new ColumnHeader("ext.ACC_Q_6", 32, length), - new ColumnHeader("ext.ACC_Q_7", 32, length), - new ColumnHeader("ext.ACC_R_0", 32, length), - new ColumnHeader("ext.ACC_R_1", 32, length), - new ColumnHeader("ext.ACC_R_2", 32, length), - new ColumnHeader("ext.ACC_R_3", 32, length), - new ColumnHeader("ext.ARG_1_HI", 32, length), - new ColumnHeader("ext.ARG_1_LO", 32, length), - new ColumnHeader("ext.ARG_2_HI", 32, length), - new ColumnHeader("ext.ARG_2_LO", 32, length), - new ColumnHeader("ext.ARG_3_HI", 32, length), - new ColumnHeader("ext.ARG_3_LO", 32, length), + new ColumnHeader("ext.ACC_A_0", 8, length), + new ColumnHeader("ext.ACC_A_1", 8, length), + new ColumnHeader("ext.ACC_A_2", 8, length), + new ColumnHeader("ext.ACC_A_3", 8, length), + new ColumnHeader("ext.ACC_B_0", 8, length), + new ColumnHeader("ext.ACC_B_1", 8, length), + new ColumnHeader("ext.ACC_B_2", 8, length), + new ColumnHeader("ext.ACC_B_3", 8, length), + new ColumnHeader("ext.ACC_C_0", 8, length), + new ColumnHeader("ext.ACC_C_1", 8, length), + new ColumnHeader("ext.ACC_C_2", 8, length), + new ColumnHeader("ext.ACC_C_3", 8, length), + new ColumnHeader("ext.ACC_DELTA_0", 8, length), + new ColumnHeader("ext.ACC_DELTA_1", 8, length), + new ColumnHeader("ext.ACC_DELTA_2", 8, length), + new ColumnHeader("ext.ACC_DELTA_3", 8, length), + new ColumnHeader("ext.ACC_H_0", 8, length), + new ColumnHeader("ext.ACC_H_1", 8, length), + new ColumnHeader("ext.ACC_H_2", 8, length), + new ColumnHeader("ext.ACC_H_3", 8, length), + new ColumnHeader("ext.ACC_H_4", 8, length), + new ColumnHeader("ext.ACC_H_5", 8, length), + new ColumnHeader("ext.ACC_I_0", 8, length), + new ColumnHeader("ext.ACC_I_1", 8, length), + new ColumnHeader("ext.ACC_I_2", 8, length), + new ColumnHeader("ext.ACC_I_3", 8, length), + new ColumnHeader("ext.ACC_I_4", 8, length), + new ColumnHeader("ext.ACC_I_5", 8, length), + new ColumnHeader("ext.ACC_I_6", 8, length), + new ColumnHeader("ext.ACC_J_0", 8, length), + new ColumnHeader("ext.ACC_J_1", 8, length), + new ColumnHeader("ext.ACC_J_2", 8, length), + new ColumnHeader("ext.ACC_J_3", 8, length), + new ColumnHeader("ext.ACC_J_4", 8, length), + new ColumnHeader("ext.ACC_J_5", 8, length), + new ColumnHeader("ext.ACC_J_6", 8, length), + new ColumnHeader("ext.ACC_J_7", 8, length), + new ColumnHeader("ext.ACC_Q_0", 8, length), + new ColumnHeader("ext.ACC_Q_1", 8, length), + new ColumnHeader("ext.ACC_Q_2", 8, length), + new ColumnHeader("ext.ACC_Q_3", 8, length), + new ColumnHeader("ext.ACC_Q_4", 8, length), + new ColumnHeader("ext.ACC_Q_5", 8, length), + new ColumnHeader("ext.ACC_Q_6", 8, length), + new ColumnHeader("ext.ACC_Q_7", 8, length), + new ColumnHeader("ext.ACC_R_0", 8, length), + new ColumnHeader("ext.ACC_R_1", 8, length), + new ColumnHeader("ext.ACC_R_2", 8, length), + new ColumnHeader("ext.ACC_R_3", 8, length), + new ColumnHeader("ext.ARG_1_HI", 16, length), + new ColumnHeader("ext.ARG_1_LO", 16, length), + new ColumnHeader("ext.ARG_2_HI", 16, length), + new ColumnHeader("ext.ARG_2_LO", 16, length), + new ColumnHeader("ext.ARG_3_HI", 16, length), + new ColumnHeader("ext.ARG_3_LO", 16, length), new ColumnHeader("ext.BIT_1", 1, length), new ColumnHeader("ext.BIT_2", 1, length), new ColumnHeader("ext.BIT_3", 1, length), @@ -263,16 +263,16 @@ static List headers(int length) { new ColumnHeader("ext.BYTE_R_2", 1, length), new ColumnHeader("ext.BYTE_R_3", 1, length), new ColumnHeader("ext.CMP", 1, length), - new ColumnHeader("ext.CT", 32, length), - new ColumnHeader("ext.INST", 32, length), + new ColumnHeader("ext.CT", 1, length), + new ColumnHeader("ext.INST", 1, length), new ColumnHeader("ext.OF_H", 1, length), new ColumnHeader("ext.OF_I", 1, length), new ColumnHeader("ext.OF_J", 1, length), new ColumnHeader("ext.OF_RES", 1, length), new ColumnHeader("ext.OLI", 1, length), - new ColumnHeader("ext.RES_HI", 32, length), - new ColumnHeader("ext.RES_LO", 32, length), - new ColumnHeader("ext.STAMP", 32, length)); + new ColumnHeader("ext.RES_HI", 16, length), + new ColumnHeader("ext.RES_LO", 16, length), + new ColumnHeader("ext.STAMP", 4, length)); } public Trace(List buffers) { @@ -414,11 +414,11 @@ public Trace accA0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA0.put((byte) 0); } // Write bytes @@ -439,11 +439,11 @@ public Trace accA1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA1.put((byte) 0); } // Write bytes @@ -464,11 +464,11 @@ public Trace accA2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA2.put((byte) 0); } // Write bytes @@ -489,11 +489,11 @@ public Trace accA3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA3.put((byte) 0); } // Write bytes @@ -514,11 +514,11 @@ public Trace accB0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB0.put((byte) 0); } // Write bytes @@ -539,11 +539,11 @@ public Trace accB1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB1.put((byte) 0); } // Write bytes @@ -564,11 +564,11 @@ public Trace accB2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB2.put((byte) 0); } // Write bytes @@ -589,11 +589,11 @@ public Trace accB3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB3.put((byte) 0); } // Write bytes @@ -614,11 +614,11 @@ public Trace accC0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC0.put((byte) 0); } // Write bytes @@ -639,11 +639,11 @@ public Trace accC1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC1.put((byte) 0); } // Write bytes @@ -664,11 +664,11 @@ public Trace accC2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC2.put((byte) 0); } // Write bytes @@ -689,11 +689,11 @@ public Trace accC3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC3.put((byte) 0); } // Write bytes @@ -714,12 +714,12 @@ public Trace accDelta0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException( "accDelta0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accDelta0.put((byte) 0); } // Write bytes @@ -740,12 +740,12 @@ public Trace accDelta1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException( "accDelta1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accDelta1.put((byte) 0); } // Write bytes @@ -766,12 +766,12 @@ public Trace accDelta2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException( "accDelta2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accDelta2.put((byte) 0); } // Write bytes @@ -792,12 +792,12 @@ public Trace accDelta3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException( "accDelta3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accDelta3.put((byte) 0); } // Write bytes @@ -818,11 +818,11 @@ public Trace accH0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH0.put((byte) 0); } // Write bytes @@ -843,11 +843,11 @@ public Trace accH1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH1.put((byte) 0); } // Write bytes @@ -868,11 +868,11 @@ public Trace accH2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH2.put((byte) 0); } // Write bytes @@ -893,11 +893,11 @@ public Trace accH3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH3.put((byte) 0); } // Write bytes @@ -918,11 +918,11 @@ public Trace accH4(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH4 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH4.put((byte) 0); } // Write bytes @@ -943,11 +943,11 @@ public Trace accH5(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH5 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH5.put((byte) 0); } // Write bytes @@ -968,11 +968,11 @@ public Trace accI0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accI0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accI0.put((byte) 0); } // Write bytes @@ -993,11 +993,11 @@ public Trace accI1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accI1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accI1.put((byte) 0); } // Write bytes @@ -1018,11 +1018,11 @@ public Trace accI2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accI2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accI2.put((byte) 0); } // Write bytes @@ -1043,11 +1043,11 @@ public Trace accI3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accI3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accI3.put((byte) 0); } // Write bytes @@ -1068,11 +1068,11 @@ public Trace accI4(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accI4 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accI4.put((byte) 0); } // Write bytes @@ -1093,11 +1093,11 @@ public Trace accI5(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accI5 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accI5.put((byte) 0); } // Write bytes @@ -1118,11 +1118,11 @@ public Trace accI6(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accI6 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accI6.put((byte) 0); } // Write bytes @@ -1143,11 +1143,11 @@ public Trace accJ0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ0.put((byte) 0); } // Write bytes @@ -1168,11 +1168,11 @@ public Trace accJ1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ1.put((byte) 0); } // Write bytes @@ -1193,11 +1193,11 @@ public Trace accJ2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ2.put((byte) 0); } // Write bytes @@ -1218,11 +1218,11 @@ public Trace accJ3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ3.put((byte) 0); } // Write bytes @@ -1243,11 +1243,11 @@ public Trace accJ4(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ4 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ4.put((byte) 0); } // Write bytes @@ -1268,11 +1268,11 @@ public Trace accJ5(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ5 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ5.put((byte) 0); } // Write bytes @@ -1293,11 +1293,11 @@ public Trace accJ6(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ6 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ6.put((byte) 0); } // Write bytes @@ -1318,11 +1318,11 @@ public Trace accJ7(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accJ7 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accJ7.put((byte) 0); } // Write bytes @@ -1343,11 +1343,11 @@ public Trace accQ0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ0.put((byte) 0); } // Write bytes @@ -1368,11 +1368,11 @@ public Trace accQ1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ1.put((byte) 0); } // Write bytes @@ -1393,11 +1393,11 @@ public Trace accQ2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ2.put((byte) 0); } // Write bytes @@ -1418,11 +1418,11 @@ public Trace accQ3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ3.put((byte) 0); } // Write bytes @@ -1443,11 +1443,11 @@ public Trace accQ4(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ4 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ4.put((byte) 0); } // Write bytes @@ -1468,11 +1468,11 @@ public Trace accQ5(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ5 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ5.put((byte) 0); } // Write bytes @@ -1493,11 +1493,11 @@ public Trace accQ6(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ6 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ6.put((byte) 0); } // Write bytes @@ -1518,11 +1518,11 @@ public Trace accQ7(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accQ7 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accQ7.put((byte) 0); } // Write bytes @@ -1543,11 +1543,11 @@ public Trace accR0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accR0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accR0.put((byte) 0); } // Write bytes @@ -1568,11 +1568,11 @@ public Trace accR1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accR1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accR1.put((byte) 0); } // Write bytes @@ -1593,11 +1593,11 @@ public Trace accR2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accR2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accR2.put((byte) 0); } // Write bytes @@ -1618,11 +1618,11 @@ public Trace accR3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accR3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accR3.put((byte) 0); } // Write bytes @@ -1643,11 +1643,11 @@ public Trace arg1Hi(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("arg1Hi has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { arg1Hi.put((byte) 0); } // Write bytes @@ -1668,11 +1668,11 @@ public Trace arg1Lo(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("arg1Lo has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { arg1Lo.put((byte) 0); } // Write bytes @@ -1693,11 +1693,11 @@ public Trace arg2Hi(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("arg2Hi has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { arg2Hi.put((byte) 0); } // Write bytes @@ -1718,11 +1718,11 @@ public Trace arg2Lo(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("arg2Lo has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { arg2Lo.put((byte) 0); } // Write bytes @@ -1743,11 +1743,11 @@ public Trace arg3Hi(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("arg3Hi has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { arg3Hi.put((byte) 0); } // Write bytes @@ -1768,11 +1768,11 @@ public Trace arg3Lo(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("arg3Lo has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { arg3Lo.put((byte) 0); } // Write bytes @@ -2419,52 +2419,29 @@ public Trace cmp(final Boolean b) { return this; } - public Trace ct(final Bytes b) { + public Trace ct(final long b) { if (filled.get(108)) { throw new IllegalStateException("ext.CT already set"); } else { filled.set(108); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException("ct has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - ct.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - ct.put(bs.get(j)); + if (b >= 8L) { + throw new IllegalArgumentException("ct has invalid value (" + b + ")"); } + ct.put((byte) b); return this; } - public Trace inst(final Bytes b) { + public Trace inst(final UnsignedByte b) { if (filled.get(109)) { throw new IllegalStateException("ext.INST already set"); } else { filled.set(109); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException("inst has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - inst.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - inst.put(bs.get(j)); - } + inst.put(b.toByte()); return this; } @@ -2539,11 +2516,11 @@ public Trace resHi(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("resHi has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { resHi.put((byte) 0); } // Write bytes @@ -2564,11 +2541,11 @@ public Trace resLo(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException("resLo has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { resLo.put((byte) 0); } // Write bytes @@ -2579,27 +2556,20 @@ public Trace resLo(final Bytes b) { return this; } - public Trace stamp(final Bytes b) { + public Trace stamp(final long b) { if (filled.get(117)) { throw new IllegalStateException("ext.STAMP already set"); } else { filled.set(117); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException("stamp has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stamp.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stamp.put(bs.get(j)); + if (b >= 4294967296L) { + throw new IllegalArgumentException("stamp has invalid value (" + b + ")"); } + stamp.put((byte) (b >> 24)); + stamp.put((byte) (b >> 16)); + stamp.put((byte) (b >> 8)); + stamp.put((byte) b); return this; } @@ -3085,223 +3055,223 @@ public Trace validateRow() { public Trace fillAndValidateRow() { if (!filled.get(0)) { - accA0.position(accA0.position() + 32); + accA0.position(accA0.position() + 8); } if (!filled.get(1)) { - accA1.position(accA1.position() + 32); + accA1.position(accA1.position() + 8); } if (!filled.get(2)) { - accA2.position(accA2.position() + 32); + accA2.position(accA2.position() + 8); } if (!filled.get(3)) { - accA3.position(accA3.position() + 32); + accA3.position(accA3.position() + 8); } if (!filled.get(4)) { - accB0.position(accB0.position() + 32); + accB0.position(accB0.position() + 8); } if (!filled.get(5)) { - accB1.position(accB1.position() + 32); + accB1.position(accB1.position() + 8); } if (!filled.get(6)) { - accB2.position(accB2.position() + 32); + accB2.position(accB2.position() + 8); } if (!filled.get(7)) { - accB3.position(accB3.position() + 32); + accB3.position(accB3.position() + 8); } if (!filled.get(8)) { - accC0.position(accC0.position() + 32); + accC0.position(accC0.position() + 8); } if (!filled.get(9)) { - accC1.position(accC1.position() + 32); + accC1.position(accC1.position() + 8); } if (!filled.get(10)) { - accC2.position(accC2.position() + 32); + accC2.position(accC2.position() + 8); } if (!filled.get(11)) { - accC3.position(accC3.position() + 32); + accC3.position(accC3.position() + 8); } if (!filled.get(12)) { - accDelta0.position(accDelta0.position() + 32); + accDelta0.position(accDelta0.position() + 8); } if (!filled.get(13)) { - accDelta1.position(accDelta1.position() + 32); + accDelta1.position(accDelta1.position() + 8); } if (!filled.get(14)) { - accDelta2.position(accDelta2.position() + 32); + accDelta2.position(accDelta2.position() + 8); } if (!filled.get(15)) { - accDelta3.position(accDelta3.position() + 32); + accDelta3.position(accDelta3.position() + 8); } if (!filled.get(16)) { - accH0.position(accH0.position() + 32); + accH0.position(accH0.position() + 8); } if (!filled.get(17)) { - accH1.position(accH1.position() + 32); + accH1.position(accH1.position() + 8); } if (!filled.get(18)) { - accH2.position(accH2.position() + 32); + accH2.position(accH2.position() + 8); } if (!filled.get(19)) { - accH3.position(accH3.position() + 32); + accH3.position(accH3.position() + 8); } if (!filled.get(20)) { - accH4.position(accH4.position() + 32); + accH4.position(accH4.position() + 8); } if (!filled.get(21)) { - accH5.position(accH5.position() + 32); + accH5.position(accH5.position() + 8); } if (!filled.get(22)) { - accI0.position(accI0.position() + 32); + accI0.position(accI0.position() + 8); } if (!filled.get(23)) { - accI1.position(accI1.position() + 32); + accI1.position(accI1.position() + 8); } if (!filled.get(24)) { - accI2.position(accI2.position() + 32); + accI2.position(accI2.position() + 8); } if (!filled.get(25)) { - accI3.position(accI3.position() + 32); + accI3.position(accI3.position() + 8); } if (!filled.get(26)) { - accI4.position(accI4.position() + 32); + accI4.position(accI4.position() + 8); } if (!filled.get(27)) { - accI5.position(accI5.position() + 32); + accI5.position(accI5.position() + 8); } if (!filled.get(28)) { - accI6.position(accI6.position() + 32); + accI6.position(accI6.position() + 8); } if (!filled.get(29)) { - accJ0.position(accJ0.position() + 32); + accJ0.position(accJ0.position() + 8); } if (!filled.get(30)) { - accJ1.position(accJ1.position() + 32); + accJ1.position(accJ1.position() + 8); } if (!filled.get(31)) { - accJ2.position(accJ2.position() + 32); + accJ2.position(accJ2.position() + 8); } if (!filled.get(32)) { - accJ3.position(accJ3.position() + 32); + accJ3.position(accJ3.position() + 8); } if (!filled.get(33)) { - accJ4.position(accJ4.position() + 32); + accJ4.position(accJ4.position() + 8); } if (!filled.get(34)) { - accJ5.position(accJ5.position() + 32); + accJ5.position(accJ5.position() + 8); } if (!filled.get(35)) { - accJ6.position(accJ6.position() + 32); + accJ6.position(accJ6.position() + 8); } if (!filled.get(36)) { - accJ7.position(accJ7.position() + 32); + accJ7.position(accJ7.position() + 8); } if (!filled.get(37)) { - accQ0.position(accQ0.position() + 32); + accQ0.position(accQ0.position() + 8); } if (!filled.get(38)) { - accQ1.position(accQ1.position() + 32); + accQ1.position(accQ1.position() + 8); } if (!filled.get(39)) { - accQ2.position(accQ2.position() + 32); + accQ2.position(accQ2.position() + 8); } if (!filled.get(40)) { - accQ3.position(accQ3.position() + 32); + accQ3.position(accQ3.position() + 8); } if (!filled.get(41)) { - accQ4.position(accQ4.position() + 32); + accQ4.position(accQ4.position() + 8); } if (!filled.get(42)) { - accQ5.position(accQ5.position() + 32); + accQ5.position(accQ5.position() + 8); } if (!filled.get(43)) { - accQ6.position(accQ6.position() + 32); + accQ6.position(accQ6.position() + 8); } if (!filled.get(44)) { - accQ7.position(accQ7.position() + 32); + accQ7.position(accQ7.position() + 8); } if (!filled.get(45)) { - accR0.position(accR0.position() + 32); + accR0.position(accR0.position() + 8); } if (!filled.get(46)) { - accR1.position(accR1.position() + 32); + accR1.position(accR1.position() + 8); } if (!filled.get(47)) { - accR2.position(accR2.position() + 32); + accR2.position(accR2.position() + 8); } if (!filled.get(48)) { - accR3.position(accR3.position() + 32); + accR3.position(accR3.position() + 8); } if (!filled.get(49)) { - arg1Hi.position(arg1Hi.position() + 32); + arg1Hi.position(arg1Hi.position() + 16); } if (!filled.get(50)) { - arg1Lo.position(arg1Lo.position() + 32); + arg1Lo.position(arg1Lo.position() + 16); } if (!filled.get(51)) { - arg2Hi.position(arg2Hi.position() + 32); + arg2Hi.position(arg2Hi.position() + 16); } if (!filled.get(52)) { - arg2Lo.position(arg2Lo.position() + 32); + arg2Lo.position(arg2Lo.position() + 16); } if (!filled.get(53)) { - arg3Hi.position(arg3Hi.position() + 32); + arg3Hi.position(arg3Hi.position() + 16); } if (!filled.get(54)) { - arg3Lo.position(arg3Lo.position() + 32); + arg3Lo.position(arg3Lo.position() + 16); } if (!filled.get(55)) { @@ -3517,11 +3487,11 @@ public Trace fillAndValidateRow() { } if (!filled.get(108)) { - ct.position(ct.position() + 32); + ct.position(ct.position() + 1); } if (!filled.get(109)) { - inst.position(inst.position() + 32); + inst.position(inst.position() + 1); } if (!filled.get(110)) { @@ -3545,15 +3515,15 @@ public Trace fillAndValidateRow() { } if (!filled.get(115)) { - resHi.position(resHi.position() + 32); + resHi.position(resHi.position() + 16); } if (!filled.get(116)) { - resLo.position(resLo.position() + 32); + resLo.position(resLo.position() + 16); } if (!filled.get(117)) { - stamp.position(stamp.position() + 32); + stamp.position(stamp.position() + 4); } filled.clear(); diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/GasOperation.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/GasOperation.java index 9d63a58ae2..9e5ef6e3e1 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/GasOperation.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/GasOperation.java @@ -87,7 +87,7 @@ public void trace(int stamp, Trace trace) { .first(i == 0) .ct(i) .ctMax(CT_MAX) - .gasActual(gasParameters.gasActual().longValue()) + .gasActual(bigIntegerToBytes(gasParameters.gasActual())) .gasCost(bigIntegerToBytes(gasParameters.gasCost())) .exceptionsAhoy(gasParameters.xahoy()) .outOfGasException(gasParameters.oogx()) diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/Trace.java index 295346d56b..0a7327407e 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/gas/Trace.java @@ -53,7 +53,7 @@ static List headers(int length) { new ColumnHeader("gas.CT_MAX", 1, length), new ColumnHeader("gas.EXCEPTIONS_AHOY", 1, length), new ColumnHeader("gas.FIRST", 1, length), - new ColumnHeader("gas.GAS_ACTUAL", 4, length), + new ColumnHeader("gas.GAS_ACTUAL", 8, length), new ColumnHeader("gas.GAS_COST", 8, length), new ColumnHeader("gas.INPUTS_AND_OUTPUTS_ARE_MEANINGFUL", 1, length), new ColumnHeader("gas.OUT_OF_GAS_EXCEPTION", 1, length), @@ -140,20 +140,28 @@ public Trace first(final Boolean b) { return this; } - public Trace gasActual(final long b) { + public Trace gasActual(final Bytes b) { if (filled.get(4)) { throw new IllegalStateException("gas.GAS_ACTUAL already set"); } else { filled.set(4); } - if (b >= 4294967296L) { - throw new IllegalArgumentException("gasActual has invalid value (" + b + ")"); + // Trim array to size + Bytes bs = b.trimLeadingZeros(); + // Sanity check against expected width + if (bs.bitLength() > 64) { + throw new IllegalArgumentException( + "gasActual has invalid width (" + bs.bitLength() + "bits)"); + } + // Write padding (if necessary) + for (int i = bs.size(); i < 8; i++) { + gasActual.put((byte) 0); + } + // Write bytes + for (int j = 0; j < bs.size(); j++) { + gasActual.put(bs.get(j)); } - gasActual.put((byte) (b >> 24)); - gasActual.put((byte) (b >> 16)); - gasActual.put((byte) (b >> 8)); - gasActual.put((byte) b); return this; } @@ -356,7 +364,7 @@ public Trace fillAndValidateRow() { } if (!filled.get(4)) { - gasActual.position(gasActual.position() + 4); + gasActual.position(gasActual.position() + 8); } if (!filled.get(5)) { diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Trace.java index b817a37e17..77cdf658ae 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/Trace.java @@ -50,16 +50,16 @@ public class Trace { balanceXorByteCodeAddressLoXorExpData2XorHashInfoKeccakLoXorStorageKeyHiXorFromAddressLo; private final MappedByteBuffer callDataOffsetXorMmuSize; private final MappedByteBuffer callDataSizeXorMmuSrcId; - private final MappedByteBuffer callStackDepth; + private final MappedByteBuffer callStackDepthXorStackItemHeight1; private final MappedByteBuffer callerContextNumber; private final MappedByteBuffer codeFragmentIndex; private final MappedByteBuffer codeFragmentIndexXorAccountDeploymentNumberXorExpInstXorPrcCallerGasXorDeploymentNumberXorCoinbaseAddressHi; - private final MappedByteBuffer codeHashHiNewXorExpData5XorValueCurrLoXorValue; + private final MappedByteBuffer codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue; private final MappedByteBuffer codeHashHiXorCallValueXorExpData4XorPushValueLoXorValueCurrHiXorToAddressLo; - private final MappedByteBuffer codeHashLoNewXorMmuLimb2XorValueNextLo; - private final MappedByteBuffer codeHashLoXorMmuLimb1XorValueNextHi; + private final MappedByteBuffer codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo; + private final MappedByteBuffer codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi; private final MappedByteBuffer codeSizeNewXorByteCodeCodeFragmentIndexXorMmuExoSumXorPrcCdsXorInitCodeSize; private final MappedByteBuffer @@ -188,20 +188,20 @@ public class Trace { private final MappedByteBuffer returnFromMessageCallWillTouchRamXorStackItemPop3; private final MappedByteBuffer returnFromMessageCallWontTouchRamXorStackItemPop4; private final MappedByteBuffer rlpaddrDepAddrHiXorCallDataContextNumberXorMmuRefSize; - private final MappedByteBuffer rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi; + private final MappedByteBuffer + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi; private final MappedByteBuffer rlpaddrFlagXorStpFlagXorCallSmcSuccessCallerWillRevertXorDecFlag3XorWarmthNew; - private final MappedByteBuffer rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo; - private final MappedByteBuffer rlpaddrKecLoXorMmuTgtOffsetLo; + private final MappedByteBuffer rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo; + private final MappedByteBuffer rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2; private final MappedByteBuffer rlpaddrRecipe; - private final MappedByteBuffer rlpaddrSaltHiXorMxpGasMxp; - private final MappedByteBuffer rlpaddrSaltLoXorMxpOffset1Hi; + private final MappedByteBuffer rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3; + private final MappedByteBuffer rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4; private final MappedByteBuffer romlexFlagXorStpOogxXorCallSmcSuccessCallerWontRevertXorDecFlag4; private final MappedByteBuffer selfdestructExceptionXorStaticx; private final MappedByteBuffer selfdestructWillRevertXorStaticFlag; private final MappedByteBuffer selfdestructWontRevertAlreadyMarkedXorStoFlag; private final MappedByteBuffer selfdestructWontRevertNotYetMarkedXorSux; - private final MappedByteBuffer stackItemHeight1; private final MappedByteBuffer stackItemHeight2; private final MappedByteBuffer stackItemHeight3; private final MappedByteBuffer stackItemHeight4; @@ -209,14 +209,6 @@ public class Trace { private final MappedByteBuffer stackItemStamp2; private final MappedByteBuffer stackItemStamp3; private final MappedByteBuffer stackItemStamp4; - private final MappedByteBuffer stackItemValueHi1; - private final MappedByteBuffer stackItemValueHi2; - private final MappedByteBuffer stackItemValueHi3; - private final MappedByteBuffer stackItemValueHi4; - private final MappedByteBuffer stackItemValueLo1; - private final MappedByteBuffer stackItemValueLo2; - private final MappedByteBuffer stackItemValueLo3; - private final MappedByteBuffer stackItemValueLo4; private final MappedByteBuffer stpGasHi; private final MappedByteBuffer stpGasLo; private final MappedByteBuffer stpGasUpfrontGasCostXorGasLeftover; @@ -259,7 +251,7 @@ static List headers(int length) { length), new ColumnHeader("hub.CALL_DATA_OFFSET_xor_MMU_SIZE", 4, length), new ColumnHeader("hub.CALL_DATA_SIZE_xor_MMU_SRC_ID", 4, length), - new ColumnHeader("hub.CALL_STACK_DEPTH", 2, length), + new ColumnHeader("hub.CALL_STACK_DEPTH_xor_STACK_ITEM_HEIGHT_1", 2, length), new ColumnHeader("hub.CALLER_CONTEXT_NUMBER", 4, length), new ColumnHeader("hub.CODE_FRAGMENT_INDEX", 4, length), new ColumnHeader( @@ -267,13 +259,21 @@ static List headers(int length) { 4, length), new ColumnHeader( - "hub.CODE_HASH_HI_NEW_xor_EXP_DATA_5_xor_VALUE_CURR_LO_xor_VALUE", 16, length), + "hub.CODE_HASH_HI_NEW_xor_EXP_DATA_5_xor_STACK_ITEM_VALUE_HI_1_xor_VALUE_CURR_LO_xor_VALUE", + 16, + length), new ColumnHeader( "hub.CODE_HASH_HI_xor_CALL_VALUE_xor_EXP_DATA_4_xor_PUSH_VALUE_LO_xor_VALUE_CURR_HI_xor_TO_ADDRESS_LO", 16, length), - new ColumnHeader("hub.CODE_HASH_LO_NEW_xor_MMU_LIMB_2_xor_VALUE_NEXT_LO", 16, length), - new ColumnHeader("hub.CODE_HASH_LO_xor_MMU_LIMB_1_xor_VALUE_NEXT_HI", 16, length), + new ColumnHeader( + "hub.CODE_HASH_LO_NEW_xor_MMU_LIMB_2_xor_STACK_ITEM_VALUE_HI_3_xor_VALUE_NEXT_LO", + 16, + length), + new ColumnHeader( + "hub.CODE_HASH_LO_xor_MMU_LIMB_1_xor_STACK_ITEM_VALUE_HI_2_xor_VALUE_NEXT_HI", + 16, + length), new ColumnHeader( "hub.CODE_SIZE_NEW_xor_BYTE_CODE_CODE_FRAGMENT_INDEX_xor_MMU_EXO_SUM_xor_PRC_CDS_xor_INIT_CODE_SIZE", 4, @@ -446,16 +446,24 @@ static List headers(int length) { new ColumnHeader( "hub.RLPADDR_DEP_ADDR_HI_xor_CALL_DATA_CONTEXT_NUMBER_xor_MMU_REF_SIZE", 4, length), new ColumnHeader( - "hub.RLPADDR_DEP_ADDR_LO_xor_MMU_SRC_OFFSET_HI_xor_VALUE_ORIG_HI", 16, length), + "hub.RLPADDR_DEP_ADDR_LO_xor_MMU_SRC_OFFSET_HI_xor_STACK_ITEM_VALUE_HI_4_xor_VALUE_ORIG_HI", + 16, + length), new ColumnHeader( "hub.RLPADDR_FLAG_xor_STP_FLAG_xor_CALL_SMC_SUCCESS_CALLER_WILL_REVERT_xor_DEC_FLAG_3_xor_WARMTH_NEW", 1, length), - new ColumnHeader("hub.RLPADDR_KEC_HI_xor_MMU_SRC_OFFSET_LO_xor_VALUE_ORIG_LO", 16, length), - new ColumnHeader("hub.RLPADDR_KEC_LO_xor_MMU_TGT_OFFSET_LO", 16, length), + new ColumnHeader( + "hub.RLPADDR_KEC_HI_xor_MMU_SRC_OFFSET_LO_xor_STACK_ITEM_VALUE_LO_1_xor_VALUE_ORIG_LO", + 16, + length), + new ColumnHeader( + "hub.RLPADDR_KEC_LO_xor_MMU_TGT_OFFSET_LO_xor_STACK_ITEM_VALUE_LO_2", 16, length), new ColumnHeader("hub.RLPADDR_RECIPE", 1, length), - new ColumnHeader("hub.RLPADDR_SALT_HI_xor_MXP_GAS_MXP", 16, length), - new ColumnHeader("hub.RLPADDR_SALT_LO_xor_MXP_OFFSET_1_HI", 16, length), + new ColumnHeader( + "hub.RLPADDR_SALT_HI_xor_MXP_GAS_MXP_xor_STACK_ITEM_VALUE_LO_3", 16, length), + new ColumnHeader( + "hub.RLPADDR_SALT_LO_xor_MXP_OFFSET_1_HI_xor_STACK_ITEM_VALUE_LO_4", 16, length), new ColumnHeader( "hub.ROMLEX_FLAG_xor_STP_OOGX_xor_CALL_SMC_SUCCESS_CALLER_WONT_REVERT_xor_DEC_FLAG_4", 1, @@ -464,22 +472,13 @@ static List headers(int length) { new ColumnHeader("hub.SELFDESTRUCT_WILL_REVERT_xor_STATIC_FLAG", 1, length), new ColumnHeader("hub.SELFDESTRUCT_WONT_REVERT_ALREADY_MARKED_xor_STO_FLAG", 1, length), new ColumnHeader("hub.SELFDESTRUCT_WONT_REVERT_NOT_YET_MARKED_xor_SUX", 1, length), - new ColumnHeader("hub.STACK_ITEM_HEIGHT_1", 32, length), - new ColumnHeader("hub.STACK_ITEM_HEIGHT_2", 32, length), - new ColumnHeader("hub.STACK_ITEM_HEIGHT_3", 32, length), - new ColumnHeader("hub.STACK_ITEM_HEIGHT_4", 32, length), - new ColumnHeader("hub.STACK_ITEM_STAMP_1", 32, length), - new ColumnHeader("hub.STACK_ITEM_STAMP_2", 32, length), - new ColumnHeader("hub.STACK_ITEM_STAMP_3", 32, length), - new ColumnHeader("hub.STACK_ITEM_STAMP_4", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_HI_1", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_HI_2", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_HI_3", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_HI_4", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_LO_1", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_LO_2", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_LO_3", 32, length), - new ColumnHeader("hub.STACK_ITEM_VALUE_LO_4", 32, length), + new ColumnHeader("hub.STACK_ITEM_HEIGHT_2", 2, length), + new ColumnHeader("hub.STACK_ITEM_HEIGHT_3", 2, length), + new ColumnHeader("hub.STACK_ITEM_HEIGHT_4", 2, length), + new ColumnHeader("hub.STACK_ITEM_STAMP_1", 5, length), + new ColumnHeader("hub.STACK_ITEM_STAMP_2", 5, length), + new ColumnHeader("hub.STACK_ITEM_STAMP_3", 5, length), + new ColumnHeader("hub.STACK_ITEM_STAMP_4", 5, length), new ColumnHeader("hub.STP_GAS_HI", 16, length), new ColumnHeader("hub.STP_GAS_LO", 16, length), new ColumnHeader("hub.STP_GAS_UPFRONT_GAS_COST_xor_GAS_LEFTOVER", 8, length), @@ -518,17 +517,17 @@ public Trace(List buffers) { buffers.get(5); this.callDataOffsetXorMmuSize = buffers.get(6); this.callDataSizeXorMmuSrcId = buffers.get(7); - this.callStackDepth = buffers.get(8); + this.callStackDepthXorStackItemHeight1 = buffers.get(8); this.callerContextNumber = buffers.get(9); this.codeFragmentIndex = buffers.get(10); this .codeFragmentIndexXorAccountDeploymentNumberXorExpInstXorPrcCallerGasXorDeploymentNumberXorCoinbaseAddressHi = buffers.get(11); - this.codeHashHiNewXorExpData5XorValueCurrLoXorValue = buffers.get(12); + this.codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue = buffers.get(12); this.codeHashHiXorCallValueXorExpData4XorPushValueLoXorValueCurrHiXorToAddressLo = buffers.get(13); - this.codeHashLoNewXorMmuLimb2XorValueNextLo = buffers.get(14); - this.codeHashLoXorMmuLimb1XorValueNextHi = buffers.get(15); + this.codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo = buffers.get(14); + this.codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi = buffers.get(15); this.codeSizeNewXorByteCodeCodeFragmentIndexXorMmuExoSumXorPrcCdsXorInitCodeSize = buffers.get(16); this.codeSizeXorByteCodeAddressHiXorMmuAuxIdXorPrcCdoXorDeploymentNumberInftyXorFromAddressHi = @@ -659,54 +658,45 @@ public Trace(List buffers) { this.returnFromMessageCallWillTouchRamXorStackItemPop3 = buffers.get(126); this.returnFromMessageCallWontTouchRamXorStackItemPop4 = buffers.get(127); this.rlpaddrDepAddrHiXorCallDataContextNumberXorMmuRefSize = buffers.get(128); - this.rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi = buffers.get(129); + this.rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi = buffers.get(129); this.rlpaddrFlagXorStpFlagXorCallSmcSuccessCallerWillRevertXorDecFlag3XorWarmthNew = buffers.get(130); - this.rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo = buffers.get(131); - this.rlpaddrKecLoXorMmuTgtOffsetLo = buffers.get(132); + this.rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo = buffers.get(131); + this.rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2 = buffers.get(132); this.rlpaddrRecipe = buffers.get(133); - this.rlpaddrSaltHiXorMxpGasMxp = buffers.get(134); - this.rlpaddrSaltLoXorMxpOffset1Hi = buffers.get(135); + this.rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3 = buffers.get(134); + this.rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4 = buffers.get(135); this.romlexFlagXorStpOogxXorCallSmcSuccessCallerWontRevertXorDecFlag4 = buffers.get(136); this.selfdestructExceptionXorStaticx = buffers.get(137); this.selfdestructWillRevertXorStaticFlag = buffers.get(138); this.selfdestructWontRevertAlreadyMarkedXorStoFlag = buffers.get(139); this.selfdestructWontRevertNotYetMarkedXorSux = buffers.get(140); - this.stackItemHeight1 = buffers.get(141); - this.stackItemHeight2 = buffers.get(142); - this.stackItemHeight3 = buffers.get(143); - this.stackItemHeight4 = buffers.get(144); - this.stackItemStamp1 = buffers.get(145); - this.stackItemStamp2 = buffers.get(146); - this.stackItemStamp3 = buffers.get(147); - this.stackItemStamp4 = buffers.get(148); - this.stackItemValueHi1 = buffers.get(149); - this.stackItemValueHi2 = buffers.get(150); - this.stackItemValueHi3 = buffers.get(151); - this.stackItemValueHi4 = buffers.get(152); - this.stackItemValueLo1 = buffers.get(153); - this.stackItemValueLo2 = buffers.get(154); - this.stackItemValueLo3 = buffers.get(155); - this.stackItemValueLo4 = buffers.get(156); - this.stpGasHi = buffers.get(157); - this.stpGasLo = buffers.get(158); - this.stpGasUpfrontGasCostXorGasLeftover = buffers.get(159); - this.stpValueHi = buffers.get(160); - this.stpValueLo = buffers.get(161); - this.subStamp = buffers.get(162); - this.swapFlag = buffers.get(163); - this.trmFlagXorStpWarmthXorCreateAbortXorDupFlag = buffers.get(164); - this.trmRawAddressHiXorMxpOffset1Lo = buffers.get(165); - this.twoLineInstruction = buffers.get(166); - this.txExec = buffers.get(167); - this.txFinl = buffers.get(168); - this.txInit = buffers.get(169); - this.txSkip = buffers.get(170); - this.txWarm = buffers.get(171); - this.txnFlag = buffers.get(172); - this.warmthNewXorCreateEmptyInitCodeWontRevertXorHaltFlag = buffers.get(173); - this.warmthXorCreateEmptyInitCodeWillRevertXorExtFlag = buffers.get(174); - this.wcpFlag = buffers.get(175); + this.stackItemHeight2 = buffers.get(141); + this.stackItemHeight3 = buffers.get(142); + this.stackItemHeight4 = buffers.get(143); + this.stackItemStamp1 = buffers.get(144); + this.stackItemStamp2 = buffers.get(145); + this.stackItemStamp3 = buffers.get(146); + this.stackItemStamp4 = buffers.get(147); + this.stpGasHi = buffers.get(148); + this.stpGasLo = buffers.get(149); + this.stpGasUpfrontGasCostXorGasLeftover = buffers.get(150); + this.stpValueHi = buffers.get(151); + this.stpValueLo = buffers.get(152); + this.subStamp = buffers.get(153); + this.swapFlag = buffers.get(154); + this.trmFlagXorStpWarmthXorCreateAbortXorDupFlag = buffers.get(155); + this.trmRawAddressHiXorMxpOffset1Lo = buffers.get(156); + this.twoLineInstruction = buffers.get(157); + this.txExec = buffers.get(158); + this.txFinl = buffers.get(159); + this.txInit = buffers.get(160); + this.txSkip = buffers.get(161); + this.txWarm = buffers.get(162); + this.txnFlag = buffers.get(163); + this.warmthNewXorCreateEmptyInitCodeWontRevertXorHaltFlag = buffers.get(164); + this.warmthXorCreateEmptyInitCodeWillRevertXorExtFlag = buffers.get(165); + this.wcpFlag = buffers.get(166); } public int size() { @@ -1186,10 +1176,10 @@ public Trace nonStackRows(final long b) { } public Trace pAccountAddressHi(final long b) { - if (filled.get(101)) { + if (filled.get(104)) { throw new IllegalStateException("hub.account/ADDRESS_HI already set"); } else { - filled.set(101); + filled.set(104); } if (b >= 4294967296L) { @@ -1211,10 +1201,10 @@ public Trace pAccountAddressHi(final long b) { } public Trace pAccountAddressLo(final Bytes b) { - if (filled.get(126)) { + if (filled.get(133)) { throw new IllegalStateException("hub.account/ADDRESS_LO already set"); } else { - filled.set(126); + filled.set(133); } // Trim array to size @@ -1241,10 +1231,10 @@ public Trace pAccountAddressLo(final Bytes b) { } public Trace pAccountBalance(final Bytes b) { - if (filled.get(127)) { + if (filled.get(134)) { throw new IllegalStateException("hub.account/BALANCE already set"); } else { - filled.set(127); + filled.set(134); } // Trim array to size @@ -1271,10 +1261,10 @@ public Trace pAccountBalance(final Bytes b) { } public Trace pAccountBalanceNew(final Bytes b) { - if (filled.get(128)) { + if (filled.get(135)) { throw new IllegalStateException("hub.account/BALANCE_NEW already set"); } else { - filled.set(128); + filled.set(135); } // Trim array to size @@ -1301,10 +1291,10 @@ public Trace pAccountBalanceNew(final Bytes b) { } public Trace pAccountCodeFragmentIndex(final long b) { - if (filled.get(102)) { + if (filled.get(105)) { throw new IllegalStateException("hub.account/CODE_FRAGMENT_INDEX already set"); } else { - filled.set(102); + filled.set(105); } if (b >= 4294967296L) { @@ -1326,10 +1316,10 @@ public Trace pAccountCodeFragmentIndex(final long b) { } public Trace pAccountCodeHashHi(final Bytes b) { - if (filled.get(129)) { + if (filled.get(136)) { throw new IllegalStateException("hub.account/CODE_HASH_HI already set"); } else { - filled.set(129); + filled.set(136); } // Trim array to size @@ -1354,10 +1344,10 @@ public Trace pAccountCodeHashHi(final Bytes b) { } public Trace pAccountCodeHashHiNew(final Bytes b) { - if (filled.get(130)) { + if (filled.get(137)) { throw new IllegalStateException("hub.account/CODE_HASH_HI_NEW already set"); } else { - filled.set(130); + filled.set(137); } // Trim array to size @@ -1365,27 +1355,27 @@ public Trace pAccountCodeHashHiNew(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashHiNewXorExpData5XorValueCurrLoXorValue has invalid width (" + "codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put((byte) 0); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put(bs.get(j)); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put(bs.get(j)); } return this; } public Trace pAccountCodeHashLo(final Bytes b) { - if (filled.get(131)) { + if (filled.get(138)) { throw new IllegalStateException("hub.account/CODE_HASH_LO already set"); } else { - filled.set(131); + filled.set(138); } // Trim array to size @@ -1393,25 +1383,27 @@ public Trace pAccountCodeHashLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashLoXorMmuLimb1XorValueNextHi has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashLoXorMmuLimb1XorValueNextHi.put((byte) 0); + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashLoXorMmuLimb1XorValueNextHi.put(bs.get(j)); + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put(bs.get(j)); } return this; } public Trace pAccountCodeHashLoNew(final Bytes b) { - if (filled.get(132)) { + if (filled.get(139)) { throw new IllegalStateException("hub.account/CODE_HASH_LO_NEW already set"); } else { - filled.set(132); + filled.set(139); } // Trim array to size @@ -1419,25 +1411,27 @@ public Trace pAccountCodeHashLoNew(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashLoNewXorMmuLimb2XorValueNextLo has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashLoNewXorMmuLimb2XorValueNextLo.put((byte) 0); + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashLoNewXorMmuLimb2XorValueNextLo.put(bs.get(j)); + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put(bs.get(j)); } return this; } public Trace pAccountCodeSize(final long b) { - if (filled.get(103)) { + if (filled.get(106)) { throw new IllegalStateException("hub.account/CODE_SIZE already set"); } else { - filled.set(103); + filled.set(106); } if (b >= 4294967296L) { @@ -1459,10 +1453,10 @@ public Trace pAccountCodeSize(final long b) { } public Trace pAccountCodeSizeNew(final long b) { - if (filled.get(104)) { + if (filled.get(107)) { throw new IllegalStateException("hub.account/CODE_SIZE_NEW already set"); } else { - filled.set(104); + filled.set(107); } if (b >= 4294967296L) { @@ -1483,10 +1477,10 @@ public Trace pAccountCodeSizeNew(final long b) { } public Trace pAccountDeploymentNumber(final long b) { - if (filled.get(105)) { + if (filled.get(108)) { throw new IllegalStateException("hub.account/DEPLOYMENT_NUMBER already set"); } else { - filled.set(105); + filled.set(108); } if (b >= 4294967296L) { @@ -1507,10 +1501,10 @@ public Trace pAccountDeploymentNumber(final long b) { } public Trace pAccountDeploymentNumberInfty(final long b) { - if (filled.get(106)) { + if (filled.get(109)) { throw new IllegalStateException("hub.account/DEPLOYMENT_NUMBER_INFTY already set"); } else { - filled.set(106); + filled.set(109); } if (b >= 4294967296L) { @@ -1528,10 +1522,10 @@ public Trace pAccountDeploymentNumberInfty(final long b) { } public Trace pAccountDeploymentNumberNew(final long b) { - if (filled.get(107)) { + if (filled.get(110)) { throw new IllegalStateException("hub.account/DEPLOYMENT_NUMBER_NEW already set"); } else { - filled.set(107); + filled.set(110); } if (b >= 4294967296L) { @@ -1678,10 +1672,10 @@ public Trace pAccountMarkedForSelfdestructNew(final Boolean b) { } public Trace pAccountNonce(final Bytes b) { - if (filled.get(117)) { + if (filled.get(124)) { throw new IllegalStateException("hub.account/NONCE already set"); } else { - filled.set(117); + filled.set(124); } // Trim array to size @@ -1704,10 +1698,10 @@ public Trace pAccountNonce(final Bytes b) { } public Trace pAccountNonceNew(final Bytes b) { - if (filled.get(118)) { + if (filled.get(125)) { throw new IllegalStateException("hub.account/NONCE_NEW already set"); } else { - filled.set(118); + filled.set(125); } // Trim array to size @@ -1732,10 +1726,10 @@ public Trace pAccountNonceNew(final Bytes b) { } public Trace pAccountRlpaddrDepAddrHi(final long b) { - if (filled.get(108)) { + if (filled.get(111)) { throw new IllegalStateException("hub.account/RLPADDR_DEP_ADDR_HI already set"); } else { - filled.set(108); + filled.set(111); } if (b >= 4294967296L) { @@ -1751,10 +1745,10 @@ public Trace pAccountRlpaddrDepAddrHi(final long b) { } public Trace pAccountRlpaddrDepAddrLo(final Bytes b) { - if (filled.get(133)) { + if (filled.get(140)) { throw new IllegalStateException("hub.account/RLPADDR_DEP_ADDR_LO already set"); } else { - filled.set(133); + filled.set(140); } // Trim array to size @@ -1762,17 +1756,17 @@ public Trace pAccountRlpaddrDepAddrLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi has invalid width (" + "rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.put((byte) 0); + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.put(bs.get(j)); + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put(bs.get(j)); } return this; @@ -1792,10 +1786,10 @@ public Trace pAccountRlpaddrFlag(final Boolean b) { } public Trace pAccountRlpaddrKecHi(final Bytes b) { - if (filled.get(134)) { + if (filled.get(141)) { throw new IllegalStateException("hub.account/RLPADDR_KEC_HI already set"); } else { - filled.set(134); + filled.set(141); } // Trim array to size @@ -1803,27 +1797,27 @@ public Trace pAccountRlpaddrKecHi(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo has invalid width (" + "rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.put((byte) 0); + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.put(bs.get(j)); + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put(bs.get(j)); } return this; } public Trace pAccountRlpaddrKecLo(final Bytes b) { - if (filled.get(135)) { + if (filled.get(142)) { throw new IllegalStateException("hub.account/RLPADDR_KEC_LO already set"); } else { - filled.set(135); + filled.set(142); } // Trim array to size @@ -1831,15 +1825,17 @@ public Trace pAccountRlpaddrKecLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrKecLoXorMmuTgtOffsetLo has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrKecLoXorMmuTgtOffsetLo.put((byte) 0); + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrKecLoXorMmuTgtOffsetLo.put(bs.get(j)); + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.put(bs.get(j)); } return this; @@ -1861,10 +1857,10 @@ public Trace pAccountRlpaddrRecipe(final long b) { } public Trace pAccountRlpaddrSaltHi(final Bytes b) { - if (filled.get(136)) { + if (filled.get(143)) { throw new IllegalStateException("hub.account/RLPADDR_SALT_HI already set"); } else { - filled.set(136); + filled.set(143); } // Trim array to size @@ -1872,25 +1868,27 @@ public Trace pAccountRlpaddrSaltHi(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrSaltHiXorMxpGasMxp has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrSaltHiXorMxpGasMxp.put((byte) 0); + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrSaltHiXorMxpGasMxp.put(bs.get(j)); + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.put(bs.get(j)); } return this; } public Trace pAccountRlpaddrSaltLo(final Bytes b) { - if (filled.get(137)) { + if (filled.get(144)) { throw new IllegalStateException("hub.account/RLPADDR_SALT_LO already set"); } else { - filled.set(137); + filled.set(144); } // Trim array to size @@ -1898,15 +1896,17 @@ public Trace pAccountRlpaddrSaltLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrSaltLoXorMxpOffset1Hi has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrSaltLoXorMxpOffset1Hi.put((byte) 0); + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrSaltLoXorMxpOffset1Hi.put(bs.get(j)); + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.put(bs.get(j)); } return this; @@ -1937,10 +1937,10 @@ public Trace pAccountTrmFlag(final Boolean b) { } public Trace pAccountTrmRawAddressHi(final Bytes b) { - if (filled.get(138)) { + if (filled.get(145)) { throw new IllegalStateException("hub.account/TRM_RAW_ADDRESS_HI already set"); } else { - filled.set(138); + filled.set(145); } // Trim array to size @@ -1987,10 +1987,10 @@ public Trace pAccountWarmthNew(final Boolean b) { } public Trace pContextAccountAddressHi(final long b) { - if (filled.get(101)) { + if (filled.get(104)) { throw new IllegalStateException("hub.context/ACCOUNT_ADDRESS_HI already set"); } else { - filled.set(101); + filled.set(104); } if (b >= 4294967296L) { @@ -2012,10 +2012,10 @@ public Trace pContextAccountAddressHi(final long b) { } public Trace pContextAccountAddressLo(final Bytes b) { - if (filled.get(126)) { + if (filled.get(133)) { throw new IllegalStateException("hub.context/ACCOUNT_ADDRESS_LO already set"); } else { - filled.set(126); + filled.set(133); } // Trim array to size @@ -2042,10 +2042,10 @@ public Trace pContextAccountAddressLo(final Bytes b) { } public Trace pContextAccountDeploymentNumber(final long b) { - if (filled.get(102)) { + if (filled.get(105)) { throw new IllegalStateException("hub.context/ACCOUNT_DEPLOYMENT_NUMBER already set"); } else { - filled.set(102); + filled.set(105); } if (b >= 4294967296L) { @@ -2067,10 +2067,10 @@ public Trace pContextAccountDeploymentNumber(final long b) { } public Trace pContextByteCodeAddressHi(final long b) { - if (filled.get(103)) { + if (filled.get(106)) { throw new IllegalStateException("hub.context/BYTE_CODE_ADDRESS_HI already set"); } else { - filled.set(103); + filled.set(106); } if (b >= 4294967296L) { @@ -2092,10 +2092,10 @@ public Trace pContextByteCodeAddressHi(final long b) { } public Trace pContextByteCodeAddressLo(final Bytes b) { - if (filled.get(127)) { + if (filled.get(134)) { throw new IllegalStateException("hub.context/BYTE_CODE_ADDRESS_LO already set"); } else { - filled.set(127); + filled.set(134); } // Trim array to size @@ -2122,10 +2122,10 @@ public Trace pContextByteCodeAddressLo(final Bytes b) { } public Trace pContextByteCodeCodeFragmentIndex(final long b) { - if (filled.get(104)) { + if (filled.get(107)) { throw new IllegalStateException("hub.context/BYTE_CODE_CODE_FRAGMENT_INDEX already set"); } else { - filled.set(104); + filled.set(107); } if (b >= 4294967296L) { @@ -2146,10 +2146,10 @@ public Trace pContextByteCodeCodeFragmentIndex(final long b) { } public Trace pContextByteCodeDeploymentNumber(final long b) { - if (filled.get(105)) { + if (filled.get(108)) { throw new IllegalStateException("hub.context/BYTE_CODE_DEPLOYMENT_NUMBER already set"); } else { - filled.set(105); + filled.set(108); } if (b >= 4294967296L) { @@ -2170,10 +2170,10 @@ public Trace pContextByteCodeDeploymentNumber(final long b) { } public Trace pContextByteCodeDeploymentStatus(final long b) { - if (filled.get(106)) { + if (filled.get(109)) { throw new IllegalStateException("hub.context/BYTE_CODE_DEPLOYMENT_STATUS already set"); } else { - filled.set(106); + filled.set(109); } if (b >= 4294967296L) { @@ -2191,10 +2191,10 @@ public Trace pContextByteCodeDeploymentStatus(final long b) { } public Trace pContextCallDataContextNumber(final long b) { - if (filled.get(108)) { + if (filled.get(111)) { throw new IllegalStateException("hub.context/CALL_DATA_CONTEXT_NUMBER already set"); } else { - filled.set(108); + filled.set(111); } if (b >= 4294967296L) { @@ -2210,10 +2210,10 @@ public Trace pContextCallDataContextNumber(final long b) { } public Trace pContextCallDataOffset(final long b) { - if (filled.get(109)) { + if (filled.get(112)) { throw new IllegalStateException("hub.context/CALL_DATA_OFFSET already set"); } else { - filled.set(109); + filled.set(112); } if (b >= 4294967296L) { @@ -2228,10 +2228,10 @@ public Trace pContextCallDataOffset(final long b) { } public Trace pContextCallDataSize(final long b) { - if (filled.get(110)) { + if (filled.get(113)) { throw new IllegalStateException("hub.context/CALL_DATA_SIZE already set"); } else { - filled.set(110); + filled.set(113); } if (b >= 4294967296L) { @@ -2253,19 +2253,20 @@ public Trace pContextCallStackDepth(final long b) { } if (b >= 2048L) { - throw new IllegalArgumentException("callStackDepth has invalid value (" + b + ")"); + throw new IllegalArgumentException( + "callStackDepthXorStackItemHeight1 has invalid value (" + b + ")"); } - callStackDepth.put((byte) (b >> 8)); - callStackDepth.put((byte) b); + callStackDepthXorStackItemHeight1.put((byte) (b >> 8)); + callStackDepthXorStackItemHeight1.put((byte) b); return this; } public Trace pContextCallValue(final Bytes b) { - if (filled.get(129)) { + if (filled.get(136)) { throw new IllegalStateException("hub.context/CALL_VALUE already set"); } else { - filled.set(129); + filled.set(136); } // Trim array to size @@ -2290,10 +2291,10 @@ public Trace pContextCallValue(final Bytes b) { } public Trace pContextCallerAddressHi(final long b) { - if (filled.get(107)) { + if (filled.get(110)) { throw new IllegalStateException("hub.context/CALLER_ADDRESS_HI already set"); } else { - filled.set(107); + filled.set(110); } if (b >= 4294967296L) { @@ -2311,10 +2312,10 @@ public Trace pContextCallerAddressHi(final long b) { } public Trace pContextCallerAddressLo(final Bytes b) { - if (filled.get(128)) { + if (filled.get(135)) { throw new IllegalStateException("hub.context/CALLER_ADDRESS_LO already set"); } else { - filled.set(128); + filled.set(135); } // Trim array to size @@ -2341,10 +2342,10 @@ public Trace pContextCallerAddressLo(final Bytes b) { } public Trace pContextContextNumber(final long b) { - if (filled.get(111)) { + if (filled.get(114)) { throw new IllegalStateException("hub.context/CONTEXT_NUMBER already set"); } else { - filled.set(111); + filled.set(114); } if (b >= 4294967296L) { @@ -2385,10 +2386,10 @@ public Trace pContextIsStatic(final Boolean b) { } public Trace pContextReturnAtCapacity(final long b) { - if (filled.get(112)) { + if (filled.get(115)) { throw new IllegalStateException("hub.context/RETURN_AT_CAPACITY already set"); } else { - filled.set(112); + filled.set(115); } if (b >= 4294967296L) { @@ -2404,10 +2405,10 @@ public Trace pContextReturnAtCapacity(final long b) { } public Trace pContextReturnAtOffset(final long b) { - if (filled.get(113)) { + if (filled.get(116)) { throw new IllegalStateException("hub.context/RETURN_AT_OFFSET already set"); } else { - filled.set(113); + filled.set(116); } if (b >= 4294967296L) { @@ -2422,10 +2423,10 @@ public Trace pContextReturnAtOffset(final long b) { } public Trace pContextReturnDataContextNumber(final long b) { - if (filled.get(114)) { + if (filled.get(117)) { throw new IllegalStateException("hub.context/RETURN_DATA_CONTEXT_NUMBER already set"); } else { - filled.set(114); + filled.set(117); } if (b >= 4294967296L) { @@ -2441,10 +2442,10 @@ public Trace pContextReturnDataContextNumber(final long b) { } public Trace pContextReturnDataOffset(final long b) { - if (filled.get(115)) { + if (filled.get(118)) { throw new IllegalStateException("hub.context/RETURN_DATA_OFFSET already set"); } else { - filled.set(115); + filled.set(118); } if (b >= 4294967296L) { @@ -2460,10 +2461,10 @@ public Trace pContextReturnDataOffset(final long b) { } public Trace pContextReturnDataSize(final long b) { - if (filled.get(116)) { + if (filled.get(119)) { throw new IllegalStateException("hub.context/RETURN_DATA_SIZE already set"); } else { - filled.set(116); + filled.set(119); } if (b >= 4294967296L) { @@ -2491,10 +2492,10 @@ public Trace pContextUpdate(final Boolean b) { } public Trace pMiscCcrsStamp(final long b) { - if (filled.get(101)) { + if (filled.get(104)) { throw new IllegalStateException("hub.misc/CCRS_STAMP already set"); } else { - filled.set(101); + filled.set(104); } if (b >= 4294967296L) { @@ -2529,10 +2530,10 @@ public Trace pMiscCcsrFlag(final Boolean b) { } public Trace pMiscExpData1(final Bytes b) { - if (filled.get(126)) { + if (filled.get(133)) { throw new IllegalStateException("hub.misc/EXP_DATA_1 already set"); } else { - filled.set(126); + filled.set(133); } // Trim array to size @@ -2559,10 +2560,10 @@ public Trace pMiscExpData1(final Bytes b) { } public Trace pMiscExpData2(final Bytes b) { - if (filled.get(127)) { + if (filled.get(134)) { throw new IllegalStateException("hub.misc/EXP_DATA_2 already set"); } else { - filled.set(127); + filled.set(134); } // Trim array to size @@ -2589,10 +2590,10 @@ public Trace pMiscExpData2(final Bytes b) { } public Trace pMiscExpData3(final Bytes b) { - if (filled.get(128)) { + if (filled.get(135)) { throw new IllegalStateException("hub.misc/EXP_DATA_3 already set"); } else { - filled.set(128); + filled.set(135); } // Trim array to size @@ -2619,10 +2620,10 @@ public Trace pMiscExpData3(final Bytes b) { } public Trace pMiscExpData4(final Bytes b) { - if (filled.get(129)) { + if (filled.get(136)) { throw new IllegalStateException("hub.misc/EXP_DATA_4 already set"); } else { - filled.set(129); + filled.set(136); } // Trim array to size @@ -2647,10 +2648,10 @@ public Trace pMiscExpData4(final Bytes b) { } public Trace pMiscExpData5(final Bytes b) { - if (filled.get(130)) { + if (filled.get(137)) { throw new IllegalStateException("hub.misc/EXP_DATA_5 already set"); } else { - filled.set(130); + filled.set(137); } // Trim array to size @@ -2658,17 +2659,17 @@ public Trace pMiscExpData5(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashHiNewXorExpData5XorValueCurrLoXorValue has invalid width (" + "codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put((byte) 0); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put(bs.get(j)); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put(bs.get(j)); } return this; @@ -2688,10 +2689,10 @@ public Trace pMiscExpFlag(final Boolean b) { } public Trace pMiscExpInst(final long b) { - if (filled.get(102)) { + if (filled.get(105)) { throw new IllegalStateException("hub.misc/EXP_INST already set"); } else { - filled.set(102); + filled.set(105); } if (b >= 4294967296L) { @@ -2713,10 +2714,10 @@ public Trace pMiscExpInst(final long b) { } public Trace pMiscMmuAuxId(final long b) { - if (filled.get(103)) { + if (filled.get(106)) { throw new IllegalStateException("hub.misc/MMU_AUX_ID already set"); } else { - filled.set(103); + filled.set(106); } if (b >= 4294967296L) { @@ -2738,10 +2739,10 @@ public Trace pMiscMmuAuxId(final long b) { } public Trace pMiscMmuExoSum(final long b) { - if (filled.get(104)) { + if (filled.get(107)) { throw new IllegalStateException("hub.misc/MMU_EXO_SUM already set"); } else { - filled.set(104); + filled.set(107); } if (b >= 4294967296L) { @@ -2775,10 +2776,10 @@ public Trace pMiscMmuFlag(final Boolean b) { } public Trace pMiscMmuInst(final long b) { - if (filled.get(105)) { + if (filled.get(108)) { throw new IllegalStateException("hub.misc/MMU_INST already set"); } else { - filled.set(105); + filled.set(108); } if (b >= 4294967296L) { @@ -2799,10 +2800,10 @@ public Trace pMiscMmuInst(final long b) { } public Trace pMiscMmuLimb1(final Bytes b) { - if (filled.get(131)) { + if (filled.get(138)) { throw new IllegalStateException("hub.misc/MMU_LIMB_1 already set"); } else { - filled.set(131); + filled.set(138); } // Trim array to size @@ -2810,25 +2811,27 @@ public Trace pMiscMmuLimb1(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashLoXorMmuLimb1XorValueNextHi has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashLoXorMmuLimb1XorValueNextHi.put((byte) 0); + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashLoXorMmuLimb1XorValueNextHi.put(bs.get(j)); + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put(bs.get(j)); } return this; } public Trace pMiscMmuLimb2(final Bytes b) { - if (filled.get(132)) { + if (filled.get(139)) { throw new IllegalStateException("hub.misc/MMU_LIMB_2 already set"); } else { - filled.set(132); + filled.set(139); } // Trim array to size @@ -2836,25 +2839,27 @@ public Trace pMiscMmuLimb2(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashLoNewXorMmuLimb2XorValueNextLo has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashLoNewXorMmuLimb2XorValueNextLo.put((byte) 0); + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashLoNewXorMmuLimb2XorValueNextLo.put(bs.get(j)); + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put(bs.get(j)); } return this; } public Trace pMiscMmuPhase(final long b) { - if (filled.get(106)) { + if (filled.get(109)) { throw new IllegalStateException("hub.misc/MMU_PHASE already set"); } else { - filled.set(106); + filled.set(109); } if (b >= 4294967296L) { @@ -2872,10 +2877,10 @@ public Trace pMiscMmuPhase(final long b) { } public Trace pMiscMmuRefOffset(final long b) { - if (filled.get(107)) { + if (filled.get(110)) { throw new IllegalStateException("hub.misc/MMU_REF_OFFSET already set"); } else { - filled.set(107); + filled.set(110); } if (b >= 4294967296L) { @@ -2893,10 +2898,10 @@ public Trace pMiscMmuRefOffset(final long b) { } public Trace pMiscMmuRefSize(final long b) { - if (filled.get(108)) { + if (filled.get(111)) { throw new IllegalStateException("hub.misc/MMU_REF_SIZE already set"); } else { - filled.set(108); + filled.set(111); } if (b >= 4294967296L) { @@ -2912,10 +2917,10 @@ public Trace pMiscMmuRefSize(final long b) { } public Trace pMiscMmuSize(final long b) { - if (filled.get(109)) { + if (filled.get(112)) { throw new IllegalStateException("hub.misc/MMU_SIZE already set"); } else { - filled.set(109); + filled.set(112); } if (b >= 4294967296L) { @@ -2930,10 +2935,10 @@ public Trace pMiscMmuSize(final long b) { } public Trace pMiscMmuSrcId(final long b) { - if (filled.get(110)) { + if (filled.get(113)) { throw new IllegalStateException("hub.misc/MMU_SRC_ID already set"); } else { - filled.set(110); + filled.set(113); } if (b >= 4294967296L) { @@ -2948,10 +2953,10 @@ public Trace pMiscMmuSrcId(final long b) { } public Trace pMiscMmuSrcOffsetHi(final Bytes b) { - if (filled.get(133)) { + if (filled.get(140)) { throw new IllegalStateException("hub.misc/MMU_SRC_OFFSET_HI already set"); } else { - filled.set(133); + filled.set(140); } // Trim array to size @@ -2959,27 +2964,27 @@ public Trace pMiscMmuSrcOffsetHi(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi has invalid width (" + "rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.put((byte) 0); + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.put(bs.get(j)); + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put(bs.get(j)); } return this; } public Trace pMiscMmuSrcOffsetLo(final Bytes b) { - if (filled.get(134)) { + if (filled.get(141)) { throw new IllegalStateException("hub.misc/MMU_SRC_OFFSET_LO already set"); } else { - filled.set(134); + filled.set(141); } // Trim array to size @@ -2987,17 +2992,17 @@ public Trace pMiscMmuSrcOffsetLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo has invalid width (" + "rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.put((byte) 0); + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.put(bs.get(j)); + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put(bs.get(j)); } return this; @@ -3017,10 +3022,10 @@ public Trace pMiscMmuSuccessBit(final Boolean b) { } public Trace pMiscMmuTgtId(final long b) { - if (filled.get(111)) { + if (filled.get(114)) { throw new IllegalStateException("hub.misc/MMU_TGT_ID already set"); } else { - filled.set(111); + filled.set(114); } if (b >= 4294967296L) { @@ -3035,10 +3040,10 @@ public Trace pMiscMmuTgtId(final long b) { } public Trace pMiscMmuTgtOffsetLo(final Bytes b) { - if (filled.get(135)) { + if (filled.get(142)) { throw new IllegalStateException("hub.misc/MMU_TGT_OFFSET_LO already set"); } else { - filled.set(135); + filled.set(142); } // Trim array to size @@ -3046,15 +3051,17 @@ public Trace pMiscMmuTgtOffsetLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrKecLoXorMmuTgtOffsetLo has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrKecLoXorMmuTgtOffsetLo.put((byte) 0); + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrKecLoXorMmuTgtOffsetLo.put(bs.get(j)); + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.put(bs.get(j)); } return this; @@ -3086,10 +3093,10 @@ public Trace pMiscMxpFlag(final Boolean b) { } public Trace pMiscMxpGasMxp(final Bytes b) { - if (filled.get(136)) { + if (filled.get(143)) { throw new IllegalStateException("hub.misc/MXP_GAS_MXP already set"); } else { - filled.set(136); + filled.set(143); } // Trim array to size @@ -3097,25 +3104,27 @@ public Trace pMiscMxpGasMxp(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrSaltHiXorMxpGasMxp has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrSaltHiXorMxpGasMxp.put((byte) 0); + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrSaltHiXorMxpGasMxp.put(bs.get(j)); + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.put(bs.get(j)); } return this; } public Trace pMiscMxpInst(final long b) { - if (filled.get(112)) { + if (filled.get(115)) { throw new IllegalStateException("hub.misc/MXP_INST already set"); } else { - filled.set(112); + filled.set(115); } if (b >= 4294967296L) { @@ -3157,10 +3166,10 @@ public Trace pMiscMxpMxpx(final Boolean b) { } public Trace pMiscMxpOffset1Hi(final Bytes b) { - if (filled.get(137)) { + if (filled.get(144)) { throw new IllegalStateException("hub.misc/MXP_OFFSET_1_HI already set"); } else { - filled.set(137); + filled.set(144); } // Trim array to size @@ -3168,25 +3177,27 @@ public Trace pMiscMxpOffset1Hi(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrSaltLoXorMxpOffset1Hi has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrSaltLoXorMxpOffset1Hi.put((byte) 0); + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrSaltLoXorMxpOffset1Hi.put(bs.get(j)); + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.put(bs.get(j)); } return this; } public Trace pMiscMxpOffset1Lo(final Bytes b) { - if (filled.get(138)) { + if (filled.get(145)) { throw new IllegalStateException("hub.misc/MXP_OFFSET_1_LO already set"); } else { - filled.set(138); + filled.set(145); } // Trim array to size @@ -3209,10 +3220,10 @@ public Trace pMiscMxpOffset1Lo(final Bytes b) { } public Trace pMiscMxpOffset2Hi(final Bytes b) { - if (filled.get(139)) { + if (filled.get(146)) { throw new IllegalStateException("hub.misc/MXP_OFFSET_2_HI already set"); } else { - filled.set(139); + filled.set(146); } // Trim array to size @@ -3235,10 +3246,10 @@ public Trace pMiscMxpOffset2Hi(final Bytes b) { } public Trace pMiscMxpOffset2Lo(final Bytes b) { - if (filled.get(140)) { + if (filled.get(147)) { throw new IllegalStateException("hub.misc/MXP_OFFSET_2_LO already set"); } else { - filled.set(140); + filled.set(147); } // Trim array to size @@ -3261,10 +3272,10 @@ public Trace pMiscMxpOffset2Lo(final Bytes b) { } public Trace pMiscMxpSize1Hi(final Bytes b) { - if (filled.get(141)) { + if (filled.get(148)) { throw new IllegalStateException("hub.misc/MXP_SIZE_1_HI already set"); } else { - filled.set(141); + filled.set(148); } // Trim array to size @@ -3287,10 +3298,10 @@ public Trace pMiscMxpSize1Hi(final Bytes b) { } public Trace pMiscMxpSize1Lo(final Bytes b) { - if (filled.get(142)) { + if (filled.get(149)) { throw new IllegalStateException("hub.misc/MXP_SIZE_1_LO already set"); } else { - filled.set(142); + filled.set(149); } // Trim array to size @@ -3313,10 +3324,10 @@ public Trace pMiscMxpSize1Lo(final Bytes b) { } public Trace pMiscMxpSize2Hi(final Bytes b) { - if (filled.get(143)) { + if (filled.get(150)) { throw new IllegalStateException("hub.misc/MXP_SIZE_2_HI already set"); } else { - filled.set(143); + filled.set(150); } // Trim array to size @@ -3339,10 +3350,10 @@ public Trace pMiscMxpSize2Hi(final Bytes b) { } public Trace pMiscMxpSize2Lo(final Bytes b) { - if (filled.get(144)) { + if (filled.get(151)) { throw new IllegalStateException("hub.misc/MXP_SIZE_2_LO already set"); } else { - filled.set(144); + filled.set(151); } // Trim array to size @@ -3365,10 +3376,10 @@ public Trace pMiscMxpSize2Lo(final Bytes b) { } public Trace pMiscMxpWords(final Bytes b) { - if (filled.get(145)) { + if (filled.get(152)) { throw new IllegalStateException("hub.misc/MXP_WORDS already set"); } else { - filled.set(145); + filled.set(152); } // Trim array to size @@ -3390,10 +3401,10 @@ public Trace pMiscMxpWords(final Bytes b) { } public Trace pMiscOobData1(final Bytes b) { - if (filled.get(146)) { + if (filled.get(153)) { throw new IllegalStateException("hub.misc/OOB_DATA_1 already set"); } else { - filled.set(146); + filled.set(153); } // Trim array to size @@ -3415,10 +3426,10 @@ public Trace pMiscOobData1(final Bytes b) { } public Trace pMiscOobData2(final Bytes b) { - if (filled.get(147)) { + if (filled.get(154)) { throw new IllegalStateException("hub.misc/OOB_DATA_2 already set"); } else { - filled.set(147); + filled.set(154); } // Trim array to size @@ -3440,10 +3451,10 @@ public Trace pMiscOobData2(final Bytes b) { } public Trace pMiscOobData3(final Bytes b) { - if (filled.get(148)) { + if (filled.get(155)) { throw new IllegalStateException("hub.misc/OOB_DATA_3 already set"); } else { - filled.set(148); + filled.set(155); } // Trim array to size @@ -3465,10 +3476,10 @@ public Trace pMiscOobData3(final Bytes b) { } public Trace pMiscOobData4(final Bytes b) { - if (filled.get(149)) { + if (filled.get(156)) { throw new IllegalStateException("hub.misc/OOB_DATA_4 already set"); } else { - filled.set(149); + filled.set(156); } // Trim array to size @@ -3490,10 +3501,10 @@ public Trace pMiscOobData4(final Bytes b) { } public Trace pMiscOobData5(final Bytes b) { - if (filled.get(150)) { + if (filled.get(157)) { throw new IllegalStateException("hub.misc/OOB_DATA_5 already set"); } else { - filled.set(150); + filled.set(157); } // Trim array to size @@ -3515,10 +3526,10 @@ public Trace pMiscOobData5(final Bytes b) { } public Trace pMiscOobData6(final Bytes b) { - if (filled.get(151)) { + if (filled.get(158)) { throw new IllegalStateException("hub.misc/OOB_DATA_6 already set"); } else { - filled.set(151); + filled.set(158); } // Trim array to size @@ -3540,10 +3551,10 @@ public Trace pMiscOobData6(final Bytes b) { } public Trace pMiscOobData7(final Bytes b) { - if (filled.get(152)) { + if (filled.get(159)) { throw new IllegalStateException("hub.misc/OOB_DATA_7 already set"); } else { - filled.set(152); + filled.set(159); } // Trim array to size @@ -3565,10 +3576,10 @@ public Trace pMiscOobData7(final Bytes b) { } public Trace pMiscOobData8(final Bytes b) { - if (filled.get(153)) { + if (filled.get(160)) { throw new IllegalStateException("hub.misc/OOB_DATA_8 already set"); } else { - filled.set(153); + filled.set(160); } // Trim array to size @@ -3590,10 +3601,10 @@ public Trace pMiscOobData8(final Bytes b) { } public Trace pMiscOobData9(final Bytes b) { - if (filled.get(154)) { + if (filled.get(161)) { throw new IllegalStateException("hub.misc/OOB_DATA_9 already set"); } else { - filled.set(154); + filled.set(161); } // Trim array to size @@ -3628,10 +3639,10 @@ public Trace pMiscOobFlag(final Boolean b) { } public Trace pMiscOobInst(final long b) { - if (filled.get(113)) { + if (filled.get(116)) { throw new IllegalStateException("hub.misc/OOB_INST already set"); } else { - filled.set(113); + filled.set(116); } if (b >= 4294967296L) { @@ -3672,10 +3683,10 @@ public Trace pMiscStpFlag(final Boolean b) { } public Trace pMiscStpGasHi(final Bytes b) { - if (filled.get(155)) { + if (filled.get(162)) { throw new IllegalStateException("hub.misc/STP_GAS_HI already set"); } else { - filled.set(155); + filled.set(162); } // Trim array to size @@ -3697,10 +3708,10 @@ public Trace pMiscStpGasHi(final Bytes b) { } public Trace pMiscStpGasLo(final Bytes b) { - if (filled.get(156)) { + if (filled.get(163)) { throw new IllegalStateException("hub.misc/STP_GAS_LO already set"); } else { - filled.set(156); + filled.set(163); } // Trim array to size @@ -3722,10 +3733,10 @@ public Trace pMiscStpGasLo(final Bytes b) { } public Trace pMiscStpGasMxp(final Bytes b) { - if (filled.get(117)) { + if (filled.get(124)) { throw new IllegalStateException("hub.misc/STP_GAS_MXP already set"); } else { - filled.set(117); + filled.set(124); } // Trim array to size @@ -3748,10 +3759,10 @@ public Trace pMiscStpGasMxp(final Bytes b) { } public Trace pMiscStpGasPaidOutOfPocket(final Bytes b) { - if (filled.get(118)) { + if (filled.get(125)) { throw new IllegalStateException("hub.misc/STP_GAS_PAID_OUT_OF_POCKET already set"); } else { - filled.set(118); + filled.set(125); } // Trim array to size @@ -3776,10 +3787,10 @@ public Trace pMiscStpGasPaidOutOfPocket(final Bytes b) { } public Trace pMiscStpGasStipend(final long b) { - if (filled.get(114)) { + if (filled.get(117)) { throw new IllegalStateException("hub.misc/STP_GAS_STIPEND already set"); } else { - filled.set(114); + filled.set(117); } if (b >= 4294967296L) { @@ -3795,10 +3806,10 @@ public Trace pMiscStpGasStipend(final long b) { } public Trace pMiscStpGasUpfrontGasCost(final Bytes b) { - if (filled.get(119)) { + if (filled.get(126)) { throw new IllegalStateException("hub.misc/STP_GAS_UPFRONT_GAS_COST already set"); } else { - filled.set(119); + filled.set(126); } // Trim array to size @@ -3821,10 +3832,10 @@ public Trace pMiscStpGasUpfrontGasCost(final Bytes b) { } public Trace pMiscStpInstruction(final long b) { - if (filled.get(115)) { + if (filled.get(118)) { throw new IllegalStateException("hub.misc/STP_INSTRUCTION already set"); } else { - filled.set(115); + filled.set(118); } if (b >= 4294967296L) { @@ -3852,10 +3863,10 @@ public Trace pMiscStpOogx(final Boolean b) { } public Trace pMiscStpValueHi(final Bytes b) { - if (filled.get(157)) { + if (filled.get(164)) { throw new IllegalStateException("hub.misc/STP_VALUE_HI already set"); } else { - filled.set(157); + filled.set(164); } // Trim array to size @@ -3878,10 +3889,10 @@ public Trace pMiscStpValueHi(final Bytes b) { } public Trace pMiscStpValueLo(final Bytes b) { - if (filled.get(158)) { + if (filled.get(165)) { throw new IllegalStateException("hub.misc/STP_VALUE_LO already set"); } else { - filled.set(158); + filled.set(165); } // Trim array to size @@ -4219,10 +4230,10 @@ public Trace pScenarioPrcBlake2F(final Boolean b) { } public Trace pScenarioPrcCalleeGas(final long b) { - if (filled.get(101)) { + if (filled.get(104)) { throw new IllegalStateException("hub.scenario/PRC_CALLEE_GAS already set"); } else { - filled.set(101); + filled.set(104); } if (b >= 4294967296L) { @@ -4244,10 +4255,10 @@ public Trace pScenarioPrcCalleeGas(final long b) { } public Trace pScenarioPrcCallerGas(final long b) { - if (filled.get(102)) { + if (filled.get(105)) { throw new IllegalStateException("hub.scenario/PRC_CALLER_GAS already set"); } else { - filled.set(102); + filled.set(105); } if (b >= 4294967296L) { @@ -4269,10 +4280,10 @@ public Trace pScenarioPrcCallerGas(final long b) { } public Trace pScenarioPrcCdo(final long b) { - if (filled.get(103)) { + if (filled.get(106)) { throw new IllegalStateException("hub.scenario/PRC_CDO already set"); } else { - filled.set(103); + filled.set(106); } if (b >= 4294967296L) { @@ -4294,10 +4305,10 @@ public Trace pScenarioPrcCdo(final long b) { } public Trace pScenarioPrcCds(final long b) { - if (filled.get(104)) { + if (filled.get(107)) { throw new IllegalStateException("hub.scenario/PRC_CDS already set"); } else { - filled.set(104); + filled.set(107); } if (b >= 4294967296L) { @@ -4414,10 +4425,10 @@ public Trace pScenarioPrcModexp(final Boolean b) { } public Trace pScenarioPrcRac(final long b) { - if (filled.get(105)) { + if (filled.get(108)) { throw new IllegalStateException("hub.scenario/PRC_RAC already set"); } else { - filled.set(105); + filled.set(108); } if (b >= 4294967296L) { @@ -4438,10 +4449,10 @@ public Trace pScenarioPrcRac(final long b) { } public Trace pScenarioPrcRao(final long b) { - if (filled.get(106)) { + if (filled.get(109)) { throw new IllegalStateException("hub.scenario/PRC_RAO already set"); } else { - filled.set(106); + filled.set(109); } if (b >= 4294967296L) { @@ -4459,10 +4470,10 @@ public Trace pScenarioPrcRao(final long b) { } public Trace pScenarioPrcReturnGas(final long b) { - if (filled.get(107)) { + if (filled.get(110)) { throw new IllegalStateException("hub.scenario/PRC_RETURN_GAS already set"); } else { - filled.set(107); + filled.set(110); } if (b >= 4294967296L) { @@ -4894,10 +4905,10 @@ public Trace pStackHashInfoFlag(final Boolean b) { } public Trace pStackHashInfoKeccakHi(final Bytes b) { - if (filled.get(126)) { + if (filled.get(133)) { throw new IllegalStateException("hub.stack/HASH_INFO_KECCAK_HI already set"); } else { - filled.set(126); + filled.set(133); } // Trim array to size @@ -4924,10 +4935,10 @@ public Trace pStackHashInfoKeccakHi(final Bytes b) { } public Trace pStackHashInfoKeccakLo(final Bytes b) { - if (filled.get(127)) { + if (filled.get(134)) { throw new IllegalStateException("hub.stack/HASH_INFO_KECCAK_LO already set"); } else { - filled.set(127); + filled.set(134); } // Trim array to size @@ -4966,10 +4977,10 @@ public Trace pStackIcpx(final Boolean b) { } public Trace pStackInstruction(final Bytes b) { - if (filled.get(159)) { + if (filled.get(166)) { throw new IllegalStateException("hub.stack/INSTRUCTION already set"); } else { - filled.set(159); + filled.set(166); } // Trim array to size @@ -5197,10 +5208,10 @@ public Trace pStackOpcx(final Boolean b) { } public Trace pStackPushValueHi(final Bytes b) { - if (filled.get(128)) { + if (filled.get(135)) { throw new IllegalStateException("hub.stack/PUSH_VALUE_HI already set"); } else { - filled.set(128); + filled.set(135); } // Trim array to size @@ -5227,10 +5238,10 @@ public Trace pStackPushValueHi(final Bytes b) { } public Trace pStackPushValueLo(final Bytes b) { - if (filled.get(129)) { + if (filled.get(136)) { throw new IllegalStateException("hub.stack/PUSH_VALUE_LO already set"); } else { - filled.set(129); + filled.set(136); } // Trim array to size @@ -5314,106 +5325,67 @@ public Trace pStackSstorex(final Boolean b) { return this; } - public Trace pStackStackItemHeight1(final Bytes b) { - if (filled.get(160)) { + public Trace pStackStackItemHeight1(final long b) { + if (filled.get(100)) { throw new IllegalStateException("hub.stack/STACK_ITEM_HEIGHT_1 already set"); } else { - filled.set(160); + filled.set(100); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { + if (b >= 2048L) { throw new IllegalArgumentException( - "stackItemHeight1 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemHeight1.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemHeight1.put(bs.get(j)); + "callStackDepthXorStackItemHeight1 has invalid value (" + b + ")"); } + callStackDepthXorStackItemHeight1.put((byte) (b >> 8)); + callStackDepthXorStackItemHeight1.put((byte) b); return this; } - public Trace pStackStackItemHeight2(final Bytes b) { - if (filled.get(161)) { + public Trace pStackStackItemHeight2(final long b) { + if (filled.get(101)) { throw new IllegalStateException("hub.stack/STACK_ITEM_HEIGHT_2 already set"); } else { - filled.set(161); + filled.set(101); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "stackItemHeight2 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemHeight2.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemHeight2.put(bs.get(j)); + if (b >= 2048L) { + throw new IllegalArgumentException("stackItemHeight2 has invalid value (" + b + ")"); } + stackItemHeight2.put((byte) (b >> 8)); + stackItemHeight2.put((byte) b); return this; } - public Trace pStackStackItemHeight3(final Bytes b) { - if (filled.get(162)) { + public Trace pStackStackItemHeight3(final long b) { + if (filled.get(102)) { throw new IllegalStateException("hub.stack/STACK_ITEM_HEIGHT_3 already set"); } else { - filled.set(162); + filled.set(102); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "stackItemHeight3 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemHeight3.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemHeight3.put(bs.get(j)); + if (b >= 2048L) { + throw new IllegalArgumentException("stackItemHeight3 has invalid value (" + b + ")"); } + stackItemHeight3.put((byte) (b >> 8)); + stackItemHeight3.put((byte) b); return this; } - public Trace pStackStackItemHeight4(final Bytes b) { - if (filled.get(163)) { + public Trace pStackStackItemHeight4(final long b) { + if (filled.get(103)) { throw new IllegalStateException("hub.stack/STACK_ITEM_HEIGHT_4 already set"); } else { - filled.set(163); + filled.set(103); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "stackItemHeight4 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemHeight4.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemHeight4.put(bs.get(j)); + if (b >= 2048L) { + throw new IllegalArgumentException("stackItemHeight4 has invalid value (" + b + ")"); } + stackItemHeight4.put((byte) (b >> 8)); + stackItemHeight4.put((byte) b); return this; } @@ -5466,313 +5438,301 @@ public Trace pStackStackItemPop4(final Boolean b) { return this; } - public Trace pStackStackItemStamp1(final Bytes b) { - if (filled.get(164)) { + public Trace pStackStackItemStamp1(final long b) { + if (filled.get(120)) { throw new IllegalStateException("hub.stack/STACK_ITEM_STAMP_1 already set"); } else { - filled.set(164); + filled.set(120); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "stackItemStamp1 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemStamp1.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemStamp1.put(bs.get(j)); + if (b >= 68719476736L) { + throw new IllegalArgumentException("stackItemStamp1 has invalid value (" + b + ")"); } + stackItemStamp1.put((byte) (b >> 32)); + stackItemStamp1.put((byte) (b >> 24)); + stackItemStamp1.put((byte) (b >> 16)); + stackItemStamp1.put((byte) (b >> 8)); + stackItemStamp1.put((byte) b); return this; } - public Trace pStackStackItemStamp2(final Bytes b) { - if (filled.get(165)) { + public Trace pStackStackItemStamp2(final long b) { + if (filled.get(121)) { throw new IllegalStateException("hub.stack/STACK_ITEM_STAMP_2 already set"); } else { - filled.set(165); + filled.set(121); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "stackItemStamp2 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemStamp2.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemStamp2.put(bs.get(j)); + if (b >= 68719476736L) { + throw new IllegalArgumentException("stackItemStamp2 has invalid value (" + b + ")"); } + stackItemStamp2.put((byte) (b >> 32)); + stackItemStamp2.put((byte) (b >> 24)); + stackItemStamp2.put((byte) (b >> 16)); + stackItemStamp2.put((byte) (b >> 8)); + stackItemStamp2.put((byte) b); return this; } - public Trace pStackStackItemStamp3(final Bytes b) { - if (filled.get(166)) { + public Trace pStackStackItemStamp3(final long b) { + if (filled.get(122)) { throw new IllegalStateException("hub.stack/STACK_ITEM_STAMP_3 already set"); } else { - filled.set(166); + filled.set(122); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "stackItemStamp3 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemStamp3.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemStamp3.put(bs.get(j)); + if (b >= 68719476736L) { + throw new IllegalArgumentException("stackItemStamp3 has invalid value (" + b + ")"); } + stackItemStamp3.put((byte) (b >> 32)); + stackItemStamp3.put((byte) (b >> 24)); + stackItemStamp3.put((byte) (b >> 16)); + stackItemStamp3.put((byte) (b >> 8)); + stackItemStamp3.put((byte) b); return this; } - public Trace pStackStackItemStamp4(final Bytes b) { - if (filled.get(167)) { + public Trace pStackStackItemStamp4(final long b) { + if (filled.get(123)) { throw new IllegalStateException("hub.stack/STACK_ITEM_STAMP_4 already set"); } else { - filled.set(167); + filled.set(123); } - // Trim array to size - Bytes bs = b.trimLeadingZeros(); - // Sanity check against expected width - if (bs.bitLength() > 256) { - throw new IllegalArgumentException( - "stackItemStamp4 has invalid width (" + bs.bitLength() + "bits)"); - } - // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemStamp4.put((byte) 0); - } - // Write bytes - for (int j = 0; j < bs.size(); j++) { - stackItemStamp4.put(bs.get(j)); + if (b >= 68719476736L) { + throw new IllegalArgumentException("stackItemStamp4 has invalid value (" + b + ")"); } + stackItemStamp4.put((byte) (b >> 32)); + stackItemStamp4.put((byte) (b >> 24)); + stackItemStamp4.put((byte) (b >> 16)); + stackItemStamp4.put((byte) (b >> 8)); + stackItemStamp4.put((byte) b); return this; } public Trace pStackStackItemValueHi1(final Bytes b) { - if (filled.get(168)) { + if (filled.get(137)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_HI_1 already set"); } else { - filled.set(168); + filled.set(137); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueHi1 has invalid width (" + bs.bitLength() + "bits)"); + "codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueHi1.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueHi1.put(bs.get(j)); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put(bs.get(j)); } return this; } public Trace pStackStackItemValueHi2(final Bytes b) { - if (filled.get(169)) { + if (filled.get(138)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_HI_2 already set"); } else { - filled.set(169); + filled.set(138); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueHi2 has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueHi2.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueHi2.put(bs.get(j)); + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put(bs.get(j)); } return this; } public Trace pStackStackItemValueHi3(final Bytes b) { - if (filled.get(170)) { + if (filled.get(139)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_HI_3 already set"); } else { - filled.set(170); + filled.set(139); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueHi3 has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueHi3.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueHi3.put(bs.get(j)); + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put(bs.get(j)); } return this; } public Trace pStackStackItemValueHi4(final Bytes b) { - if (filled.get(171)) { + if (filled.get(140)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_HI_4 already set"); } else { - filled.set(171); + filled.set(140); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueHi4 has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueHi4.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueHi4.put(bs.get(j)); + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put(bs.get(j)); } return this; } public Trace pStackStackItemValueLo1(final Bytes b) { - if (filled.get(172)) { + if (filled.get(141)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_LO_1 already set"); } else { - filled.set(172); + filled.set(141); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueLo1 has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueLo1.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueLo1.put(bs.get(j)); + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put(bs.get(j)); } return this; } public Trace pStackStackItemValueLo2(final Bytes b) { - if (filled.get(173)) { + if (filled.get(142)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_LO_2 already set"); } else { - filled.set(173); + filled.set(142); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueLo2 has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueLo2.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueLo2.put(bs.get(j)); + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.put(bs.get(j)); } return this; } public Trace pStackStackItemValueLo3(final Bytes b) { - if (filled.get(174)) { + if (filled.get(143)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_LO_3 already set"); } else { - filled.set(174); + filled.set(143); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueLo3 has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueLo3.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueLo3.put(bs.get(j)); + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.put(bs.get(j)); } return this; } public Trace pStackStackItemValueLo4(final Bytes b) { - if (filled.get(175)) { + if (filled.get(144)) { throw new IllegalStateException("hub.stack/STACK_ITEM_VALUE_LO_4 already set"); } else { - filled.set(175); + filled.set(144); } // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "stackItemValueLo4 has invalid width (" + bs.bitLength() + "bits)"); + "rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4 has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { - stackItemValueLo4.put((byte) 0); + for (int i = bs.size(); i < 16; i++) { + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - stackItemValueLo4.put(bs.get(j)); + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.put(bs.get(j)); } return this; @@ -5803,10 +5763,10 @@ public Trace pStackStaticFlag(final Boolean b) { } public Trace pStackStaticGas(final long b) { - if (filled.get(101)) { + if (filled.get(104)) { throw new IllegalStateException("hub.stack/STATIC_GAS already set"); } else { - filled.set(101); + filled.set(104); } if (b >= 4294967296L) { @@ -5900,10 +5860,10 @@ public Trace pStackWcpFlag(final Boolean b) { } public Trace pStorageAddressHi(final long b) { - if (filled.get(101)) { + if (filled.get(104)) { throw new IllegalStateException("hub.storage/ADDRESS_HI already set"); } else { - filled.set(101); + filled.set(104); } if (b >= 4294967296L) { @@ -5925,10 +5885,10 @@ public Trace pStorageAddressHi(final long b) { } public Trace pStorageAddressLo(final Bytes b) { - if (filled.get(126)) { + if (filled.get(133)) { throw new IllegalStateException("hub.storage/ADDRESS_LO already set"); } else { - filled.set(126); + filled.set(133); } // Trim array to size @@ -5955,10 +5915,10 @@ public Trace pStorageAddressLo(final Bytes b) { } public Trace pStorageDeploymentNumber(final long b) { - if (filled.get(102)) { + if (filled.get(105)) { throw new IllegalStateException("hub.storage/DEPLOYMENT_NUMBER already set"); } else { - filled.set(102); + filled.set(105); } if (b >= 4294967296L) { @@ -5980,10 +5940,10 @@ public Trace pStorageDeploymentNumber(final long b) { } public Trace pStorageDeploymentNumberInfty(final long b) { - if (filled.get(103)) { + if (filled.get(106)) { throw new IllegalStateException("hub.storage/DEPLOYMENT_NUMBER_INFTY already set"); } else { - filled.set(103); + filled.set(106); } if (b >= 4294967296L) { @@ -6005,10 +5965,10 @@ public Trace pStorageDeploymentNumberInfty(final long b) { } public Trace pStorageStorageKeyHi(final Bytes b) { - if (filled.get(127)) { + if (filled.get(134)) { throw new IllegalStateException("hub.storage/STORAGE_KEY_HI already set"); } else { - filled.set(127); + filled.set(134); } // Trim array to size @@ -6035,10 +5995,10 @@ public Trace pStorageStorageKeyHi(final Bytes b) { } public Trace pStorageStorageKeyLo(final Bytes b) { - if (filled.get(128)) { + if (filled.get(135)) { throw new IllegalStateException("hub.storage/STORAGE_KEY_LO already set"); } else { - filled.set(128); + filled.set(135); } // Trim array to size @@ -6104,10 +6064,10 @@ public Trace pStorageValueCurrChanges(final Boolean b) { } public Trace pStorageValueCurrHi(final Bytes b) { - if (filled.get(129)) { + if (filled.get(136)) { throw new IllegalStateException("hub.storage/VALUE_CURR_HI already set"); } else { - filled.set(129); + filled.set(136); } // Trim array to size @@ -6158,10 +6118,10 @@ public Trace pStorageValueCurrIsZero(final Boolean b) { } public Trace pStorageValueCurrLo(final Bytes b) { - if (filled.get(130)) { + if (filled.get(137)) { throw new IllegalStateException("hub.storage/VALUE_CURR_LO already set"); } else { - filled.set(130); + filled.set(137); } // Trim array to size @@ -6169,27 +6129,27 @@ public Trace pStorageValueCurrLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashHiNewXorExpData5XorValueCurrLoXorValue has invalid width (" + "codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put((byte) 0); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put(bs.get(j)); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put(bs.get(j)); } return this; } public Trace pStorageValueNextHi(final Bytes b) { - if (filled.get(131)) { + if (filled.get(138)) { throw new IllegalStateException("hub.storage/VALUE_NEXT_HI already set"); } else { - filled.set(131); + filled.set(138); } // Trim array to size @@ -6197,15 +6157,17 @@ public Trace pStorageValueNextHi(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashLoXorMmuLimb1XorValueNextHi has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashLoXorMmuLimb1XorValueNextHi.put((byte) 0); + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashLoXorMmuLimb1XorValueNextHi.put(bs.get(j)); + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.put(bs.get(j)); } return this; @@ -6250,10 +6212,10 @@ public Trace pStorageValueNextIsZero(final Boolean b) { } public Trace pStorageValueNextLo(final Bytes b) { - if (filled.get(132)) { + if (filled.get(139)) { throw new IllegalStateException("hub.storage/VALUE_NEXT_LO already set"); } else { - filled.set(132); + filled.set(139); } // Trim array to size @@ -6261,25 +6223,27 @@ public Trace pStorageValueNextLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashLoNewXorMmuLimb2XorValueNextLo has invalid width (" + bs.bitLength() + "bits)"); + "codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo has invalid width (" + + bs.bitLength() + + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashLoNewXorMmuLimb2XorValueNextLo.put((byte) 0); + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashLoNewXorMmuLimb2XorValueNextLo.put(bs.get(j)); + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.put(bs.get(j)); } return this; } public Trace pStorageValueOrigHi(final Bytes b) { - if (filled.get(133)) { + if (filled.get(140)) { throw new IllegalStateException("hub.storage/VALUE_ORIG_HI already set"); } else { - filled.set(133); + filled.set(140); } // Trim array to size @@ -6287,17 +6251,17 @@ public Trace pStorageValueOrigHi(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi has invalid width (" + "rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.put((byte) 0); + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.put(bs.get(j)); + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.put(bs.get(j)); } return this; @@ -6317,10 +6281,10 @@ public Trace pStorageValueOrigIsZero(final Boolean b) { } public Trace pStorageValueOrigLo(final Bytes b) { - if (filled.get(134)) { + if (filled.get(141)) { throw new IllegalStateException("hub.storage/VALUE_ORIG_LO already set"); } else { - filled.set(134); + filled.set(141); } // Trim array to size @@ -6328,17 +6292,17 @@ public Trace pStorageValueOrigLo(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo has invalid width (" + "rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.put((byte) 0); + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.put(bs.get(j)); + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.put(bs.get(j)); } return this; @@ -6371,10 +6335,10 @@ public Trace pStorageWarmthNew(final Boolean b) { } public Trace pTransactionBasefee(final Bytes b) { - if (filled.get(117)) { + if (filled.get(124)) { throw new IllegalStateException("hub.transaction/BASEFEE already set"); } else { - filled.set(117); + filled.set(124); } // Trim array to size @@ -6397,10 +6361,10 @@ public Trace pTransactionBasefee(final Bytes b) { } public Trace pTransactionCallDataSize(final long b) { - if (filled.get(101)) { + if (filled.get(104)) { throw new IllegalStateException("hub.transaction/CALL_DATA_SIZE already set"); } else { - filled.set(101); + filled.set(104); } if (b >= 4294967296L) { @@ -6422,10 +6386,10 @@ public Trace pTransactionCallDataSize(final long b) { } public Trace pTransactionCoinbaseAddressHi(final long b) { - if (filled.get(102)) { + if (filled.get(105)) { throw new IllegalStateException("hub.transaction/COINBASE_ADDRESS_HI already set"); } else { - filled.set(102); + filled.set(105); } if (b >= 4294967296L) { @@ -6447,10 +6411,10 @@ public Trace pTransactionCoinbaseAddressHi(final long b) { } public Trace pTransactionCoinbaseAddressLo(final Bytes b) { - if (filled.get(126)) { + if (filled.get(133)) { throw new IllegalStateException("hub.transaction/COINBASE_ADDRESS_LO already set"); } else { - filled.set(126); + filled.set(133); } // Trim array to size @@ -6490,10 +6454,10 @@ public Trace pTransactionCopyTxcd(final Boolean b) { } public Trace pTransactionFromAddressHi(final long b) { - if (filled.get(103)) { + if (filled.get(106)) { throw new IllegalStateException("hub.transaction/FROM_ADDRESS_HI already set"); } else { - filled.set(103); + filled.set(106); } if (b >= 4294967296L) { @@ -6515,10 +6479,10 @@ public Trace pTransactionFromAddressHi(final long b) { } public Trace pTransactionFromAddressLo(final Bytes b) { - if (filled.get(127)) { + if (filled.get(134)) { throw new IllegalStateException("hub.transaction/FROM_ADDRESS_LO already set"); } else { - filled.set(127); + filled.set(134); } // Trim array to size @@ -6545,10 +6509,10 @@ public Trace pTransactionFromAddressLo(final Bytes b) { } public Trace pTransactionGasInitiallyAvailable(final Bytes b) { - if (filled.get(118)) { + if (filled.get(125)) { throw new IllegalStateException("hub.transaction/GAS_INITIALLY_AVAILABLE already set"); } else { - filled.set(118); + filled.set(125); } // Trim array to size @@ -6573,10 +6537,10 @@ public Trace pTransactionGasInitiallyAvailable(final Bytes b) { } public Trace pTransactionGasLeftover(final Bytes b) { - if (filled.get(119)) { + if (filled.get(126)) { throw new IllegalStateException("hub.transaction/GAS_LEFTOVER already set"); } else { - filled.set(119); + filled.set(126); } // Trim array to size @@ -6599,10 +6563,10 @@ public Trace pTransactionGasLeftover(final Bytes b) { } public Trace pTransactionGasLimit(final Bytes b) { - if (filled.get(120)) { + if (filled.get(127)) { throw new IllegalStateException("hub.transaction/GAS_LIMIT already set"); } else { - filled.set(120); + filled.set(127); } // Trim array to size @@ -6624,10 +6588,10 @@ public Trace pTransactionGasLimit(final Bytes b) { } public Trace pTransactionGasPrice(final Bytes b) { - if (filled.get(121)) { + if (filled.get(128)) { throw new IllegalStateException("hub.transaction/GAS_PRICE already set"); } else { - filled.set(121); + filled.set(128); } // Trim array to size @@ -6649,10 +6613,10 @@ public Trace pTransactionGasPrice(final Bytes b) { } public Trace pTransactionInitCodeSize(final long b) { - if (filled.get(104)) { + if (filled.get(107)) { throw new IllegalStateException("hub.transaction/INIT_CODE_SIZE already set"); } else { - filled.set(104); + filled.set(107); } if (b >= 4294967296L) { @@ -6673,10 +6637,10 @@ public Trace pTransactionInitCodeSize(final long b) { } public Trace pTransactionInitialBalance(final Bytes b) { - if (filled.get(128)) { + if (filled.get(135)) { throw new IllegalStateException("hub.transaction/INITIAL_BALANCE already set"); } else { - filled.set(128); + filled.set(135); } // Trim array to size @@ -6729,10 +6693,10 @@ public Trace pTransactionIsType2(final Boolean b) { } public Trace pTransactionNonce(final Bytes b) { - if (filled.get(122)) { + if (filled.get(129)) { throw new IllegalStateException("hub.transaction/NONCE already set"); } else { - filled.set(122); + filled.set(129); } // Trim array to size @@ -6754,10 +6718,10 @@ public Trace pTransactionNonce(final Bytes b) { } public Trace pTransactionPriorityFeePerGas(final Bytes b) { - if (filled.get(123)) { + if (filled.get(130)) { throw new IllegalStateException("hub.transaction/PRIORITY_FEE_PER_GAS already set"); } else { - filled.set(123); + filled.set(130); } // Trim array to size @@ -6780,10 +6744,10 @@ public Trace pTransactionPriorityFeePerGas(final Bytes b) { } public Trace pTransactionRefundCounterInfinity(final Bytes b) { - if (filled.get(124)) { + if (filled.get(131)) { throw new IllegalStateException("hub.transaction/REFUND_COUNTER_INFINITY already set"); } else { - filled.set(124); + filled.set(131); } // Trim array to size @@ -6806,10 +6770,10 @@ public Trace pTransactionRefundCounterInfinity(final Bytes b) { } public Trace pTransactionRefundEffective(final Bytes b) { - if (filled.get(125)) { + if (filled.get(132)) { throw new IllegalStateException("hub.transaction/REFUND_EFFECTIVE already set"); } else { - filled.set(125); + filled.set(132); } // Trim array to size @@ -6858,10 +6822,10 @@ public Trace pTransactionStatusCode(final Boolean b) { } public Trace pTransactionToAddressHi(final long b) { - if (filled.get(105)) { + if (filled.get(108)) { throw new IllegalStateException("hub.transaction/TO_ADDRESS_HI already set"); } else { - filled.set(105); + filled.set(108); } if (b >= 4294967296L) { @@ -6882,10 +6846,10 @@ public Trace pTransactionToAddressHi(final long b) { } public Trace pTransactionToAddressLo(final Bytes b) { - if (filled.get(129)) { + if (filled.get(136)) { throw new IllegalStateException("hub.transaction/TO_ADDRESS_LO already set"); } else { - filled.set(129); + filled.set(136); } // Trim array to size @@ -6910,10 +6874,10 @@ public Trace pTransactionToAddressLo(final Bytes b) { } public Trace pTransactionValue(final Bytes b) { - if (filled.get(130)) { + if (filled.get(137)) { throw new IllegalStateException("hub.transaction/VALUE already set"); } else { - filled.set(130); + filled.set(137); } // Trim array to size @@ -6921,17 +6885,17 @@ public Trace pTransactionValue(final Bytes b) { // Sanity check against expected width if (bs.bitLength() > 128) { throw new IllegalArgumentException( - "codeHashHiNewXorExpData5XorValueCurrLoXorValue has invalid width (" + "codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) for (int i = bs.size(); i < 16; i++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put((byte) 0); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put((byte) 0); } // Write bytes for (int j = 0; j < bs.size(); j++) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.put(bs.get(j)); + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.put(bs.get(j)); } return this; @@ -7204,12 +7168,12 @@ public Trace validateRow() { throw new IllegalStateException("hub.ABSOLUTE_TRANSACTION_NUMBER has not been filled"); } - if (!filled.get(101)) { + if (!filled.get(104)) { throw new IllegalStateException( "hub.ADDRESS_HI_xor_ACCOUNT_ADDRESS_HI_xor_CCRS_STAMP_xor_PRC_CALLEE_GAS_xor_STATIC_GAS_xor_ADDRESS_HI_xor_CALL_DATA_SIZE has not been filled"); } - if (!filled.get(126)) { + if (!filled.get(133)) { throw new IllegalStateException( "hub.ADDRESS_LO_xor_ACCOUNT_ADDRESS_LO_xor_EXP_DATA_1_xor_HASH_INFO_KECCAK_HI_xor_ADDRESS_LO_xor_COINBASE_ADDRESS_LO has not been filled"); } @@ -7218,26 +7182,27 @@ public Trace validateRow() { throw new IllegalStateException("hub.ALPHA has not been filled"); } - if (!filled.get(128)) { + if (!filled.get(135)) { throw new IllegalStateException( "hub.BALANCE_NEW_xor_CALLER_ADDRESS_LO_xor_EXP_DATA_3_xor_PUSH_VALUE_HI_xor_STORAGE_KEY_LO_xor_INITIAL_BALANCE has not been filled"); } - if (!filled.get(127)) { + if (!filled.get(134)) { throw new IllegalStateException( "hub.BALANCE_xor_BYTE_CODE_ADDRESS_LO_xor_EXP_DATA_2_xor_HASH_INFO_KECCAK_LO_xor_STORAGE_KEY_HI_xor_FROM_ADDRESS_LO has not been filled"); } - if (!filled.get(109)) { + if (!filled.get(112)) { throw new IllegalStateException("hub.CALL_DATA_OFFSET_xor_MMU_SIZE has not been filled"); } - if (!filled.get(110)) { + if (!filled.get(113)) { throw new IllegalStateException("hub.CALL_DATA_SIZE_xor_MMU_SRC_ID has not been filled"); } if (!filled.get(100)) { - throw new IllegalStateException("hub.CALL_STACK_DEPTH has not been filled"); + throw new IllegalStateException( + "hub.CALL_STACK_DEPTH_xor_STACK_ITEM_HEIGHT_1 has not been filled"); } if (!filled.get(1)) { @@ -7248,37 +7213,37 @@ public Trace validateRow() { throw new IllegalStateException("hub.CODE_FRAGMENT_INDEX has not been filled"); } - if (!filled.get(102)) { + if (!filled.get(105)) { throw new IllegalStateException( "hub.CODE_FRAGMENT_INDEX_xor_ACCOUNT_DEPLOYMENT_NUMBER_xor_EXP_INST_xor_PRC_CALLER_GAS_xor_DEPLOYMENT_NUMBER_xor_COINBASE_ADDRESS_HI has not been filled"); } - if (!filled.get(130)) { + if (!filled.get(137)) { throw new IllegalStateException( - "hub.CODE_HASH_HI_NEW_xor_EXP_DATA_5_xor_VALUE_CURR_LO_xor_VALUE has not been filled"); + "hub.CODE_HASH_HI_NEW_xor_EXP_DATA_5_xor_STACK_ITEM_VALUE_HI_1_xor_VALUE_CURR_LO_xor_VALUE has not been filled"); } - if (!filled.get(129)) { + if (!filled.get(136)) { throw new IllegalStateException( "hub.CODE_HASH_HI_xor_CALL_VALUE_xor_EXP_DATA_4_xor_PUSH_VALUE_LO_xor_VALUE_CURR_HI_xor_TO_ADDRESS_LO has not been filled"); } - if (!filled.get(132)) { + if (!filled.get(139)) { throw new IllegalStateException( - "hub.CODE_HASH_LO_NEW_xor_MMU_LIMB_2_xor_VALUE_NEXT_LO has not been filled"); + "hub.CODE_HASH_LO_NEW_xor_MMU_LIMB_2_xor_STACK_ITEM_VALUE_HI_3_xor_VALUE_NEXT_LO has not been filled"); } - if (!filled.get(131)) { + if (!filled.get(138)) { throw new IllegalStateException( - "hub.CODE_HASH_LO_xor_MMU_LIMB_1_xor_VALUE_NEXT_HI has not been filled"); + "hub.CODE_HASH_LO_xor_MMU_LIMB_1_xor_STACK_ITEM_VALUE_HI_2_xor_VALUE_NEXT_HI has not been filled"); } - if (!filled.get(104)) { + if (!filled.get(107)) { throw new IllegalStateException( "hub.CODE_SIZE_NEW_xor_BYTE_CODE_CODE_FRAGMENT_INDEX_xor_MMU_EXO_SUM_xor_PRC_CDS_xor_INIT_CODE_SIZE has not been filled"); } - if (!filled.get(103)) { + if (!filled.get(106)) { throw new IllegalStateException( "hub.CODE_SIZE_xor_BYTE_CODE_ADDRESS_HI_xor_MMU_AUX_ID_xor_PRC_CDO_xor_DEPLOYMENT_NUMBER_INFTY_xor_FROM_ADDRESS_HI has not been filled"); } @@ -7299,7 +7264,7 @@ public Trace validateRow() { throw new IllegalStateException("hub.CONTEXT_NUMBER_NEW has not been filled"); } - if (!filled.get(111)) { + if (!filled.get(114)) { throw new IllegalStateException("hub.CONTEXT_NUMBER_xor_MMU_TGT_ID has not been filled"); } @@ -7362,17 +7327,17 @@ public Trace validateRow() { throw new IllegalStateException("hub.DELTA has not been filled"); } - if (!filled.get(106)) { + if (!filled.get(109)) { throw new IllegalStateException( "hub.DEPLOYMENT_NUMBER_INFTY_xor_BYTE_CODE_DEPLOYMENT_STATUS_xor_MMU_PHASE_xor_PRC_RAO has not been filled"); } - if (!filled.get(107)) { + if (!filled.get(110)) { throw new IllegalStateException( "hub.DEPLOYMENT_NUMBER_NEW_xor_CALLER_ADDRESS_HI_xor_MMU_REF_OFFSET_xor_PRC_RETURN_GAS has not been filled"); } - if (!filled.get(105)) { + if (!filled.get(108)) { throw new IllegalStateException( "hub.DEPLOYMENT_NUMBER_xor_BYTE_CODE_DEPLOYMENT_NUMBER_xor_MMU_INST_xor_PRC_RAC_xor_TO_ADDRESS_HI has not been filled"); } @@ -7422,7 +7387,7 @@ public Trace validateRow() { throw new IllegalStateException("hub.GAS_EXPECTED has not been filled"); } - if (!filled.get(120)) { + if (!filled.get(127)) { throw new IllegalStateException("hub.GAS_LIMIT has not been filled"); } @@ -7430,7 +7395,7 @@ public Trace validateRow() { throw new IllegalStateException("hub.GAS_NEXT has not been filled"); } - if (!filled.get(121)) { + if (!filled.get(128)) { throw new IllegalStateException("hub.GAS_PRICE has not been filled"); } @@ -7464,7 +7429,7 @@ public Trace validateRow() { throw new IllegalStateException("hub.HUB_STAMP_TRANSACTION_END has not been filled"); } - if (!filled.get(159)) { + if (!filled.get(166)) { throw new IllegalStateException("hub.INSTRUCTION has not been filled"); } @@ -7491,27 +7456,27 @@ public Trace validateRow() { throw new IllegalStateException("hub.MMU_STAMP has not been filled"); } - if (!filled.get(139)) { + if (!filled.get(146)) { throw new IllegalStateException("hub.MXP_OFFSET_2_HI has not been filled"); } - if (!filled.get(140)) { + if (!filled.get(147)) { throw new IllegalStateException("hub.MXP_OFFSET_2_LO has not been filled"); } - if (!filled.get(141)) { + if (!filled.get(148)) { throw new IllegalStateException("hub.MXP_SIZE_1_HI has not been filled"); } - if (!filled.get(142)) { + if (!filled.get(149)) { throw new IllegalStateException("hub.MXP_SIZE_1_LO has not been filled"); } - if (!filled.get(143)) { + if (!filled.get(150)) { throw new IllegalStateException("hub.MXP_SIZE_2_HI has not been filled"); } - if (!filled.get(144)) { + if (!filled.get(151)) { throw new IllegalStateException("hub.MXP_SIZE_2_LO has not been filled"); } @@ -7519,7 +7484,7 @@ public Trace validateRow() { throw new IllegalStateException("hub.MXP_STAMP has not been filled"); } - if (!filled.get(145)) { + if (!filled.get(152)) { throw new IllegalStateException("hub.MXP_WORDS has not been filled"); } @@ -7535,52 +7500,52 @@ public Trace validateRow() { throw new IllegalStateException("hub.NON_STACK_ROWS has not been filled"); } - if (!filled.get(122)) { + if (!filled.get(129)) { throw new IllegalStateException("hub.NONCE has not been filled"); } - if (!filled.get(118)) { + if (!filled.get(125)) { throw new IllegalStateException( "hub.NONCE_NEW_xor_STP_GAS_PAID_OUT_OF_POCKET_xor_GAS_INITIALLY_AVAILABLE has not been filled"); } - if (!filled.get(117)) { + if (!filled.get(124)) { throw new IllegalStateException("hub.NONCE_xor_STP_GAS_MXP_xor_BASEFEE has not been filled"); } - if (!filled.get(146)) { + if (!filled.get(153)) { throw new IllegalStateException("hub.OOB_DATA_1 has not been filled"); } - if (!filled.get(147)) { + if (!filled.get(154)) { throw new IllegalStateException("hub.OOB_DATA_2 has not been filled"); } - if (!filled.get(148)) { + if (!filled.get(155)) { throw new IllegalStateException("hub.OOB_DATA_3 has not been filled"); } - if (!filled.get(149)) { + if (!filled.get(156)) { throw new IllegalStateException("hub.OOB_DATA_4 has not been filled"); } - if (!filled.get(150)) { + if (!filled.get(157)) { throw new IllegalStateException("hub.OOB_DATA_5 has not been filled"); } - if (!filled.get(151)) { + if (!filled.get(158)) { throw new IllegalStateException("hub.OOB_DATA_6 has not been filled"); } - if (!filled.get(152)) { + if (!filled.get(159)) { throw new IllegalStateException("hub.OOB_DATA_7 has not been filled"); } - if (!filled.get(153)) { + if (!filled.get(160)) { throw new IllegalStateException("hub.OOB_DATA_8 has not been filled"); } - if (!filled.get(154)) { + if (!filled.get(161)) { throw new IllegalStateException("hub.OOB_DATA_9 has not been filled"); } @@ -7667,7 +7632,7 @@ public Trace validateRow() { "hub.PRC_SUCCESS_CALLER_WONT_REVERT_xor_SHF_FLAG has not been filled"); } - if (!filled.get(123)) { + if (!filled.get(130)) { throw new IllegalStateException("hub.PRIORITY_FEE_PER_GAS has not been filled"); } @@ -7683,7 +7648,7 @@ public Trace validateRow() { throw new IllegalStateException("hub.REFUND_COUNTER has not been filled"); } - if (!filled.get(124)) { + if (!filled.get(131)) { throw new IllegalStateException("hub.REFUND_COUNTER_INFINITY has not been filled"); } @@ -7691,7 +7656,7 @@ public Trace validateRow() { throw new IllegalStateException("hub.REFUND_COUNTER_NEW has not been filled"); } - if (!filled.get(125)) { + if (!filled.get(132)) { throw new IllegalStateException("hub.REFUND_EFFECTIVE has not been filled"); } @@ -7699,25 +7664,25 @@ public Trace validateRow() { throw new IllegalStateException("hub.RELATIVE_BLOCK_NUMBER has not been filled"); } - if (!filled.get(112)) { + if (!filled.get(115)) { throw new IllegalStateException("hub.RETURN_AT_CAPACITY_xor_MXP_INST has not been filled"); } - if (!filled.get(113)) { + if (!filled.get(116)) { throw new IllegalStateException("hub.RETURN_AT_OFFSET_xor_OOB_INST has not been filled"); } - if (!filled.get(114)) { + if (!filled.get(117)) { throw new IllegalStateException( "hub.RETURN_DATA_CONTEXT_NUMBER_xor_STP_GAS_STIPEND has not been filled"); } - if (!filled.get(115)) { + if (!filled.get(118)) { throw new IllegalStateException( "hub.RETURN_DATA_OFFSET_xor_STP_INSTRUCTION has not been filled"); } - if (!filled.get(116)) { + if (!filled.get(119)) { throw new IllegalStateException("hub.RETURN_DATA_SIZE has not been filled"); } @@ -7755,14 +7720,14 @@ public Trace validateRow() { "hub.RETURN_FROM_MESSAGE_CALL_WONT_TOUCH_RAM_xor_STACK_ITEM_POP_4 has not been filled"); } - if (!filled.get(108)) { + if (!filled.get(111)) { throw new IllegalStateException( "hub.RLPADDR_DEP_ADDR_HI_xor_CALL_DATA_CONTEXT_NUMBER_xor_MMU_REF_SIZE has not been filled"); } - if (!filled.get(133)) { + if (!filled.get(140)) { throw new IllegalStateException( - "hub.RLPADDR_DEP_ADDR_LO_xor_MMU_SRC_OFFSET_HI_xor_VALUE_ORIG_HI has not been filled"); + "hub.RLPADDR_DEP_ADDR_LO_xor_MMU_SRC_OFFSET_HI_xor_STACK_ITEM_VALUE_HI_4_xor_VALUE_ORIG_HI has not been filled"); } if (!filled.get(56)) { @@ -7770,27 +7735,28 @@ public Trace validateRow() { "hub.RLPADDR_FLAG_xor_STP_FLAG_xor_CALL_SMC_SUCCESS_CALLER_WILL_REVERT_xor_DEC_FLAG_3_xor_WARMTH_NEW has not been filled"); } - if (!filled.get(134)) { + if (!filled.get(141)) { throw new IllegalStateException( - "hub.RLPADDR_KEC_HI_xor_MMU_SRC_OFFSET_LO_xor_VALUE_ORIG_LO has not been filled"); + "hub.RLPADDR_KEC_HI_xor_MMU_SRC_OFFSET_LO_xor_STACK_ITEM_VALUE_LO_1_xor_VALUE_ORIG_LO has not been filled"); } - if (!filled.get(135)) { + if (!filled.get(142)) { throw new IllegalStateException( - "hub.RLPADDR_KEC_LO_xor_MMU_TGT_OFFSET_LO has not been filled"); + "hub.RLPADDR_KEC_LO_xor_MMU_TGT_OFFSET_LO_xor_STACK_ITEM_VALUE_LO_2 has not been filled"); } if (!filled.get(99)) { throw new IllegalStateException("hub.RLPADDR_RECIPE has not been filled"); } - if (!filled.get(136)) { - throw new IllegalStateException("hub.RLPADDR_SALT_HI_xor_MXP_GAS_MXP has not been filled"); + if (!filled.get(143)) { + throw new IllegalStateException( + "hub.RLPADDR_SALT_HI_xor_MXP_GAS_MXP_xor_STACK_ITEM_VALUE_LO_3 has not been filled"); } - if (!filled.get(137)) { + if (!filled.get(144)) { throw new IllegalStateException( - "hub.RLPADDR_SALT_LO_xor_MXP_OFFSET_1_HI has not been filled"); + "hub.RLPADDR_SALT_LO_xor_MXP_OFFSET_1_HI_xor_STACK_ITEM_VALUE_LO_4 has not been filled"); } if (!filled.get(57)) { @@ -7817,88 +7783,52 @@ public Trace validateRow() { "hub.SELFDESTRUCT_WONT_REVERT_NOT_YET_MARKED_xor_SUX has not been filled"); } - if (!filled.get(160)) { - throw new IllegalStateException("hub.STACK_ITEM_HEIGHT_1 has not been filled"); - } - - if (!filled.get(161)) { + if (!filled.get(101)) { throw new IllegalStateException("hub.STACK_ITEM_HEIGHT_2 has not been filled"); } - if (!filled.get(162)) { + if (!filled.get(102)) { throw new IllegalStateException("hub.STACK_ITEM_HEIGHT_3 has not been filled"); } - if (!filled.get(163)) { + if (!filled.get(103)) { throw new IllegalStateException("hub.STACK_ITEM_HEIGHT_4 has not been filled"); } - if (!filled.get(164)) { + if (!filled.get(120)) { throw new IllegalStateException("hub.STACK_ITEM_STAMP_1 has not been filled"); } - if (!filled.get(165)) { + if (!filled.get(121)) { throw new IllegalStateException("hub.STACK_ITEM_STAMP_2 has not been filled"); } - if (!filled.get(166)) { + if (!filled.get(122)) { throw new IllegalStateException("hub.STACK_ITEM_STAMP_3 has not been filled"); } - if (!filled.get(167)) { + if (!filled.get(123)) { throw new IllegalStateException("hub.STACK_ITEM_STAMP_4 has not been filled"); } - if (!filled.get(168)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_HI_1 has not been filled"); - } - - if (!filled.get(169)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_HI_2 has not been filled"); - } - - if (!filled.get(170)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_HI_3 has not been filled"); - } - - if (!filled.get(171)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_HI_4 has not been filled"); - } - - if (!filled.get(172)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_LO_1 has not been filled"); - } - - if (!filled.get(173)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_LO_2 has not been filled"); - } - - if (!filled.get(174)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_LO_3 has not been filled"); - } - - if (!filled.get(175)) { - throw new IllegalStateException("hub.STACK_ITEM_VALUE_LO_4 has not been filled"); - } - - if (!filled.get(155)) { + if (!filled.get(162)) { throw new IllegalStateException("hub.STP_GAS_HI has not been filled"); } - if (!filled.get(156)) { + if (!filled.get(163)) { throw new IllegalStateException("hub.STP_GAS_LO has not been filled"); } - if (!filled.get(119)) { + if (!filled.get(126)) { throw new IllegalStateException( "hub.STP_GAS_UPFRONT_GAS_COST_xor_GAS_LEFTOVER has not been filled"); } - if (!filled.get(157)) { + if (!filled.get(164)) { throw new IllegalStateException("hub.STP_VALUE_HI has not been filled"); } - if (!filled.get(158)) { + if (!filled.get(165)) { throw new IllegalStateException("hub.STP_VALUE_LO has not been filled"); } @@ -7915,7 +7845,7 @@ public Trace validateRow() { "hub.TRM_FLAG_xor_STP_WARMTH_xor_CREATE_ABORT_xor_DUP_FLAG has not been filled"); } - if (!filled.get(138)) { + if (!filled.get(145)) { throw new IllegalStateException( "hub.TRM_RAW_ADDRESS_HI_xor_MXP_OFFSET_1_LO has not been filled"); } @@ -7973,7 +7903,7 @@ public Trace fillAndValidateRow() { absoluteTransactionNumber.position(absoluteTransactionNumber.position() + 2); } - if (!filled.get(101)) { + if (!filled.get(104)) { addressHiXorAccountAddressHiXorCcrsStampXorPrcCalleeGasXorStaticGasXorAddressHiXorCallDataSize .position( addressHiXorAccountAddressHiXorCcrsStampXorPrcCalleeGasXorStaticGasXorAddressHiXorCallDataSize @@ -7981,7 +7911,7 @@ public Trace fillAndValidateRow() { + 4); } - if (!filled.get(126)) { + if (!filled.get(133)) { addressLoXorAccountAddressLoXorExpData1XorHashInfoKeccakHiXorAddressLoXorCoinbaseAddressLo .position( addressLoXorAccountAddressLoXorExpData1XorHashInfoKeccakHiXorAddressLoXorCoinbaseAddressLo @@ -7993,7 +7923,7 @@ public Trace fillAndValidateRow() { alpha.position(alpha.position() + 1); } - if (!filled.get(128)) { + if (!filled.get(135)) { balanceNewXorCallerAddressLoXorExpData3XorPushValueHiXorStorageKeyLoXorInitialBalance .position( balanceNewXorCallerAddressLoXorExpData3XorPushValueHiXorStorageKeyLoXorInitialBalance @@ -8001,7 +7931,7 @@ public Trace fillAndValidateRow() { + 16); } - if (!filled.get(127)) { + if (!filled.get(134)) { balanceXorByteCodeAddressLoXorExpData2XorHashInfoKeccakLoXorStorageKeyHiXorFromAddressLo .position( balanceXorByteCodeAddressLoXorExpData2XorHashInfoKeccakLoXorStorageKeyHiXorFromAddressLo @@ -8009,16 +7939,16 @@ public Trace fillAndValidateRow() { + 16); } - if (!filled.get(109)) { + if (!filled.get(112)) { callDataOffsetXorMmuSize.position(callDataOffsetXorMmuSize.position() + 4); } - if (!filled.get(110)) { + if (!filled.get(113)) { callDataSizeXorMmuSrcId.position(callDataSizeXorMmuSrcId.position() + 4); } if (!filled.get(100)) { - callStackDepth.position(callStackDepth.position() + 2); + callStackDepthXorStackItemHeight1.position(callStackDepthXorStackItemHeight1.position() + 2); } if (!filled.get(1)) { @@ -8029,7 +7959,7 @@ public Trace fillAndValidateRow() { codeFragmentIndex.position(codeFragmentIndex.position() + 4); } - if (!filled.get(102)) { + if (!filled.get(105)) { codeFragmentIndexXorAccountDeploymentNumberXorExpInstXorPrcCallerGasXorDeploymentNumberXorCoinbaseAddressHi .position( codeFragmentIndexXorAccountDeploymentNumberXorExpInstXorPrcCallerGasXorDeploymentNumberXorCoinbaseAddressHi @@ -8037,34 +7967,34 @@ public Trace fillAndValidateRow() { + 4); } - if (!filled.get(130)) { - codeHashHiNewXorExpData5XorValueCurrLoXorValue.position( - codeHashHiNewXorExpData5XorValueCurrLoXorValue.position() + 16); + if (!filled.get(137)) { + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.position( + codeHashHiNewXorExpData5XorStackItemValueHi1XorValueCurrLoXorValue.position() + 16); } - if (!filled.get(129)) { + if (!filled.get(136)) { codeHashHiXorCallValueXorExpData4XorPushValueLoXorValueCurrHiXorToAddressLo.position( codeHashHiXorCallValueXorExpData4XorPushValueLoXorValueCurrHiXorToAddressLo.position() + 16); } - if (!filled.get(132)) { - codeHashLoNewXorMmuLimb2XorValueNextLo.position( - codeHashLoNewXorMmuLimb2XorValueNextLo.position() + 16); + if (!filled.get(139)) { + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.position( + codeHashLoNewXorMmuLimb2XorStackItemValueHi3XorValueNextLo.position() + 16); } - if (!filled.get(131)) { - codeHashLoXorMmuLimb1XorValueNextHi.position( - codeHashLoXorMmuLimb1XorValueNextHi.position() + 16); + if (!filled.get(138)) { + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.position( + codeHashLoXorMmuLimb1XorStackItemValueHi2XorValueNextHi.position() + 16); } - if (!filled.get(104)) { + if (!filled.get(107)) { codeSizeNewXorByteCodeCodeFragmentIndexXorMmuExoSumXorPrcCdsXorInitCodeSize.position( codeSizeNewXorByteCodeCodeFragmentIndexXorMmuExoSumXorPrcCdsXorInitCodeSize.position() + 4); } - if (!filled.get(103)) { + if (!filled.get(106)) { codeSizeXorByteCodeAddressHiXorMmuAuxIdXorPrcCdoXorDeploymentNumberInftyXorFromAddressHi .position( codeSizeXorByteCodeAddressHiXorMmuAuxIdXorPrcCdoXorDeploymentNumberInftyXorFromAddressHi @@ -8088,7 +8018,7 @@ public Trace fillAndValidateRow() { contextNumberNew.position(contextNumberNew.position() + 4); } - if (!filled.get(111)) { + if (!filled.get(114)) { contextNumberXorMmuTgtId.position(contextNumberXorMmuTgtId.position() + 4); } @@ -8150,17 +8080,17 @@ public Trace fillAndValidateRow() { delta.position(delta.position() + 1); } - if (!filled.get(106)) { + if (!filled.get(109)) { deploymentNumberInftyXorByteCodeDeploymentStatusXorMmuPhaseXorPrcRao.position( deploymentNumberInftyXorByteCodeDeploymentStatusXorMmuPhaseXorPrcRao.position() + 4); } - if (!filled.get(107)) { + if (!filled.get(110)) { deploymentNumberNewXorCallerAddressHiXorMmuRefOffsetXorPrcReturnGas.position( deploymentNumberNewXorCallerAddressHiXorMmuRefOffsetXorPrcReturnGas.position() + 4); } - if (!filled.get(105)) { + if (!filled.get(108)) { deploymentNumberXorByteCodeDeploymentNumberXorMmuInstXorPrcRacXorToAddressHi.position( deploymentNumberXorByteCodeDeploymentNumberXorMmuInstXorPrcRacXorToAddressHi.position() + 4); @@ -8225,7 +8155,7 @@ public Trace fillAndValidateRow() { gasExpected.position(gasExpected.position() + 8); } - if (!filled.get(120)) { + if (!filled.get(127)) { gasLimit.position(gasLimit.position() + 8); } @@ -8233,7 +8163,7 @@ public Trace fillAndValidateRow() { gasNext.position(gasNext.position() + 8); } - if (!filled.get(121)) { + if (!filled.get(128)) { gasPrice.position(gasPrice.position() + 8); } @@ -8269,7 +8199,7 @@ public Trace fillAndValidateRow() { hubStampTransactionEnd.position(hubStampTransactionEnd.position() + 4); } - if (!filled.get(159)) { + if (!filled.get(166)) { instruction.position(instruction.position() + 32); } @@ -8305,27 +8235,27 @@ public Trace fillAndValidateRow() { mmuStamp.position(mmuStamp.position() + 4); } - if (!filled.get(139)) { + if (!filled.get(146)) { mxpOffset2Hi.position(mxpOffset2Hi.position() + 16); } - if (!filled.get(140)) { + if (!filled.get(147)) { mxpOffset2Lo.position(mxpOffset2Lo.position() + 16); } - if (!filled.get(141)) { + if (!filled.get(148)) { mxpSize1Hi.position(mxpSize1Hi.position() + 16); } - if (!filled.get(142)) { + if (!filled.get(149)) { mxpSize1Lo.position(mxpSize1Lo.position() + 16); } - if (!filled.get(143)) { + if (!filled.get(150)) { mxpSize2Hi.position(mxpSize2Hi.position() + 16); } - if (!filled.get(144)) { + if (!filled.get(151)) { mxpSize2Lo.position(mxpSize2Lo.position() + 16); } @@ -8333,7 +8263,7 @@ public Trace fillAndValidateRow() { mxpStamp.position(mxpStamp.position() + 4); } - if (!filled.get(145)) { + if (!filled.get(152)) { mxpWords.position(mxpWords.position() + 16); } @@ -8349,52 +8279,52 @@ public Trace fillAndValidateRow() { nonStackRows.position(nonStackRows.position() + 1); } - if (!filled.get(122)) { + if (!filled.get(129)) { nonce.position(nonce.position() + 8); } - if (!filled.get(118)) { + if (!filled.get(125)) { nonceNewXorStpGasPaidOutOfPocketXorGasInitiallyAvailable.position( nonceNewXorStpGasPaidOutOfPocketXorGasInitiallyAvailable.position() + 8); } - if (!filled.get(117)) { + if (!filled.get(124)) { nonceXorStpGasMxpXorBasefee.position(nonceXorStpGasMxpXorBasefee.position() + 8); } - if (!filled.get(146)) { + if (!filled.get(153)) { oobData1.position(oobData1.position() + 16); } - if (!filled.get(147)) { + if (!filled.get(154)) { oobData2.position(oobData2.position() + 16); } - if (!filled.get(148)) { + if (!filled.get(155)) { oobData3.position(oobData3.position() + 16); } - if (!filled.get(149)) { + if (!filled.get(156)) { oobData4.position(oobData4.position() + 16); } - if (!filled.get(150)) { + if (!filled.get(157)) { oobData5.position(oobData5.position() + 16); } - if (!filled.get(151)) { + if (!filled.get(158)) { oobData6.position(oobData6.position() + 16); } - if (!filled.get(152)) { + if (!filled.get(159)) { oobData7.position(oobData7.position() + 16); } - if (!filled.get(153)) { + if (!filled.get(160)) { oobData8.position(oobData8.position() + 16); } - if (!filled.get(154)) { + if (!filled.get(161)) { oobData9.position(oobData9.position() + 16); } @@ -8479,7 +8409,7 @@ public Trace fillAndValidateRow() { prcSuccessCallerWontRevertXorShfFlag.position() + 1); } - if (!filled.get(123)) { + if (!filled.get(130)) { priorityFeePerGas.position(priorityFeePerGas.position() + 8); } @@ -8495,7 +8425,7 @@ public Trace fillAndValidateRow() { refundCounter.position(refundCounter.position() + 4); } - if (!filled.get(124)) { + if (!filled.get(131)) { refundCounterInfinity.position(refundCounterInfinity.position() + 8); } @@ -8503,7 +8433,7 @@ public Trace fillAndValidateRow() { refundCounterNew.position(refundCounterNew.position() + 4); } - if (!filled.get(125)) { + if (!filled.get(132)) { refundEffective.position(refundEffective.position() + 8); } @@ -8511,24 +8441,24 @@ public Trace fillAndValidateRow() { relativeBlockNumber.position(relativeBlockNumber.position() + 2); } - if (!filled.get(112)) { + if (!filled.get(115)) { returnAtCapacityXorMxpInst.position(returnAtCapacityXorMxpInst.position() + 4); } - if (!filled.get(113)) { + if (!filled.get(116)) { returnAtOffsetXorOobInst.position(returnAtOffsetXorOobInst.position() + 4); } - if (!filled.get(114)) { + if (!filled.get(117)) { returnDataContextNumberXorStpGasStipend.position( returnDataContextNumberXorStpGasStipend.position() + 4); } - if (!filled.get(115)) { + if (!filled.get(118)) { returnDataOffsetXorStpInstruction.position(returnDataOffsetXorStpInstruction.position() + 4); } - if (!filled.get(116)) { + if (!filled.get(119)) { returnDataSize.position(returnDataSize.position() + 4); } @@ -8566,14 +8496,14 @@ public Trace fillAndValidateRow() { returnFromMessageCallWontTouchRamXorStackItemPop4.position() + 1); } - if (!filled.get(108)) { + if (!filled.get(111)) { rlpaddrDepAddrHiXorCallDataContextNumberXorMmuRefSize.position( rlpaddrDepAddrHiXorCallDataContextNumberXorMmuRefSize.position() + 4); } - if (!filled.get(133)) { - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.position( - rlpaddrDepAddrLoXorMmuSrcOffsetHiXorValueOrigHi.position() + 16); + if (!filled.get(140)) { + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.position( + rlpaddrDepAddrLoXorMmuSrcOffsetHiXorStackItemValueHi4XorValueOrigHi.position() + 16); } if (!filled.get(56)) { @@ -8582,25 +8512,28 @@ public Trace fillAndValidateRow() { + 1); } - if (!filled.get(134)) { - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.position( - rlpaddrKecHiXorMmuSrcOffsetLoXorValueOrigLo.position() + 16); + if (!filled.get(141)) { + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.position( + rlpaddrKecHiXorMmuSrcOffsetLoXorStackItemValueLo1XorValueOrigLo.position() + 16); } - if (!filled.get(135)) { - rlpaddrKecLoXorMmuTgtOffsetLo.position(rlpaddrKecLoXorMmuTgtOffsetLo.position() + 16); + if (!filled.get(142)) { + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.position( + rlpaddrKecLoXorMmuTgtOffsetLoXorStackItemValueLo2.position() + 16); } if (!filled.get(99)) { rlpaddrRecipe.position(rlpaddrRecipe.position() + 1); } - if (!filled.get(136)) { - rlpaddrSaltHiXorMxpGasMxp.position(rlpaddrSaltHiXorMxpGasMxp.position() + 16); + if (!filled.get(143)) { + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.position( + rlpaddrSaltHiXorMxpGasMxpXorStackItemValueLo3.position() + 16); } - if (!filled.get(137)) { - rlpaddrSaltLoXorMxpOffset1Hi.position(rlpaddrSaltLoXorMxpOffset1Hi.position() + 16); + if (!filled.get(144)) { + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.position( + rlpaddrSaltLoXorMxpOffset1HiXorStackItemValueLo4.position() + 16); } if (!filled.get(57)) { @@ -8627,88 +8560,52 @@ public Trace fillAndValidateRow() { selfdestructWontRevertNotYetMarkedXorSux.position() + 1); } - if (!filled.get(160)) { - stackItemHeight1.position(stackItemHeight1.position() + 32); - } - - if (!filled.get(161)) { - stackItemHeight2.position(stackItemHeight2.position() + 32); - } - - if (!filled.get(162)) { - stackItemHeight3.position(stackItemHeight3.position() + 32); - } - - if (!filled.get(163)) { - stackItemHeight4.position(stackItemHeight4.position() + 32); - } - - if (!filled.get(164)) { - stackItemStamp1.position(stackItemStamp1.position() + 32); - } - - if (!filled.get(165)) { - stackItemStamp2.position(stackItemStamp2.position() + 32); - } - - if (!filled.get(166)) { - stackItemStamp3.position(stackItemStamp3.position() + 32); - } - - if (!filled.get(167)) { - stackItemStamp4.position(stackItemStamp4.position() + 32); - } - - if (!filled.get(168)) { - stackItemValueHi1.position(stackItemValueHi1.position() + 32); - } - - if (!filled.get(169)) { - stackItemValueHi2.position(stackItemValueHi2.position() + 32); + if (!filled.get(101)) { + stackItemHeight2.position(stackItemHeight2.position() + 2); } - if (!filled.get(170)) { - stackItemValueHi3.position(stackItemValueHi3.position() + 32); + if (!filled.get(102)) { + stackItemHeight3.position(stackItemHeight3.position() + 2); } - if (!filled.get(171)) { - stackItemValueHi4.position(stackItemValueHi4.position() + 32); + if (!filled.get(103)) { + stackItemHeight4.position(stackItemHeight4.position() + 2); } - if (!filled.get(172)) { - stackItemValueLo1.position(stackItemValueLo1.position() + 32); + if (!filled.get(120)) { + stackItemStamp1.position(stackItemStamp1.position() + 5); } - if (!filled.get(173)) { - stackItemValueLo2.position(stackItemValueLo2.position() + 32); + if (!filled.get(121)) { + stackItemStamp2.position(stackItemStamp2.position() + 5); } - if (!filled.get(174)) { - stackItemValueLo3.position(stackItemValueLo3.position() + 32); + if (!filled.get(122)) { + stackItemStamp3.position(stackItemStamp3.position() + 5); } - if (!filled.get(175)) { - stackItemValueLo4.position(stackItemValueLo4.position() + 32); + if (!filled.get(123)) { + stackItemStamp4.position(stackItemStamp4.position() + 5); } - if (!filled.get(155)) { + if (!filled.get(162)) { stpGasHi.position(stpGasHi.position() + 16); } - if (!filled.get(156)) { + if (!filled.get(163)) { stpGasLo.position(stpGasLo.position() + 16); } - if (!filled.get(119)) { + if (!filled.get(126)) { stpGasUpfrontGasCostXorGasLeftover.position( stpGasUpfrontGasCostXorGasLeftover.position() + 8); } - if (!filled.get(157)) { + if (!filled.get(164)) { stpValueHi.position(stpValueHi.position() + 16); } - if (!filled.get(158)) { + if (!filled.get(165)) { stpValueLo.position(stpValueLo.position() + 16); } @@ -8725,7 +8622,7 @@ public Trace fillAndValidateRow() { trmFlagXorStpWarmthXorCreateAbortXorDupFlag.position() + 1); } - if (!filled.get(138)) { + if (!filled.get(145)) { trmRawAddressHiXorMxpOffset1Lo.position(trmRawAddressHiXorMxpOffset1Lo.position() + 16); } diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/fragment/StackFragment.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/fragment/StackFragment.java index 626caef6c6..2a1ecf5086 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/fragment/StackFragment.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/hub/fragment/StackFragment.java @@ -185,14 +185,14 @@ public Trace trace(Trace trace) { trace::pStackStackItemPop3, trace::pStackStackItemPop4); - final List> heightTracers = + final List> heightTracers = List.of( trace::pStackStackItemHeight1, trace::pStackStackItemHeight2, trace::pStackStackItemHeight3, trace::pStackStackItemHeight4); - final List> stampTracers = + final List> stampTracers = List.of( trace::pStackStackItemStamp1, trace::pStackStackItemStamp2, @@ -209,11 +209,11 @@ public Trace trace(Trace trace) { pushValue = eValue; } - heightTracers.get(i).apply(Bytes.ofUnsignedShort(op.height())); - valLoTracers.get(i).apply(eValue.lo()); + heightTracers.get(i).apply(op.height()); valHiTracers.get(i).apply(eValue.hi()); + valLoTracers.get(i).apply(eValue.lo()); popTracers.get(i).apply(op.action() == Stack.POP); - stampTracers.get(i).apply(Bytes.ofUnsignedLong(op.stackStamp())); + stampTracers.get(i).apply(op.stackStamp()); } final InstructionFamily currentInstFamily = stack.getCurrentOpcodeData().instructionFamily(); diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/LogData.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/LogData.java index 35509c3223..cc6c119d74 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/LogData.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/LogData.java @@ -28,7 +28,6 @@ import net.consensys.linea.zktracer.module.rlptxrcpt.RlpTxnRcpt; import net.consensys.linea.zktracer.module.rlptxrcpt.RlpTxrcptOperation; import net.consensys.linea.zktracer.types.TransactionProcessingMetadata; -import net.consensys.linea.zktracer.types.UnsignedByte; import org.apache.tuweni.bytes.Bytes; import org.hyperledger.besu.evm.log.Log; @@ -118,7 +117,7 @@ public void traceLogWoData(final int absLogNum, final int absLogNumMax, Trace tr .logsData(false) .sizeTotal(0) .sizeAcc(0) - .sizeLimb(UnsignedByte.ZERO) + .sizeLimb(0) .limb(Bytes.EMPTY) .index(0) .validateRow(); @@ -135,7 +134,7 @@ public void traceLog(final Log log, final int absLogNum, final int absLogNumMax, .logsData(true) .sizeTotal(log.getData().size()) .sizeAcc(index == indexMax ? log.getData().size() : 16L * (index + 1)) - .sizeLimb(index == indexMax ? UnsignedByte.of(lastLimbSize) : UnsignedByte.of(16)) + .sizeLimb(index == indexMax ? lastLimbSize : 16) .limb(dataPadded.slice(16 * index, 16)) .index(index) .validateRow(); diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/Trace.java index 4e90eaccfe..b565f0b754 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/logdata/Trace.java @@ -20,7 +20,6 @@ import java.util.List; import net.consensys.linea.zktracer.ColumnHeader; -import net.consensys.linea.zktracer.types.UnsignedByte; import org.apache.tuweni.bytes.Bytes; /** @@ -180,14 +179,17 @@ public Trace sizeAcc(final long b) { return this; } - public Trace sizeLimb(final UnsignedByte b) { + public Trace sizeLimb(final long b) { if (filled.get(6)) { throw new IllegalStateException("logdata.SIZE_LIMB already set"); } else { filled.set(6); } - sizeLimb.put(b.toByte()); + if (b >= 32L) { + throw new IllegalArgumentException("sizeLimb has invalid value (" + b + ")"); + } + sizeLimb.put((byte) b); return this; } diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/MulOperation.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/MulOperation.java index d0c31cdead..4be908d8db 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/MulOperation.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/MulOperation.java @@ -473,7 +473,7 @@ private void traceSubOp(Trace trace, int stamp) { .exponentBitAccumulator(expAcc) .exponentBitSource(isExponentInSource()) .squareAndMultiply(squareAndMultiply) - .bitNum(UnsignedByte.of(getBitNum())) + .bitNum(getBitNum()) .validateRow(); } } diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/Trace.java index 9eb516570d..1d31c1a288 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mul/Trace.java @@ -88,22 +88,22 @@ public class Trace { static List headers(int length) { return List.of( - new ColumnHeader("mul.ACC_A_0", 32, length), - new ColumnHeader("mul.ACC_A_1", 32, length), - new ColumnHeader("mul.ACC_A_2", 32, length), - new ColumnHeader("mul.ACC_A_3", 32, length), - new ColumnHeader("mul.ACC_B_0", 32, length), - new ColumnHeader("mul.ACC_B_1", 32, length), - new ColumnHeader("mul.ACC_B_2", 32, length), - new ColumnHeader("mul.ACC_B_3", 32, length), - new ColumnHeader("mul.ACC_C_0", 32, length), - new ColumnHeader("mul.ACC_C_1", 32, length), - new ColumnHeader("mul.ACC_C_2", 32, length), - new ColumnHeader("mul.ACC_C_3", 32, length), - new ColumnHeader("mul.ACC_H_0", 32, length), - new ColumnHeader("mul.ACC_H_1", 32, length), - new ColumnHeader("mul.ACC_H_2", 32, length), - new ColumnHeader("mul.ACC_H_3", 32, length), + new ColumnHeader("mul.ACC_A_0", 8, length), + new ColumnHeader("mul.ACC_A_1", 8, length), + new ColumnHeader("mul.ACC_A_2", 8, length), + new ColumnHeader("mul.ACC_A_3", 8, length), + new ColumnHeader("mul.ACC_B_0", 8, length), + new ColumnHeader("mul.ACC_B_1", 8, length), + new ColumnHeader("mul.ACC_B_2", 8, length), + new ColumnHeader("mul.ACC_B_3", 8, length), + new ColumnHeader("mul.ACC_C_0", 8, length), + new ColumnHeader("mul.ACC_C_1", 8, length), + new ColumnHeader("mul.ACC_C_2", 8, length), + new ColumnHeader("mul.ACC_C_3", 8, length), + new ColumnHeader("mul.ACC_H_0", 8, length), + new ColumnHeader("mul.ACC_H_1", 8, length), + new ColumnHeader("mul.ACC_H_2", 8, length), + new ColumnHeader("mul.ACC_H_3", 8, length), new ColumnHeader("mul.ARG_1_HI", 16, length), new ColumnHeader("mul.ARG_1_LO", 16, length), new ColumnHeader("mul.ARG_2_HI", 16, length), @@ -128,7 +128,7 @@ static List headers(int length) { new ColumnHeader("mul.BYTE_H_3", 1, length), new ColumnHeader("mul.COUNTER", 1, length), new ColumnHeader("mul.EXPONENT_BIT", 1, length), - new ColumnHeader("mul.EXPONENT_BIT_ACCUMULATOR", 32, length), + new ColumnHeader("mul.EXPONENT_BIT_ACCUMULATOR", 16, length), new ColumnHeader("mul.EXPONENT_BIT_SOURCE", 1, length), new ColumnHeader("mul.INSTRUCTION", 1, length), new ColumnHeader("mul.MUL_STAMP", 4, length), @@ -213,11 +213,11 @@ public Trace accA0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA0.put((byte) 0); } // Write bytes @@ -238,11 +238,11 @@ public Trace accA1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA1.put((byte) 0); } // Write bytes @@ -263,11 +263,11 @@ public Trace accA2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA2.put((byte) 0); } // Write bytes @@ -288,11 +288,11 @@ public Trace accA3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accA3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accA3.put((byte) 0); } // Write bytes @@ -313,11 +313,11 @@ public Trace accB0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB0.put((byte) 0); } // Write bytes @@ -338,11 +338,11 @@ public Trace accB1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB1.put((byte) 0); } // Write bytes @@ -363,11 +363,11 @@ public Trace accB2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB2.put((byte) 0); } // Write bytes @@ -388,11 +388,11 @@ public Trace accB3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accB3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accB3.put((byte) 0); } // Write bytes @@ -413,11 +413,11 @@ public Trace accC0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC0.put((byte) 0); } // Write bytes @@ -438,11 +438,11 @@ public Trace accC1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC1.put((byte) 0); } // Write bytes @@ -463,11 +463,11 @@ public Trace accC2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC2.put((byte) 0); } // Write bytes @@ -488,11 +488,11 @@ public Trace accC3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accC3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accC3.put((byte) 0); } // Write bytes @@ -513,11 +513,11 @@ public Trace accH0(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH0 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH0.put((byte) 0); } // Write bytes @@ -538,11 +538,11 @@ public Trace accH1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH1.put((byte) 0); } // Write bytes @@ -563,11 +563,11 @@ public Trace accH2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH2.put((byte) 0); } // Write bytes @@ -588,11 +588,11 @@ public Trace accH3(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 64) { throw new IllegalArgumentException("accH3 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 8; i++) { accH3.put((byte) 0); } // Write bytes @@ -703,14 +703,17 @@ public Trace arg2Lo(final Bytes b) { return this; } - public Trace bitNum(final UnsignedByte b) { + public Trace bitNum(final long b) { if (filled.get(21)) { throw new IllegalStateException("mul.BIT_NUM already set"); } else { filled.set(21); } - bitNum.put(b.toByte()); + if (b >= 128L) { + throw new IllegalArgumentException("bitNum has invalid value (" + b + ")"); + } + bitNum.put((byte) b); return this; } @@ -953,12 +956,12 @@ public Trace exponentBitAccumulator(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( "exponentBitAccumulator has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { exponentBitAccumulator.put((byte) 0); } // Write bytes @@ -1334,67 +1337,67 @@ public Trace validateRow() { public Trace fillAndValidateRow() { if (!filled.get(0)) { - accA0.position(accA0.position() + 32); + accA0.position(accA0.position() + 8); } if (!filled.get(1)) { - accA1.position(accA1.position() + 32); + accA1.position(accA1.position() + 8); } if (!filled.get(2)) { - accA2.position(accA2.position() + 32); + accA2.position(accA2.position() + 8); } if (!filled.get(3)) { - accA3.position(accA3.position() + 32); + accA3.position(accA3.position() + 8); } if (!filled.get(4)) { - accB0.position(accB0.position() + 32); + accB0.position(accB0.position() + 8); } if (!filled.get(5)) { - accB1.position(accB1.position() + 32); + accB1.position(accB1.position() + 8); } if (!filled.get(6)) { - accB2.position(accB2.position() + 32); + accB2.position(accB2.position() + 8); } if (!filled.get(7)) { - accB3.position(accB3.position() + 32); + accB3.position(accB3.position() + 8); } if (!filled.get(8)) { - accC0.position(accC0.position() + 32); + accC0.position(accC0.position() + 8); } if (!filled.get(9)) { - accC1.position(accC1.position() + 32); + accC1.position(accC1.position() + 8); } if (!filled.get(10)) { - accC2.position(accC2.position() + 32); + accC2.position(accC2.position() + 8); } if (!filled.get(11)) { - accC3.position(accC3.position() + 32); + accC3.position(accC3.position() + 8); } if (!filled.get(12)) { - accH0.position(accH0.position() + 32); + accH0.position(accH0.position() + 8); } if (!filled.get(13)) { - accH1.position(accH1.position() + 32); + accH1.position(accH1.position() + 8); } if (!filled.get(14)) { - accH2.position(accH2.position() + 32); + accH2.position(accH2.position() + 8); } if (!filled.get(15)) { - accH3.position(accH3.position() + 32); + accH3.position(accH3.position() + 8); } if (!filled.get(16)) { @@ -1494,7 +1497,7 @@ public Trace fillAndValidateRow() { } if (!filled.get(40)) { - exponentBitAccumulator.position(exponentBitAccumulator.position() + 32); + exponentBitAccumulator.position(exponentBitAccumulator.position() + 16); } if (!filled.get(41)) { diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mxp/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mxp/Trace.java index e935cfcace..b825f4a414 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mxp/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/mxp/Trace.java @@ -121,9 +121,9 @@ static List headers(int length) { new ColumnHeader("mxp.GWORD", 8, length), new ColumnHeader("mxp.INST", 1, length), new ColumnHeader("mxp.LIN_COST", 8, length), - new ColumnHeader("mxp.MAX_OFFSET", 32, length), - new ColumnHeader("mxp.MAX_OFFSET_1", 32, length), - new ColumnHeader("mxp.MAX_OFFSET_2", 32, length), + new ColumnHeader("mxp.MAX_OFFSET", 16, length), + new ColumnHeader("mxp.MAX_OFFSET_1", 16, length), + new ColumnHeader("mxp.MAX_OFFSET_2", 16, length), new ColumnHeader("mxp.MTNTOP", 1, length), new ColumnHeader("mxp.MXP_TYPE_1", 1, length), new ColumnHeader("mxp.MXP_TYPE_2", 1, length), @@ -741,12 +741,12 @@ public Trace maxOffset(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( "maxOffset has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { maxOffset.put((byte) 0); } // Write bytes @@ -767,12 +767,12 @@ public Trace maxOffset1(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( "maxOffset1 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { maxOffset1.put((byte) 0); } // Write bytes @@ -793,12 +793,12 @@ public Trace maxOffset2(final Bytes b) { // Trim array to size Bytes bs = b.trimLeadingZeros(); // Sanity check against expected width - if (bs.bitLength() > 256) { + if (bs.bitLength() > 128) { throw new IllegalArgumentException( "maxOffset2 has invalid width (" + bs.bitLength() + "bits)"); } // Write padding (if necessary) - for (int i = bs.size(); i < 32; i++) { + for (int i = bs.size(); i < 16; i++) { maxOffset2.put((byte) 0); } // Write bytes @@ -1543,15 +1543,15 @@ public Trace fillAndValidateRow() { } if (!filled.get(28)) { - maxOffset.position(maxOffset.position() + 32); + maxOffset.position(maxOffset.position() + 16); } if (!filled.get(29)) { - maxOffset1.position(maxOffset1.position() + 32); + maxOffset1.position(maxOffset1.position() + 16); } if (!filled.get(30)) { - maxOffset2.position(maxOffset2.position() + 32); + maxOffset2.position(maxOffset2.position() + 16); } if (!filled.get(31)) { diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/rlptxrcpt/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/rlptxrcpt/Trace.java index d1859b1d0e..3962236e83 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/rlptxrcpt/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/rlptxrcpt/Trace.java @@ -105,7 +105,7 @@ static List headers(int length) { new ColumnHeader("rlptxrcpt.DEPTH_1", 1, length), new ColumnHeader("rlptxrcpt.DONE", 1, length), new ColumnHeader("rlptxrcpt.INDEX", 3, length), - new ColumnHeader("rlptxrcpt.INDEX_LOCAL", 2, length), + new ColumnHeader("rlptxrcpt.INDEX_LOCAL", 3, length), new ColumnHeader("rlptxrcpt.INPUT_1", 16, length), new ColumnHeader("rlptxrcpt.INPUT_2", 16, length), new ColumnHeader("rlptxrcpt.INPUT_3", 16, length), @@ -512,9 +512,10 @@ public Trace indexLocal(final long b) { filled.set(19); } - if (b >= 65536L) { + if (b >= 16777216L) { throw new IllegalArgumentException("indexLocal has invalid value (" + b + ")"); } + indexLocal.put((byte) (b >> 16)); indexLocal.put((byte) (b >> 8)); indexLocal.put((byte) b); @@ -1185,7 +1186,7 @@ public Trace fillAndValidateRow() { } if (!filled.get(19)) { - indexLocal.position(indexLocal.position() + 2); + indexLocal.position(indexLocal.position() + 3); } if (!filled.get(20)) { diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/shakiradata/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/shakiradata/Trace.java index 47d86ae90d..96d3a53c3d 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/shakiradata/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/shakiradata/Trace.java @@ -48,10 +48,10 @@ public class Trace { private final MappedByteBuffer nBytes; private final MappedByteBuffer nBytesAcc; private final MappedByteBuffer phase; - private final MappedByteBuffer shakiraStamp; private final MappedByteBuffer selectorKeccakResHi; private final MappedByteBuffer selectorRipemdResHi; private final MappedByteBuffer selectorSha2ResHi; + private final MappedByteBuffer shakiraStamp; private final MappedByteBuffer totalSize; static List headers(int length) { @@ -69,10 +69,10 @@ static List headers(int length) { new ColumnHeader("shakiradata.nBYTES", 1, length), new ColumnHeader("shakiradata.nBYTES_ACC", 4, length), new ColumnHeader("shakiradata.PHASE", 1, length), - new ColumnHeader("shakiradata.SHAKIRA_STAMP", 4, length), new ColumnHeader("shakiradata.SELECTOR_KECCAK_RES_HI", 1, length), new ColumnHeader("shakiradata.SELECTOR_RIPEMD_RES_HI", 1, length), new ColumnHeader("shakiradata.SELECTOR_SHA2_RES_HI", 1, length), + new ColumnHeader("shakiradata.SHAKIRA_STAMP", 4, length), new ColumnHeader("shakiradata.TOTAL_SIZE", 4, length)); } @@ -90,10 +90,10 @@ public Trace(List buffers) { this.nBytes = buffers.get(10); this.nBytesAcc = buffers.get(11); this.phase = buffers.get(12); - this.shakiraStamp = buffers.get(13); - this.selectorKeccakResHi = buffers.get(14); - this.selectorRipemdResHi = buffers.get(15); - this.selectorSha2ResHi = buffers.get(16); + this.selectorKeccakResHi = buffers.get(13); + this.selectorRipemdResHi = buffers.get(14); + this.selectorSha2ResHi = buffers.get(15); + this.shakiraStamp = buffers.get(16); this.totalSize = buffers.get(17); } @@ -263,7 +263,7 @@ public Trace nBytes(final long b) { filled.set(16); } - if (b >= 256L) { + if (b >= 32L) { throw new IllegalArgumentException("nBytes has invalid value (" + b + ")"); } nBytes.put((byte) b); @@ -301,56 +301,56 @@ public Trace phase(final UnsignedByte b) { return this; } - public Trace shakiraStamp(final long b) { + public Trace selectorKeccakResHi(final Boolean b) { if (filled.get(11)) { - throw new IllegalStateException("shakiradata.RIPSHA_STAMP already set"); + throw new IllegalStateException("shakiradata.SELECTOR_KECCAK_RES_HI already set"); } else { filled.set(11); } - if (b >= 4294967296L) { - throw new IllegalArgumentException("shakiraStamp has invalid value (" + b + ")"); - } - shakiraStamp.put((byte) (b >> 24)); - shakiraStamp.put((byte) (b >> 16)); - shakiraStamp.put((byte) (b >> 8)); - shakiraStamp.put((byte) b); + selectorKeccakResHi.put((byte) (b ? 1 : 0)); return this; } - public Trace selectorKeccakResHi(final Boolean b) { + public Trace selectorRipemdResHi(final Boolean b) { if (filled.get(12)) { - throw new IllegalStateException("shakiradata.SELECTOR_KECCAK_RES_HI already set"); + throw new IllegalStateException("shakiradata.SELECTOR_RIPEMD_RES_HI already set"); } else { filled.set(12); } - selectorKeccakResHi.put((byte) (b ? 1 : 0)); + selectorRipemdResHi.put((byte) (b ? 1 : 0)); return this; } - public Trace selectorRipemdResHi(final Boolean b) { + public Trace selectorSha2ResHi(final Boolean b) { if (filled.get(13)) { - throw new IllegalStateException("shakiradata.SELECTOR_RIPEMD_RES_HI already set"); + throw new IllegalStateException("shakiradata.SELECTOR_SHA2_RES_HI already set"); } else { filled.set(13); } - selectorRipemdResHi.put((byte) (b ? 1 : 0)); + selectorSha2ResHi.put((byte) (b ? 1 : 0)); return this; } - public Trace selectorSha2ResHi(final Boolean b) { + public Trace shakiraStamp(final long b) { if (filled.get(14)) { - throw new IllegalStateException("shakiradata.SELECTOR_SHA2_RES_HI already set"); + throw new IllegalStateException("shakiradata.SHAKIRA_STAMP already set"); } else { filled.set(14); } - selectorSha2ResHi.put((byte) (b ? 1 : 0)); + if (b >= 4294967296L) { + throw new IllegalArgumentException("shakiraStamp has invalid value (" + b + ")"); + } + shakiraStamp.put((byte) (b >> 24)); + shakiraStamp.put((byte) (b >> 16)); + shakiraStamp.put((byte) (b >> 8)); + shakiraStamp.put((byte) b); return this; } @@ -427,19 +427,19 @@ public Trace validateRow() { } if (!filled.get(11)) { - throw new IllegalStateException("shakiradata.RIPSHA_STAMP has not been filled"); + throw new IllegalStateException("shakiradata.SELECTOR_KECCAK_RES_HI has not been filled"); } if (!filled.get(12)) { - throw new IllegalStateException("shakiradata.SELECTOR_KECCAK_RES_HI has not been filled"); + throw new IllegalStateException("shakiradata.SELECTOR_RIPEMD_RES_HI has not been filled"); } if (!filled.get(13)) { - throw new IllegalStateException("shakiradata.SELECTOR_RIPEMD_RES_HI has not been filled"); + throw new IllegalStateException("shakiradata.SELECTOR_SHA2_RES_HI has not been filled"); } if (!filled.get(14)) { - throw new IllegalStateException("shakiradata.SELECTOR_SHA2_RES_HI has not been filled"); + throw new IllegalStateException("shakiradata.SHAKIRA_STAMP has not been filled"); } if (!filled.get(15)) { @@ -506,19 +506,19 @@ public Trace fillAndValidateRow() { } if (!filled.get(11)) { - shakiraStamp.position(shakiraStamp.position() + 4); + selectorKeccakResHi.position(selectorKeccakResHi.position() + 1); } if (!filled.get(12)) { - selectorKeccakResHi.position(selectorKeccakResHi.position() + 1); + selectorRipemdResHi.position(selectorRipemdResHi.position() + 1); } if (!filled.get(13)) { - selectorRipemdResHi.position(selectorRipemdResHi.position() + 1); + selectorSha2ResHi.position(selectorSha2ResHi.position() + 1); } if (!filled.get(14)) { - selectorSha2ResHi.position(selectorSha2ResHi.position() + 1); + shakiraStamp.position(shakiraStamp.position() + 4); } if (!filled.get(15)) { diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/InstructionDecoder.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/InstructionDecoder.java index fbf4c18893..ef803da5ea 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/InstructionDecoder.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/InstructionDecoder.java @@ -15,6 +15,8 @@ package net.consensys.linea.zktracer.module.tables.instructionDecoder; +import static net.consensys.linea.zktracer.module.tables.instructionDecoder.Trace.headers; + import java.nio.MappedByteBuffer; import java.util.List; @@ -111,7 +113,8 @@ public int lineCount() { @Override public List columnsHeaders() { - return Trace.headers(this.lineCount()); + return headers(this.lineCount()); + // return Trace.headers(this.lineCount()); } @Override diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/Trace.java index 5e947f56c0..be4f6049b9 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/instructionDecoder/Trace.java @@ -82,7 +82,7 @@ public class Trace { private final MappedByteBuffer staticGas; private final MappedByteBuffer twoLineInstruction; - static List headers(int length) { + public static List headers(int length) { return List.of( new ColumnHeader("instdecoder.ALPHA", 1, length), new ColumnHeader("instdecoder.BILLING_PER_BYTE", 1, length), @@ -129,7 +129,7 @@ static List headers(int length) { new ColumnHeader("instdecoder.NB_REMOVED", 1, length), new ColumnHeader("instdecoder.OPCODE", 32, length), new ColumnHeader("instdecoder.STATIC_FLAG", 1, length), - new ColumnHeader("instdecoder.STATIC_GAS", 8, length), + new ColumnHeader("instdecoder.STATIC_GAS", 4, length), new ColumnHeader("instdecoder.TWO_LINE_INSTRUCTION", 1, length)); } @@ -714,11 +714,20 @@ public Trace opcode(final Bytes b) { filled.set(43); } - final byte[] bs = b.toArrayUnsafe(); - for (int i = bs.length; i < 32; i++) { + // Trim array to size + Bytes bs = b.trimLeadingZeros(); + // Sanity check against expected width + if (bs.bitLength() > 256) { + throw new IllegalArgumentException("opcode has invalid width (" + bs.bitLength() + "bits)"); + } + // Write padding (if necessary) + for (int i = bs.size(); i < 32; i++) { opcode.put((byte) 0); } - opcode.put(b.toArrayUnsafe()); + // Write bytes + for (int j = 0; j < bs.size(); j++) { + opcode.put(bs.get(j)); + } return this; } @@ -742,7 +751,13 @@ public Trace staticGas(final long b) { filled.set(45); } - staticGas.putLong(b); + if (b >= 4294967296L) { + throw new IllegalArgumentException("staticGas has invalid value (" + b + ")"); + } + staticGas.put((byte) (b >> 24)); + staticGas.put((byte) (b >> 16)); + staticGas.put((byte) (b >> 8)); + staticGas.put((byte) b); return this; } @@ -1136,7 +1151,7 @@ public Trace fillAndValidateRow() { } if (!filled.get(45)) { - staticGas.position(staticGas.position() + 8); + staticGas.position(staticGas.position() + 4); } if (!filled.get(46)) { diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/shf/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/shf/Trace.java index 41b3513a03..7d55d1e539 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/shf/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/tables/shf/Trace.java @@ -40,7 +40,7 @@ public class Trace { private final MappedByteBuffer ones; private final MappedByteBuffer rap; - static List headers(int length) { + public static List headers(int length) { return List.of( new ColumnHeader("shfreftable.BYTE1", 1, length), new ColumnHeader("shfreftable.IOMF", 1, length), diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/Trace.java index 23a1d4cd1f..684ec0105c 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/Trace.java @@ -181,14 +181,17 @@ public Trace byteLo(final UnsignedByte b) { return this; } - public Trace ct(final UnsignedByte b) { + public Trace ct(final long b) { if (filled.get(5)) { throw new IllegalStateException("trm.CT already set"); } else { filled.set(5); } - ct.put(b.toByte()); + if (b >= 16L) { + throw new IllegalArgumentException("ct has invalid value (" + b + ")"); + } + ct.put((byte) b); return this; } diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/TrmOperation.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/TrmOperation.java index 5d1a54ab66..e932a12895 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/TrmOperation.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/trm/TrmOperation.java @@ -51,7 +51,7 @@ void trace(Trace trace, final int stamp) { for (int ct = 0; ct < MAX_CT; ct++) { trace - .ct(UnsignedByte.of(ct)) + .ct(ct) .stamp(stamp) .isPrecompile(isPrec) .pbit(ct >= PIVOT_BIT_FLIPS_TO_TRUE) diff --git a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/txndata/Trace.java b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/txndata/Trace.java index 744549660e..0a5ff46c2b 100644 --- a/arithmetization/src/main/java/net/consensys/linea/zktracer/module/txndata/Trace.java +++ b/arithmetization/src/main/java/net/consensys/linea/zktracer/module/txndata/Trace.java @@ -39,6 +39,9 @@ public class Trace { public static final int COMMON_RLP_TXN_PHASE_NUMBER_4 = 0xa; public static final int COMMON_RLP_TXN_PHASE_NUMBER_5 = 0x7; public static final int CREATE2_SHIFT = 0xff; + public static final int CT_MAX_TYPE_0 = 0x7; + public static final int CT_MAX_TYPE_1 = 0x8; + public static final int CT_MAX_TYPE_2 = 0x8; public static final long EIP2681_MAX_NONCE = 0xffffffffffffffffL; public static final int EIP_3541_MARKER = 0xef; public static final BigInteger EMPTY_KECCAK_HI = @@ -250,6 +253,7 @@ public class Trace { public static final int LINEA_CHAIN_ID = 0xe708; public static final int LINEA_DIFFICULTY = 0x2; public static final int LINEA_GOERLI_CHAIN_ID = 0xe704; + public static final int LINEA_MAX_NUMBER_OF_TRANSACTIONS_IN_BATCH = 0xc8; public static final int LINEA_SEPOLIA_CHAIN_ID = 0xe705; public static final int LLARGE = 0x10; public static final int LLARGEMO = 0xf; @@ -335,8 +339,7 @@ public class Trace { public static final int PHASE_RIPEMD_RESULT = 0x4; public static final int PHASE_SHA2_DATA = 0x1; public static final int PHASE_SHA2_RESULT = 0x2; - public static final int REFUND_CONST_R_SCLEAR = 0x3a98; - public static final int REFUND_CONST_R_SELFDESTRUCT = 0x5dc0; + public static final int REFUND_CONST_R_SCLEAR = 0x12c0; public static final int RLP_ADDR_RECIPE_1 = 0x1; public static final int RLP_ADDR_RECIPE_2 = 0x2; public static final int RLP_PREFIX_INT_LONG = 0xb7; @@ -376,15 +379,15 @@ public class Trace { public static final int WCP_INST_LEQ = 0xf; public static final int WORD_SIZE = 0x20; public static final int WORD_SIZE_MO = 0x1f; - public static final int comparaison___computing_effective_gas_price_row_offset = 0x8; - public static final int comparaison___detecting_empty_call_data_row_offset = 0x5; - public static final int comparaison___effective_refund_row_offset = 0x4; - public static final int comparaison___initial_balance_row_offset = 0x1; - public static final int comparaison___max_fee_and_basefee_row_offset = 0x6; - public static final int comparaison___maxfee_and_max_priority_fee_row_offset = 0x7; - public static final int comparaison___nonce_row_offset = 0x0; - public static final int comparaison___sufficient_gas_row_offset = 0x2; - public static final int comparaison___upper_limit_refunds_row_offset = 0x3; + public static final int row_offset___computing_effective_gas_price_comparison = 0x8; + public static final int row_offset___detecting_empty_call_data_comparison = 0x5; + public static final int row_offset___effective_refund_comparison = 0x4; + public static final int row_offset___initial_balance_comparison = 0x1; + public static final int row_offset___max_fee_and_basefee_comparison = 0x6; + public static final int row_offset___max_fee_and_max_priority_fee_comparison = 0x7; + public static final int row_offset___nonce_comparison = 0x0; + public static final int row_offset___sufficient_gas_comparison = 0x2; + public static final int row_offset___upper_limit_refunds_comparison = 0x3; private final BitSet filled = new BitSet(); private int currentLine = 0; diff --git a/linea-constraints b/linea-constraints index 1c658b55bc..002849ab25 160000 --- a/linea-constraints +++ b/linea-constraints @@ -1 +1 @@ -Subproject commit 1c658b55bcde39395b636f1ff70cb93aaee2d06b +Subproject commit 002849ab253e574092478d06fe8881cef7c3ea6a