From fe55870a3e2a99512b55cd07db49792c09ed3696 Mon Sep 17 00:00:00 2001 From: DavePearce Date: Sat, 17 Aug 2024 10:05:57 +0100 Subject: [PATCH] fix: swap ordering of r/s fields in tx snapshot The ordering of these two fields was incorrect, and should be swapped. This then means the TX hashes are computed correctly. Since this happens on the capture side, changes will only be noticed once the fix is deployed and new blocks captured. Existing captures contain the `r` and `s` fields in the wrong order, and need to be updated. --- .../linea/blockcapture/snapshots/TransactionSnapshot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arithmetization/src/main/java/net/consensys/linea/blockcapture/snapshots/TransactionSnapshot.java b/arithmetization/src/main/java/net/consensys/linea/blockcapture/snapshots/TransactionSnapshot.java index 3e999411fa..633358ae43 100644 --- a/arithmetization/src/main/java/net/consensys/linea/blockcapture/snapshots/TransactionSnapshot.java +++ b/arithmetization/src/main/java/net/consensys/linea/blockcapture/snapshots/TransactionSnapshot.java @@ -55,8 +55,8 @@ public record TransactionSnapshot( public static TransactionSnapshot of(Transaction tx) { return new TransactionSnapshot( - tx.getS().toString(16), tx.getR().toString(16), + tx.getS().toString(16), tx.getType() == TransactionType.FRONTIER ? tx.getV().toString(16) : tx.getYParity().toString(16),