Skip to content

Commit

Permalink
fix(relayer): skip manual gas estimation for arb mainnet (#2847)
Browse files Browse the repository at this point in the history
Skip manual gas estimation for arb mainnet, like we do for arb sepolia. 

issue: none
  • Loading branch information
kevinhalliday authored Jan 21, 2025
1 parent 1047e3e commit 6389aca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion relayer/app/gas.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ func newGasEstimator(network netconf.ID) gasEstimator {

// Some destination chains do not need this model and can simply rely on the proper gas estimation.
skipModel := map[uint64]bool{
evmchain.IDArbSepolia: true, // Arbitrum has non-standard gas usage, and super-fast blocks, so we skip the model.
evmchain.IDArbSepolia: true, // Arbitrum has non-standard gas usage, and super-fast blocks, so we skip the model.
evmchain.IDArbitrumOne: true,
}

return func(destChain uint64, msgs []xchain.Msg) uint64 {
Expand Down
15 changes: 14 additions & 1 deletion relayer/app/gas_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestGasEstimator(t *testing.T) {
gas: properGasEstimation,
},
{
name: "arb destination",
name: "arb sepolia destination",
network: netconf.Mainnet,
destChain: evmchain.IDArbSepolia,
msgs: []xchain.Msg{
Expand All @@ -64,6 +64,19 @@ func TestGasEstimator(t *testing.T) {
},
gas: properGasEstimation,
},
{
name: "arb mainnet destination",
network: netconf.Mainnet,
destChain: evmchain.IDArbitrumOne,
msgs: []xchain.Msg{
{
MsgID: xchain.MsgID{
StreamID: xchain.StreamID{},
},
},
},
gas: properGasEstimation,
},
{
name: "arb destination from ephemeral consensus",
network: netconf.Devnet,
Expand Down

0 comments on commit 6389aca

Please sign in to comment.