Skip to content

Add local blocklist for malfunctioning fee-currencies to miner-worker#202

Merged
ezdac merged 6 commits intocelo8from
ezdac/issue-177
Sep 19, 2024
Merged

Add local blocklist for malfunctioning fee-currencies to miner-worker#202
ezdac merged 6 commits intocelo8from
ezdac/issue-177

Conversation

@ezdac
Copy link

@ezdac ezdac commented Aug 8, 2024

Fixes #177

This adds a fee-currency temporary blocklist to the miner's worker. A fee-currency is added to the blocklist, when any fee-currency transaction raises a specific ErrFeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the local allowlist of following blocks, and any transaction using the same fee-currency will not be considered for inclusion before executing it in the STF and thus avoiding to hit the fee-currency EVM call error again.

The ErrFeeCurrencyEVMCall error is raised as a consensus error when a fee-currency contract call (DebitFees( ) or
CreditFees( )) fails during EVM execution. This could be from an out-of-gas due to an unexpected mismatch between the intrinsic gas cost and the actual gas-cost (see #177) or any other EVM error.

Note that this error is not raised as a valid EVM-execution error within the STF, but as an consensus-relevant error. This means that the fee-currency transaction's state changes will be computed once, but the state will be reverted and the
transaction invalidated. The transaction will thus not be included in a block and will remain in the txpool.

When the execution error is first detected, the fee-currency will remain blocked for 2 hours. If the fee-currency smart-contract bug is not fixed on-chain until then, the process above will repeat and the fee-currency will be blocked once again.
This limits the amount of free compute that can be induced without paying for gas during the time a malfunctioning fee-currency is active.

The e2e tests for fee-currencies are temporarily skipped for this PR. This is to keep the diff smaller - a follow up PR that adapts and re-enables the tests is lined up #212

@ezdac ezdac force-pushed the ezdac/issue-177 branch from 5b4c905 to 8d78b2e Compare August 8, 2024 08:37
@ezdac ezdac changed the title Add fee-currency blocklist for malfunctioning fee-currencies to miner-worker Add blocklist for malfunctioning fee-currencies to miner-worker Aug 8, 2024
@ezdac ezdac changed the title Add blocklist for malfunctioning fee-currencies to miner-worker Add local blocklist for malfunctioning fee-currencies to miner-worker Aug 8, 2024
@ezdac ezdac force-pushed the ezdac/issue-177 branch 4 times, most recently from 15a7872 to 3019d53 Compare August 14, 2024 09:12
@ezdac ezdac force-pushed the ezdac/issue-177 branch 9 times, most recently from 6d992af to c51bf0a Compare August 21, 2024 14:09
@ezdac ezdac marked this pull request as ready for review August 21, 2024 14:40
@ezdac ezdac force-pushed the ezdac/issue-177 branch 2 times, most recently from fd752b7 to b9db7b9 Compare September 10, 2024 08:35
@ezdac ezdac requested a review from carterqw2 September 10, 2024 09:37
@ezdac ezdac marked this pull request as draft September 10, 2024 11:15
@ezdac ezdac changed the base branch from celo7 to celo8 September 10, 2024 12:24
@ezdac ezdac mentioned this pull request Sep 11, 2024
@ezdac ezdac marked this pull request as ready for review September 11, 2024 12:50
@ezdac ezdac force-pushed the ezdac/issue-177 branch 2 times, most recently from 5e1efd7 to 2ab741c Compare September 17, 2024 07:46
Kourin1996 pushed a commit that referenced this pull request Jul 20, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Jul 21, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Jul 26, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Jul 28, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Jul 30, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Jul 30, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Jul 31, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Jul 31, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Aug 1, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Aug 3, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Aug 5, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests
Kourin1996 pushed a commit that referenced this pull request Aug 5, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 5, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 6, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 7, 2025
…#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 7, 2025
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 7, 2025
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 8, 2025
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 11, 2025
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Kourin1996 pushed a commit that referenced this pull request Aug 11, 2025
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
karlb pushed a commit that referenced this pull request Nov 5, 2025
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
karlb pushed a commit that referenced this pull request Dec 5, 2025
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
karlb added a commit that referenced this pull request Jan 6, 2026
karlb pushed a commit that referenced this pull request Jan 6, 2026
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
piersy added a commit that referenced this pull request Jan 17, 2026
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
piersy added a commit that referenced this pull request Jan 17, 2026
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
piersy added a commit that referenced this pull request Jan 21, 2026
…iner-worker (#202)

* Add FeeCurrencyEVMCall error for credit/debit calls

This introduces an internal error that is raised as a consensus error
when a fee-currency contract call (DebitFees() or CreditFees()) fails
during EVM execution.

Note that this does not cause an EVM-execution error within the STF,
but an consensus-relevant error. This means that the fee-currency transaction
will be computed once, but the state will be reverted and the
transaction invalidated, and thus not included in a block.

* Refactor allowlist type from list to set

* Add address-blocklist struct

* Blocklist malfunctioning fee-currencies in miner

Fixes #177

This adds a fee-currency temporary blocklist to the Miner.
A fee-currency is added to the blocklist, when any fee-currency
transaction raises a FeeCurrencyEVMCall error during it's execution.
This will exclude the fee-currency from the allowlist of following
blocks, and any transaction using the same fee-currency will not be
considered for inclusion, even before executing it in the STF.

The fee-currency will remain blocked for 2 hours.
If the fee-currency smart-contract is not fixed onchain until then,
the process above will repeat and the fee-currency will be blocked
once again.
This limits the amount of free compute that can be induced during
the time a malfunctioning fee-currency is active.

* Add address-blocklist unit tests

Add comment about out-of-gas in sub-calls

Not realizing this has cost us a lot of time when investigating a
problem right after the L2 migration. So let's leave a comment to remind
us of this when if happens again.

Closes #346

fee_currencies: Reduce logging (#406)

Log in `Trace` severity for fee curries exceeding the intrinsic gas by
up to factor two.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debitFees() and creditFees() non-atomicity when surpassing intrinsic gas limits.

2 participants

Comments