diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index f689dfbc35..4cb2af251a 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,13 +1,13 @@ ---- -name: "Pull Request Labeler" -on: - - pull_request_target +# --- +# name: "Pull Request Labeler" +# on: +# - pull_request_target -jobs: - pr-labeler: - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@main - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler.yml +# jobs: +# pr-labeler: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/labeler@main +# with: +# repo-token: "${{ secrets.GITHUB_TOKEN }}" +# configuration-path: .github/labeler.yml diff --git a/go/batch-submitter/drivers/proposer/driver.go b/go/batch-submitter/drivers/proposer/driver.go index 5829cffc91..13c87f0c90 100644 --- a/go/batch-submitter/drivers/proposer/driver.go +++ b/go/batch-submitter/drivers/proposer/driver.go @@ -220,7 +220,7 @@ func (d *Driver) CraftBatchTx( // so in the event their API is unreachable we can fallback to a degraded // mode of operation. This also applies to our test environments, as hardhat // doesn't support the query either. - case drivers.IsMaxPriorityFeePerGasNotFoundError(err): + case drivers.IsMaxPriorityFeePerGasNotFoundError(err) || drivers.IsMaxPriorityFeePerGasNotSupportedError(err): log.Warn(d.cfg.Name + " eth_maxPriorityFeePerGas is unsupported " + "by current backend, using fallback gasTipCap") opts.GasTipCap = drivers.FallbackGasTipCap @@ -265,7 +265,7 @@ func (d *Driver) SubmitBatchTx( // so in the event their API is unreachable we can fallback to a degraded // mode of operation. This also applies to our test environments, as hardhat // doesn't support the query either. - case drivers.IsMaxPriorityFeePerGasNotFoundError(err): + case drivers.IsMaxPriorityFeePerGasNotFoundError(err) || drivers.IsMaxPriorityFeePerGasNotSupportedError(err): log.Warn(d.cfg.Name + " eth_maxPriorityFeePerGas is unsupported " + "by current backend, using fallback gasTipCap") opts.GasTipCap = drivers.FallbackGasTipCap diff --git a/go/batch-submitter/drivers/sequencer/driver.go b/go/batch-submitter/drivers/sequencer/driver.go index 8d2ceff258..eae44665a0 100644 --- a/go/batch-submitter/drivers/sequencer/driver.go +++ b/go/batch-submitter/drivers/sequencer/driver.go @@ -251,7 +251,7 @@ func (d *Driver) CraftBatchTx( // method, so in the event their API is unreachable we can fallback to a // degraded mode of operation. This also applies to our test // environments, as hardhat doesn't support the query either. - case drivers.IsMaxPriorityFeePerGasNotFoundError(err): + case drivers.IsMaxPriorityFeePerGasNotFoundError(err) || drivers.IsMaxPriorityFeePerGasNotSupportedError(err): log.Warn(d.cfg.Name + " eth_maxPriorityFeePerGas is unsupported " + "by current backend, using fallback gasTipCap") opts.GasTipCap = drivers.FallbackGasTipCap @@ -295,7 +295,7 @@ func (d *Driver) SubmitBatchTx( // so in the event their API is unreachable we can fallback to a degraded // mode of operation. This also applies to our test environments, as hardhat // doesn't support the query either. - case drivers.IsMaxPriorityFeePerGasNotFoundError(err): + case drivers.IsMaxPriorityFeePerGasNotFoundError(err) || drivers.IsMaxPriorityFeePerGasNotSupportedError(err): log.Warn(d.cfg.Name + " eth_maxPriorityFeePerGas is unsupported " + "by current backend, using fallback gasTipCap") opts.GasTipCap = drivers.FallbackGasTipCap diff --git a/go/bss-core/drivers/clear_pending_tx.go b/go/bss-core/drivers/clear_pending_tx.go index b8117601b8..d09b41f966 100644 --- a/go/bss-core/drivers/clear_pending_tx.go +++ b/go/bss-core/drivers/clear_pending_tx.go @@ -138,7 +138,7 @@ func SignClearingTx( gasTipCap, err := l1Client.SuggestGasTipCap(ctx) if err != nil { - if !IsMaxPriorityFeePerGasNotFoundError(err) { + if !IsMaxPriorityFeePerGasNotFoundError(err) && !IsMaxPriorityFeePerGasNotSupportedError(err) { return nil, err } diff --git a/go/bss-core/drivers/max_priority_fee_fallback.go b/go/bss-core/drivers/max_priority_fee_fallback.go index 76722fcbc3..3073976a3d 100644 --- a/go/bss-core/drivers/max_priority_fee_fallback.go +++ b/go/bss-core/drivers/max_priority_fee_fallback.go @@ -11,6 +11,10 @@ var ( "Method eth_maxPriorityFeePerGas not found", ) + errMaxPriorityFeePerGasNotSupported = errors.New( + "Method eth_maxPriorityFeePerGas is not supported", + ) + // FallbackGasTipCap is the default fallback gasTipCap used when we are // unable to query an L1 backend for a suggested gasTipCap. FallbackGasTipCap = big.NewInt(1500000000) @@ -24,3 +28,12 @@ func IsMaxPriorityFeePerGasNotFoundError(err error) bool { err.Error(), errMaxPriorityFeePerGasNotFound.Error(), ) } + +// IsMaxPriorityFeePerGasNotSupportedError returns true if the provided error +// signals that the backend does not support the eth_maxPrirorityFeePerGas +// method. In this case, the caller should fallback to using the constant above. +func IsMaxPriorityFeePerGasNotSupportedError(err error) bool { + return strings.Contains( + err.Error(), errMaxPriorityFeePerGasNotSupported.Error(), + ) +}