Skip to content

Commit

Permalink
fix: increase gas limit for bridged erc20 deposits (#45)
Browse files Browse the repository at this point in the history
The gas limit of 16k seems to be fine for addresses that already have an
entry in the erc20 balance storage map, but is too low for new entries.
Based on preliminary testing, 64k seems to be a good value with some
buffer.
  • Loading branch information
mycodecrafting authored Sep 27, 2024
1 parent 4af3f1f commit f397898
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions grpc/execution/validation.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package execution

import (
astriaPb "buf.build/gen/go/astria/execution-apis/protocolbuffers/go/astria/execution/v1alpha2"
sequencerblockv1alpha1 "buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go/astria/sequencerblock/v1alpha1"
"crypto/sha256"
"fmt"
"math/big"

astriaPb "buf.build/gen/go/astria/execution-apis/protocolbuffers/go/astria/execution/v1alpha2"
sequencerblockv1alpha1 "buf.build/gen/go/astria/sequencerblock-apis/protocolbuffers/go/astria/sequencerblock/v1alpha1"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/contracts"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"math/big"
)

// `validateAndUnmarshalSequencerTx` validates and unmarshals the given rollup sequencer transaction.
Expand Down Expand Up @@ -68,7 +69,7 @@ func validateAndUnmarshalSequencerTx(
//
// the fees are spent from the "bridge account" which is not actually a real account, but is instead some
// address defined by consensus, so the gas cost is not actually deducted from any account.
Gas: 16000,
Gas: 64000,
To: &bac.Erc20Asset.ContractAddress,
Data: calldata,
}
Expand Down

0 comments on commit f397898

Please sign in to comment.