From 76ed14d62d758e0afe4d9ef6403d6d7a3804ae2c Mon Sep 17 00:00:00 2001 From: Rachel Franks Date: Mon, 27 Jun 2022 14:19:06 -0500 Subject: [PATCH] don't mockcall redeem with value & use RetryValue --- arbos/incomingmessage.go | 2 +- arbos/tx_processor.go | 8 ++++---- arbos/util/retryable_encoding_test.go | 4 ++-- go-ethereum | 2 +- nodeInterface/NodeInterface.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arbos/incomingmessage.go b/arbos/incomingmessage.go index 77c44be060..b41b552c57 100644 --- a/arbos/incomingmessage.go +++ b/arbos/incomingmessage.go @@ -504,7 +504,7 @@ func parseSubmitRetryableMessage(rd io.Reader, header *L1IncomingMessageHeader, GasFeeCap: maxFeePerGas.Big(), Gas: gasLimitBig.Uint64(), RetryTo: pRetryTo, - Value: callvalue.Big(), + RetryValue: callvalue.Big(), Beneficiary: callvalueRefundAddress, MaxSubmissionFee: maxSubmissionFee.Big(), FeeRefundAddr: feeRefundAddress, diff --git a/arbos/tx_processor.go b/arbos/tx_processor.go index e14c9fe5a9..245063ab70 100644 --- a/arbos/tx_processor.go +++ b/arbos/tx_processor.go @@ -144,7 +144,7 @@ func (p *TxProcessor) StartTxHook() (endTxNow bool, gasUsed uint64, err error, r // mint funds with the deposit, then charge fees later availableRefund := new(big.Int).Set(tx.DepositValue) - takeFunds(availableRefund, tx.Value) + takeFunds(availableRefund, tx.RetryValue) util.MintBalance(&tx.From, tx.DepositValue, evm, scenario, "deposit") transfer := func(from, to *common.Address, amount *big.Int) error { @@ -170,7 +170,7 @@ func (p *TxProcessor) StartTxHook() (endTxNow bool, gasUsed uint64, err error, r } // move the callvalue into escrow - if err := transfer(&tx.From, &escrow, tx.Value); err != nil { + if err := transfer(&tx.From, &escrow, tx.RetryValue); err != nil { return true, 0, err, nil } @@ -183,7 +183,7 @@ func (p *TxProcessor) StartTxHook() (endTxNow bool, gasUsed uint64, err error, r timeout, tx.From, tx.RetryTo, - underlyingTx.Value(), + tx.RetryValue, tx.Beneficiary, tx.RetryData, ) @@ -257,7 +257,7 @@ func (p *TxProcessor) StartTxHook() (endTxNow bool, gasUsed uint64, err error, r if evm.Config.Debug { redeem, err := util.PackArbRetryableTxRedeem(ticketId) if err == nil { - tracingInfo.MockCall(redeem, usergas, from, types.ArbRetryableTxAddress, tx.Value) + tracingInfo.MockCall(redeem, usergas, from, types.ArbRetryableTxAddress, common.Big0) } else { glog.Error("failed to abi-encode auto-redeem", "err", err) } diff --git a/arbos/util/retryable_encoding_test.go b/arbos/util/retryable_encoding_test.go index 3b04754a18..01a1f2a46e 100644 --- a/arbos/util/retryable_encoding_test.go +++ b/arbos/util/retryable_encoding_test.go @@ -47,7 +47,7 @@ func TestRetryableEncoding(t *testing.T) { GasFeeCap: big.NewInt(76456), Gas: 37655, RetryTo: &dest, - Value: big.NewInt(23454), + RetryValue: big.NewInt(23454), Beneficiary: testhelpers.RandomAddress(), MaxSubmissionFee: big.NewInt(567356), FeeRefundAddr: testhelpers.RandomAddress(), @@ -66,7 +66,7 @@ func TestRetryableEncoding(t *testing.T) { innerTx.RequestId, innerTx.L1BaseFee, innerTx.DepositValue, - innerTx.Value, + innerTx.RetryValue, innerTx.GasFeeCap, innerTx.Gas, innerTx.MaxSubmissionFee, diff --git a/go-ethereum b/go-ethereum index 721e8fd883..7d83bf465a 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 721e8fd8835c1bcf7641d185f3d0d0c3161ae81e +Subproject commit 7d83bf465a8ee6b7699f94e41aca31cda4bb5eda diff --git a/nodeInterface/NodeInterface.go b/nodeInterface/NodeInterface.go index d5fa7ace7e..26bd951c0f 100644 --- a/nodeInterface/NodeInterface.go +++ b/nodeInterface/NodeInterface.go @@ -142,7 +142,7 @@ func (n NodeInterface) EstimateRetryableTicket( GasFeeCap: n.sourceMessage.GasPrice(), Gas: n.sourceMessage.Gas(), RetryTo: pRetryTo, - Value: l2CallValue, + RetryValue: l2CallValue, Beneficiary: callValueRefundAddress, MaxSubmissionFee: maxSubmissionFee, FeeRefundAddr: excessFeeRefundAddress,