Skip to content

Run e2e tests on alfajores#258

Merged
piersy merged 23 commits intocelo10from
piersy/run-e2e-tests-on-alfajores
Oct 21, 2024
Merged

Run e2e tests on alfajores#258
piersy merged 23 commits intocelo10from
piersy/run-e2e-tests-on-alfajores

Conversation

@piersy
Copy link
Copy Markdown

@piersy piersy commented Oct 16, 2024

Modifies our e2e tests to be able to run on alfajores if the environment variable NETWORK is set to 'alfajores'.
Also adds a CI step to run them against alfajores.

Note that the test_fee_currency... tests are skipped because they require the ability to deploy new fee currencies, which we probably don't want to be doing on a live network as it could cause issues for people, and we also don't want to expose the credentials to do so.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Oct 16, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/viem@2.21.27 Transitive: environment, network +11 18.3 MB awkweb, jmoxey

🚮 Removed packages: npm/viem@2.9.15

View full report↗︎

@piersy piersy requested a review from karlb October 16, 2024 21:41
Comment on lines +312 to +323
it("send fee currency tx with just high enough gas price mine", async () => {
const rate = await getRate(process.env.FEE_CURRENCY);
const block = await publicClient.getBlock({});
// Actually, the base fee will be a bit lower next block, since our blocks
// are always mostly empty. But the difference will be much less than the
// exchange rate of 2, so the test will still check that we take the fee
// currency into account everywhere.
const maxFeePerGas = block.baseFeePerGas / 2n;
const maxFeePerGas = rate.toFeeCurrency(block.baseFeePerGas)+2n;
const request = await walletClient.prepareTransactionRequest({
account,
to: "0x00000000000000000000000000000000DeaDBeef",
value: 2,
gas: 90000,
feeCurrency: process.env.FEE_CURRENCY2,
maxFeePerGas,
maxPriorityFeePerGas: 1n,
gas: 171000,
feeCurrency: process.env.FEE_CURRENCY,
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: 2n,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @karlb, I'm thinking probably my modifications here don't make sense because it seems that it is important for this test that the fee per gas for the fee currency than the native currency, and I've modified it to use USDC which is the other way around.

Copy link
Copy Markdown

@ezdac ezdac Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the main point of this is that the fee should be too low for native currency, but if the node converts it then it is sufficient. But for USDC it should actually be fine, since the exchange rate results in requiring a lower value for the base-fee compared to when it is denominated in Celo.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave as is, with a comment that we may want to change this if the exchange rate changes significantly.

Copy link
Copy Markdown

@ezdac ezdac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't manage to look at everything in detail yet.
But looks very good so far - this feature is much appreciated.

For future changes: I think we should add more fee-currencies registered in the directory and test this for multiple currencies.

Comment on lines +312 to +323
it("send fee currency tx with just high enough gas price mine", async () => {
const rate = await getRate(process.env.FEE_CURRENCY);
const block = await publicClient.getBlock({});
// Actually, the base fee will be a bit lower next block, since our blocks
// are always mostly empty. But the difference will be much less than the
// exchange rate of 2, so the test will still check that we take the fee
// currency into account everywhere.
const maxFeePerGas = block.baseFeePerGas / 2n;
const maxFeePerGas = rate.toFeeCurrency(block.baseFeePerGas)+2n;
const request = await walletClient.prepareTransactionRequest({
account,
to: "0x00000000000000000000000000000000DeaDBeef",
value: 2,
gas: 90000,
feeCurrency: process.env.FEE_CURRENCY2,
maxFeePerGas,
maxPriorityFeePerGas: 1n,
gas: 171000,
feeCurrency: process.env.FEE_CURRENCY,
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: 2n,
Copy link
Copy Markdown

@ezdac ezdac Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the main point of this is that the fee should be too low for native currency, but if the node converts it then it is sufficient. But for USDC it should actually be fine, since the exchange rate results in requiring a lower value for the base-fee compared to when it is denominated in Celo.

to: "0x00000000000000000000000000000000DeaDBeef",
value: 3,
gas: 90000,
// dynaimcally retrieve intrinsic gas from feeCurrency directory "feeCurrencyConfig"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you still plan to implement this for this PR? If not, I would remove the line or add a TODO:, because it doesn't reflect what's happening ;)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok removed and I added a ticket for it - #260

Copy link
Copy Markdown

@karlb karlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good feature and a bunch of small improvements on top of that!

@piersy piersy requested review from ezdac and karlb October 18, 2024 18:08
ezdac pushed a commit that referenced this pull request Apr 30, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 1, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 1, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 1, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 2, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 6, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 6, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 8, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 12, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 22, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
piersy added a commit that referenced this pull request May 22, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 20, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 21, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 26, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 28, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 30, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 30, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 31, 2025
…ores (#212,#258,#268,#293)

Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 31, 2025
…ores (#212,#258,#268,#293)

Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Also adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

Allows tests to be run on Alfajores. This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Also adds tests for fee currency use with the gas price RPC API

Skips test_fee_currency_fails_on_credit.sh as it seems to be broken.
Kourin1996 pushed a commit that referenced this pull request Jul 31, 2025
Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Jul 31, 2025
Adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Jul 31, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Aug 1, 2025
Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Aug 1, 2025
Adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Aug 1, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Aug 3, 2025
Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Aug 3, 2025
Adds a test of transactions that exceed the max intrinsic gas for a fee
currency, this checks that the transaction fails and the fee currency is
blocked.

This entailed increasing gas limits
for a number of transactions that interact with fee currencies, since
the fee currencies on alfajores are different to our debug ones and also
tests needed to be updated to not rely on hardcoded fee currency rates.

Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Aug 3, 2025
Refactors debug fee currency deployment ensuring fee currency cleanup. The
geth-devmode predeployed "oracle3" is reused throughout the e2e tests
for all dynamically deployed fee-currencies. However the tested
fee-currencies are never removed from the FeeCurrencyDirectory.

This causes the node to try to query exchange-rates for the leftover
fee-currencies. This fails, because the oracle associated with the old
fee-currency has a different token address assigned and thus causes a
revert. This issue is not critical and only causes emission of a log
message and some unneccessary evm calls,
but it is better practice to clean up the fee-currency from the
directory anyways.

Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
To exercise the fee currency support and test JS lib compatibility.

Closes celo-org/optimism#61

e2e(runner): Allows tests to be run on Alfajores. (#212, #258)

Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>

e2e(fee_currency): Reenable test_fee_currency_fails_on_credit.sh (#400)

It has been disabled in d9518cc#diff-7e9dfb8659cce411851abf104e7bf34d826781fb4dc07fc9cb3a1a5b82fa5af1R48-R54, but since it works fine for me now, I don't see a reason to keep it disabled.

e2e(runner): Add mainner & baklava e2e test config for easier testing (#331, #340)
Run tests against baklava with `NETWORK=baklava ./run_all_tests.sh`
after giving the wallet enough balance (or setting your own).

e2e(js) update e2e test js dependencies (#380)

e2e: Bump braces from 3.0.2 to 3.0.3 in /e2e_test/js-tests (#392)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-version: 3.0.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

3 participants