From f3b9ee7bfbf05323419609eced3023aa801dd855 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Mon, 21 Jun 2021 12:29:56 -0700 Subject: [PATCH 1/2] l2geth: prevent overflow in abi encoding to ovm codec tx --- l2geth/core/state_transition_ovm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l2geth/core/state_transition_ovm.go b/l2geth/core/state_transition_ovm.go index fbdf124d3cbc..5d84acbc4828 100644 --- a/l2geth/core/state_transition_ovm.go +++ b/l2geth/core/state_transition_ovm.go @@ -111,7 +111,7 @@ func EncodeSimulatedMessage(msg Message, timestamp, blockNumber *big.Int, execut uint8(msg.QueueOrigin()), *msg.L1MessageSender(), *to, - big.NewInt(int64(msg.Gas())), + new(big.Int).SetUint64(msg.Gas()), msg.Data(), } From 0ff1865d1270e2886be20343ffbe13978f2c8fa8 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Mon, 21 Jun 2021 12:32:55 -0700 Subject: [PATCH 2/2] chore: add changeset --- .changeset/happy-dancers-raise.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/happy-dancers-raise.md diff --git a/.changeset/happy-dancers-raise.md b/.changeset/happy-dancers-raise.md new file mode 100644 index 000000000000..a0e37bb17399 --- /dev/null +++ b/.changeset/happy-dancers-raise.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/l2geth': patch +--- + +Prevent overflows in abi encoding of ovm codec transaction from geth types.Transaction