Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

fix(pkg): TryParsingCustomErrorFromReceipt returns nil #776

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions bindings/encoding/custom_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
)

Expand All @@ -21,7 +20,6 @@ type BlockHashContractCallerAndTransactionReader interface {
func TryParsingCustomErrorFromReceipt(
ctx context.Context,
rpc BlockHashContractCallerAndTransactionReader,
from common.Address,
receipt *types.Receipt,
) error {
// Fetch the raw transaction.
Expand All @@ -32,7 +30,6 @@ func TryParsingCustomErrorFromReceipt(

// Call the contract at the block hash.
_, err = rpc.CallContractAtHash(ctx, ethereum.CallMsg{
From: from,
To: tx.To(),
Gas: tx.Gas(),
GasFeeCap: tx.GasFeeCap(),
Expand Down
2 changes: 2 additions & 0 deletions internal/docker/nodes/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ services:
- "0.0.0.0"
- --hardfork
- cancun
- --block-gas-limit
- "200000000"

l2_execution_engine:
container_name: l2_node
Expand Down
2 changes: 1 addition & 1 deletion proposer/proposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func (p *Proposer) ProposeTxLists(ctx context.Context, txListsBytes [][]byte) []
log.Error("Failed to fetch receipt", "txHash", txHash, "error", err)
continue
}
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, p.proposerAddress, receipt)
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, receipt)
}
}

Expand Down
4 changes: 2 additions & 2 deletions proposer/proposer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (s *ProposerTestSuite) TestProposeTxLists() {

// trigger the error
candidate.Blobs = []*eth.Blob{}
candidate.GasLimit = 10000000
candidate.GasLimit = 2000000

txCandidates[i] = *candidate
}
Expand All @@ -353,7 +353,7 @@ func (s *ProposerTestSuite) TestProposeTxLists() {
log.Error("Failed to fetch receipt", "txHash", txHash, "error", err)
continue
}
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, p.proposerAddress, receipt)
errors[i] = encoding.TryParsingCustomErrorFromReceipt(ctx, p.rpc.L1, receipt)
}
}

Expand Down
4 changes: 2 additions & 2 deletions prover/proof_submitter/transaction/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func (s *Sender) Send(
"Failed to submit proof",
"blockID", proofWithHeader.BlockID,
"tier", proofWithHeader.Tier,
"txHash", receipt.TxHash,
"error", encoding.TryParsingCustomErrorFromReceipt(ctx, s.rpc.L1, s.txmgr.From(), receipt),
"txHash", receipt.TxHash.String(),
"error", encoding.TryParsingCustomErrorFromReceipt(ctx, s.rpc.L1, receipt),
)
metrics.ProverSubmissionRevertedCounter.Add(1)
return ErrUnretryableSubmission
Expand Down
Loading