Skip to content

Token duality#3

Merged
karlb merged 10 commits intocelo1from
karlb/token-duality3
Sep 18, 2023
Merged

Token duality#3
karlb merged 10 commits intocelo1from
karlb/token-duality3

Conversation

@karlb
Copy link

@karlb karlb commented Aug 8, 2023

To make token duality work, I needed to add the following things first:

  • CeloPrecompiledContract (transfer precompile needs the access to the BlockContext)
  • A way to make contract calls during block processing (transfer precompile needs to check the goldTokenAddress in the registry)
  • Include the registry in the genesis block (We can't get it into the correct address later)

There are multiple ways to do all of these, so this review is a good place to discuss if I chose a good one or not.

I tried to avoid a few things:

  • The SharedEVMRunner which is used for checking the goldTokenAddress in celo-blockchain. It has multiple "DO NOT USE" warnings and reuses EVM objects which are supposed to be single use objects
  • Adding custom contract wrappers. I wanted to use abigen, since that is what is used everywhere else. To make that work, I added the CeloBackend (better names welcome!)

To keep rebasing to newer upstream versions, I put most of the new code into celo_ prefixed go files. Only adding the CeloPrecompiledContract required larger changes in the original code.

Part of #1

@karlb karlb force-pushed the karlb/token-duality3 branch 2 times, most recently from c89be94 to 24c6bfa Compare August 8, 2023 13:29
Copy link

@palango palango left a comment

Choose a reason for hiding this comment

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

This looks really good, especially nice that you managed to get rid of the SharedEVMRunner. Also really the nice sequence of commits makes it easy to follow through the PR.

  • Currently you copied over the contract ABIs by hand, right? So how to get/generate those is still an open question.
  • Some test data functions seem to be duplicated (in core/vm/celo_contracts_test.go and tests/fuzzers/bls12381/precompile_fuzzer.go)
  • Left some smaller comments/questions inline.
  • It's unfortunate that we have to adjust all existing precompiles that don't need state access. I don't see an obvious way to avoid that though (without using reflection, which we probably want to avoid)

@karlb
Copy link
Author

karlb commented Aug 9, 2023

Currently you copied over the contract ABIs by hand, right? So how to get/generate those is still an open question.

Yes. I currently imagine something like a small script doing forge build in the optimism repo and the extracting the keys from the build artefacts into the right places. Could even be run by a go:generate line. But we need the contracts in the optimism repo before we can try out anything like that.

Some test data functions seem to be duplicated (in core/vm/celo_contracts_test.go and tests/fuzzers/bls12381/precompile_fuzzer.go)

Well spotted, I didn't realize this. It is the same in celo-blockchain at the moment and I am not sure how to best resolve this. We could move the shared code to a test utils package, but that would increase the diff for tests/fuzzers/bls12381/precompile_fuzzer.go. It is not clear whether that is better than the duplication.

Comment on lines 37 to 45
// TODO: are these values ok?
if blockNumber == nil {
blockNumber = common.Big0
}
blockCtx := vm.BlockContext{BlockNumber: blockNumber}
txCtx := vm.TxContext{}
vmConfig := vm.Config{}
Copy link
Author

Choose a reason for hiding this comment

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

Any idea on whether this is ok? I'm especially unsure about the vmConfig.

Copy link

Choose a reason for hiding this comment

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

I was also wondering if we can somehow get the config used from somewhere else.

But it seems simple enough, the only thing I don't understand is Config.EnablePreimageRecording.

@karlb
Copy link
Author

karlb commented Aug 9, 2023

It's unfortunate that we have to adjust all existing precompiles that don't need state access. I don't see an obvious way to avoid that though (without using reflection, which we probably want to avoid)

A different approach would be to keep separate precompile lists for CeloPrecompileContracts and normal PrecompileContracts. So instead of 1d67728, we could do 76c68b9, which results in a smaller diff.

> git show 1d67728a2c4fb73aa8b14c700dd66f7a6f7d6f11 --stat
 common/celo_types.go      |  5 +++++
 core/vm/celo_contracts.go | 41 +++++++++++++++++++++++++++++++++++++++++
 core/vm/celo_errors.go    |  9 +++++++++
 core/vm/contracts.go      | 92 ++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------
 core/vm/evm.go            | 12 ++++++------
 5 files changed, 107 insertions(+), 52 deletions(-)

> git show 76c68b93bde3b176aff2df80a012fb22cbba426e --stat
 common/celo_types.go      |  5 +++++
 core/vm/celo_contracts.go | 41 +++++++++++++++++++++++++++++++++++++++++
 core/vm/celo_errors.go    |  9 +++++++++
 core/vm/contracts.go      |  8 ++++++--
 core/vm/evm.go            | 23 +++++++++++++++++------
 5 files changed, 78 insertions(+), 8 deletions(-)

@karlb
Copy link
Author

karlb commented Sep 12, 2023

Currently you copied over the contract ABIs by hand, right? So how to get/generate those is still an open question.

I added a script to build and update the contracts from the optimism repo.

I also switched to the version using a separate CeloPrecompileContracts list to reduce the amount of wrapping existing precompiles, as mentioned in the previous comment.

@karlb karlb force-pushed the karlb/token-duality3 branch from ec03901 to 8c13060 Compare September 12, 2023 13:10
@karlb karlb changed the base branch from optimism to celo1 September 12, 2023 13:20
@karlb karlb force-pushed the karlb/token-duality3 branch 4 times, most recently from d860e4c to 8bfefd6 Compare September 15, 2023 14:28
if blockNumber == nil {
blockNumber = common.Big0
}
blockCtx := vm.BlockContext{BlockNumber: blockNumber, Time: 0}
Copy link

@palango palango Sep 18, 2023

Choose a reason for hiding this comment

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

Maybe add a todo here or create a new issue so we don't forget to update that.

@palango
Copy link

palango commented Sep 18, 2023

Currently you copied over the contract ABIs by hand, right? So how to get/generate those is still an open question.

I added a script to build and update the contracts from the optimism repo.

I also switched to the version using a separate CeloPrecompileContracts list to reduce the amount of wrapping existing precompiles, as mentioned in the previous comment.

I like that change. I think it makes it clearer what happens and allows us to not change all existing precompiles.

@karlb karlb force-pushed the karlb/token-duality3 branch from 5f4290e to 482e71e Compare September 18, 2023 09:41
@karlb karlb force-pushed the karlb/token-duality3 branch from 9759aa4 to c2a0f53 Compare September 18, 2023 11:04
Copy link

@palango palango left a comment

Choose a reason for hiding this comment

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

Looks good!

@karlb karlb merged commit 0fd552c into celo1 Sep 18, 2023
@karlb karlb deleted the karlb/token-duality3 branch September 18, 2023 13:50
karlb pushed a commit that referenced this pull request Jul 14, 2025
This PR is #3 of a 3-part series that implements the new log index
intended to replace core/bloombits.
Based on ethereum/go-ethereum#31079 and
ethereum/go-ethereum#31080
Replaces ethereum/go-ethereum#30370

This part removes the old bloombits package and the chain indexer that
was only used by bloombits. Deletes the old bloombits database.

FilterMaps data structure explanation:
https://gist.github.com/zsfelfoldi/a60795f9da7ae6422f28c7a34e02a07e

Log index generator code overview:
https://gist.github.com/zsfelfoldi/97105dff0b1a4f5ed557924a24b9b9e7

Search pattern matcher code overview:
https://gist.github.com/zsfelfoldi/5981735641c956afb18065e84f8aff34

Note that the possibility of a tree hashing scheme and remote proof
protocol are mentioned in the documents above but they are not exactly
specified yet. These specs are WIP and will be finalized after the local
log indexer/filter code is finalized and merged.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 4, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 5, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 5, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 5, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 6, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 7, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 7, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 7, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 7, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 8, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 11, 2025
Kourin1996 pushed a commit that referenced this pull request Aug 11, 2025
karlb added a commit that referenced this pull request Nov 5, 2025
This is a squash commit of all e2e testing related previous commits.

e2e: Add shell based test runner (#21)

* Run all test_* files
* Report failure count
* Handle geth start and stop
* Use initialized genesis block instead of deploying token

e2e: Add token duality e2e test (#3, #21)

e2e: Add smoketest to e2e tests (#261)

Adds an e2e smoketest that sends value transfer, contract interaction
and contract creation transactions for all of the valid transaction types.

It also verifies that deprecated transactions (celo legacy & cip42) are
not supported.

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e: Add tests with Ethers and Viem (#42)

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>

e2e: Add sending overlapping nonce test and CIP-64 tx test in e2e viem test (#43, #55, #293)

Co-authored-by: Pastoh <hbandura@users.noreply.github.com>
Co-authored-by: kourin <yoshiki.takabayashi@clabs.co>

e2e(js): Loosen error check condition in e2e-test (#380)

Due to possible expansion of the responses error string in potential
proxy setups on a live RPC endpoint, the strict error check in the e2e
viem test caused the test to fail, although the error condition was
expected.

e2e(js): Add test of sending CIP-64 tx with unregistered fee currency in viem e2e test

e2e(js): Run e2e tests on alfajores (#212, #258, #268, #293)

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>

e2e(js): Get extra intrinsic gas for custom fee currency in e2e (#335)

* Get IntrinsicGas for custom fee currency in e2e

* Rename function name and add comments

* Add missing await

* Fix wrong method call

* Fix codes based reviews

e2e: Extract viem initialization code into viem_setup.mjs for reuse (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(js): Add mainnet & baklava config in e2e viem setup (#331, #340)

e2e: Add WebSocket support in e2e (#356)

e2e: set default TERM in e2e test for tput (#380)

e2e: Test fee currencies with failing debit/credit (#85)

This should normally not happen, but we have to make sure that such a
rare case won't crash geth nodes are cause stuck transactions that will
get re-executed on every block.

e2e(fee_currency): Refactor fee currency e2e tests (#212, #258)

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>

[squash]: e2e(ci): update foundry version to v1.1.0 (#380)

e2e(fee_currency): Update error message assertion (#363)

e2e(fee_currency): Fix account balance check (#266)

e2e(fee_currency): Import viem_setup.mjs instead of setup viem in send_tx.mjs (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(runner|fee_currency): Fix failing e2e test (#371)

* Add Random in BlockContext to enable Merge and Shanghai fork in TryDebitFees

* Add --broadcast option in deploy_fee_currency to ensure fee currency is deployed in e2e

* Fix log assertion in e2e

* Add several e2e tests for admin blocking API

* Remove broadcast

e2e: Add gas estimation e2e test (#356)

e2e: Add e2e test for fee handler (#36)

Use Celo Sepolia for e2e test instead of alfajores

The changed error message is more precise and more stable across geth
versions.

Right now, the test "zero tip fee currency tx rejected" still fails for
Sepolia, but the same is true for Alfajores. It will work once the node
is updated.

Closes celo-org/celo-blockchain-planning#1158
karlb added a commit that referenced this pull request Dec 5, 2025
This is a squash commit of all e2e testing related previous commits.

e2e: Add shell based test runner (#21)

* Run all test_* files
* Report failure count
* Handle geth start and stop
* Use initialized genesis block instead of deploying token

e2e: Add token duality e2e test (#3, #21)

e2e: Add smoketest to e2e tests (#261)

Adds an e2e smoketest that sends value transfer, contract interaction
and contract creation transactions for all of the valid transaction types.

It also verifies that deprecated transactions (celo legacy & cip42) are
not supported.

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e: Add tests with Ethers and Viem (#42)

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>

e2e: Add sending overlapping nonce test and CIP-64 tx test in e2e viem test (#43, #55, #293)

Co-authored-by: Pastoh <hbandura@users.noreply.github.com>
Co-authored-by: kourin <yoshiki.takabayashi@clabs.co>

e2e(js): Loosen error check condition in e2e-test (#380)

Due to possible expansion of the responses error string in potential
proxy setups on a live RPC endpoint, the strict error check in the e2e
viem test caused the test to fail, although the error condition was
expected.

e2e(js): Add test of sending CIP-64 tx with unregistered fee currency in viem e2e test

e2e(js): Run e2e tests on alfajores (#212, #258, #268, #293)

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>

e2e(js): Get extra intrinsic gas for custom fee currency in e2e (#335)

* Get IntrinsicGas for custom fee currency in e2e

* Rename function name and add comments

* Add missing await

* Fix wrong method call

* Fix codes based reviews

e2e: Extract viem initialization code into viem_setup.mjs for reuse (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(js): Add mainnet & baklava config in e2e viem setup (#331, #340)

e2e: Add WebSocket support in e2e (#356)

e2e: set default TERM in e2e test for tput (#380)

e2e: Test fee currencies with failing debit/credit (#85)

This should normally not happen, but we have to make sure that such a
rare case won't crash geth nodes are cause stuck transactions that will
get re-executed on every block.

e2e(fee_currency): Refactor fee currency e2e tests (#212, #258)

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>

[squash]: e2e(ci): update foundry version to v1.1.0 (#380)

e2e(fee_currency): Update error message assertion (#363)

e2e(fee_currency): Fix account balance check (#266)

e2e(fee_currency): Import viem_setup.mjs instead of setup viem in send_tx.mjs (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(runner|fee_currency): Fix failing e2e test (#371)

* Add Random in BlockContext to enable Merge and Shanghai fork in TryDebitFees

* Add --broadcast option in deploy_fee_currency to ensure fee currency is deployed in e2e

* Fix log assertion in e2e

* Add several e2e tests for admin blocking API

* Remove broadcast

e2e: Add gas estimation e2e test (#356)

e2e: Add e2e test for fee handler (#36)

Use Celo Sepolia for e2e test instead of alfajores

The changed error message is more precise and more stable across geth
versions.

Right now, the test "zero tip fee currency tx rejected" still fails for
Sepolia, but the same is true for Alfajores. It will work once the node
is updated.

Closes celo-org/celo-blockchain-planning#1158
karlb added a commit that referenced this pull request Jan 6, 2026
This is a squash commit of all e2e testing related previous commits.

e2e: Add shell based test runner (#21)

* Run all test_* files
* Report failure count
* Handle geth start and stop
* Use initialized genesis block instead of deploying token

e2e: Add token duality e2e test (#3, #21)

e2e: Add smoketest to e2e tests (#261)

Adds an e2e smoketest that sends value transfer, contract interaction
and contract creation transactions for all of the valid transaction types.

It also verifies that deprecated transactions (celo legacy & cip42) are
not supported.

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e: Add tests with Ethers and Viem (#42)

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>

e2e: Add sending overlapping nonce test and CIP-64 tx test in e2e viem test (#43, #55, #293)

Co-authored-by: Pastoh <hbandura@users.noreply.github.com>
Co-authored-by: kourin <yoshiki.takabayashi@clabs.co>

e2e(js): Loosen error check condition in e2e-test (#380)

Due to possible expansion of the responses error string in potential
proxy setups on a live RPC endpoint, the strict error check in the e2e
viem test caused the test to fail, although the error condition was
expected.

e2e(js): Add test of sending CIP-64 tx with unregistered fee currency in viem e2e test

e2e(js): Run e2e tests on alfajores (#212, #258, #268, #293)

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>

e2e(js): Get extra intrinsic gas for custom fee currency in e2e (#335)

* Get IntrinsicGas for custom fee currency in e2e

* Rename function name and add comments

* Add missing await

* Fix wrong method call

* Fix codes based reviews

e2e: Extract viem initialization code into viem_setup.mjs for reuse (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(js): Add mainnet & baklava config in e2e viem setup (#331, #340)

e2e: Add WebSocket support in e2e (#356)

e2e: set default TERM in e2e test for tput (#380)

e2e: Test fee currencies with failing debit/credit (#85)

This should normally not happen, but we have to make sure that such a
rare case won't crash geth nodes are cause stuck transactions that will
get re-executed on every block.

e2e(fee_currency): Refactor fee currency e2e tests (#212, #258)

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>

[squash]: e2e(ci): update foundry version to v1.1.0 (#380)

e2e(fee_currency): Update error message assertion (#363)

e2e(fee_currency): Fix account balance check (#266)

e2e(fee_currency): Import viem_setup.mjs instead of setup viem in send_tx.mjs (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(runner|fee_currency): Fix failing e2e test (#371)

* Add Random in BlockContext to enable Merge and Shanghai fork in TryDebitFees

* Add --broadcast option in deploy_fee_currency to ensure fee currency is deployed in e2e

* Fix log assertion in e2e

* Add several e2e tests for admin blocking API

* Remove broadcast

e2e: Add gas estimation e2e test (#356)

e2e: Add e2e test for fee handler (#36)

Use Celo Sepolia for e2e test instead of alfajores

The changed error message is more precise and more stable across geth
versions.

Right now, the test "zero tip fee currency tx rejected" still fails for
Sepolia, but the same is true for Alfajores. It will work once the node
is updated.

Closes celo-org/celo-blockchain-planning#1158
piersy pushed a commit that referenced this pull request Jan 17, 2026
This is a squash commit of all e2e testing related previous commits.

e2e: Add shell based test runner (#21)

* Run all test_* files
* Report failure count
* Handle geth start and stop
* Use initialized genesis block instead of deploying token

e2e: Add token duality e2e test (#3, #21)

e2e: Add smoketest to e2e tests (#261)

Adds an e2e smoketest that sends value transfer, contract interaction
and contract creation transactions for all of the valid transaction types.

It also verifies that deprecated transactions (celo legacy & cip42) are
not supported.

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e: Add tests with Ethers and Viem (#42)

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>

e2e: Add sending overlapping nonce test and CIP-64 tx test in e2e viem test (#43, #55, #293)

Co-authored-by: Pastoh <hbandura@users.noreply.github.com>
Co-authored-by: kourin <yoshiki.takabayashi@clabs.co>

e2e(js): Loosen error check condition in e2e-test (#380)

Due to possible expansion of the responses error string in potential
proxy setups on a live RPC endpoint, the strict error check in the e2e
viem test caused the test to fail, although the error condition was
expected.

e2e(js): Add test of sending CIP-64 tx with unregistered fee currency in viem e2e test

e2e(js): Run e2e tests on alfajores (#212, #258, #268, #293)

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>

e2e(js): Get extra intrinsic gas for custom fee currency in e2e (#335)

* Get IntrinsicGas for custom fee currency in e2e

* Rename function name and add comments

* Add missing await

* Fix wrong method call

* Fix codes based reviews

e2e: Extract viem initialization code into viem_setup.mjs for reuse (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(js): Add mainnet & baklava config in e2e viem setup (#331, #340)

e2e: Add WebSocket support in e2e (#356)

e2e: set default TERM in e2e test for tput (#380)

e2e: Test fee currencies with failing debit/credit (#85)

This should normally not happen, but we have to make sure that such a
rare case won't crash geth nodes are cause stuck transactions that will
get re-executed on every block.

e2e(fee_currency): Refactor fee currency e2e tests (#212, #258)

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>

[squash]: e2e(ci): update foundry version to v1.1.0 (#380)

e2e(fee_currency): Update error message assertion (#363)

e2e(fee_currency): Fix account balance check (#266)

e2e(fee_currency): Import viem_setup.mjs instead of setup viem in send_tx.mjs (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(runner|fee_currency): Fix failing e2e test (#371)

* Add Random in BlockContext to enable Merge and Shanghai fork in TryDebitFees

* Add --broadcast option in deploy_fee_currency to ensure fee currency is deployed in e2e

* Fix log assertion in e2e

* Add several e2e tests for admin blocking API

* Remove broadcast

e2e: Add gas estimation e2e test (#356)

e2e: Add e2e test for fee handler (#36)

Use Celo Sepolia for e2e test instead of alfajores

The changed error message is more precise and more stable across geth
versions.

Right now, the test "zero tip fee currency tx rejected" still fails for
Sepolia, but the same is true for Alfajores. It will work once the node
is updated.

Closes celo-org/celo-blockchain-planning#1158
piersy pushed a commit that referenced this pull request Jan 17, 2026
This is a squash commit of all e2e testing related previous commits.

e2e: Add shell based test runner (#21)

* Run all test_* files
* Report failure count
* Handle geth start and stop
* Use initialized genesis block instead of deploying token

e2e: Add token duality e2e test (#3, #21)

e2e: Add smoketest to e2e tests (#261)

Adds an e2e smoketest that sends value transfer, contract interaction
and contract creation transactions for all of the valid transaction types.

It also verifies that deprecated transactions (celo legacy & cip42) are
not supported.

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e: Add tests with Ethers and Viem (#42)

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>

e2e: Add sending overlapping nonce test and CIP-64 tx test in e2e viem test (#43, #55, #293)

Co-authored-by: Pastoh <hbandura@users.noreply.github.com>
Co-authored-by: kourin <yoshiki.takabayashi@clabs.co>

e2e(js): Loosen error check condition in e2e-test (#380)

Due to possible expansion of the responses error string in potential
proxy setups on a live RPC endpoint, the strict error check in the e2e
viem test caused the test to fail, although the error condition was
expected.

e2e(js): Add test of sending CIP-64 tx with unregistered fee currency in viem e2e test

e2e(js): Run e2e tests on alfajores (#212, #258, #268, #293)

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>

e2e(js): Get extra intrinsic gas for custom fee currency in e2e (#335)

* Get IntrinsicGas for custom fee currency in e2e

* Rename function name and add comments

* Add missing await

* Fix wrong method call

* Fix codes based reviews

e2e: Extract viem initialization code into viem_setup.mjs for reuse (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(js): Add mainnet & baklava config in e2e viem setup (#331, #340)

e2e: Add WebSocket support in e2e (#356)

e2e: set default TERM in e2e test for tput (#380)

e2e: Test fee currencies with failing debit/credit (#85)

This should normally not happen, but we have to make sure that such a
rare case won't crash geth nodes are cause stuck transactions that will
get re-executed on every block.

e2e(fee_currency): Refactor fee currency e2e tests (#212, #258)

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>

[squash]: e2e(ci): update foundry version to v1.1.0 (#380)

e2e(fee_currency): Update error message assertion (#363)

e2e(fee_currency): Fix account balance check (#266)

e2e(fee_currency): Import viem_setup.mjs instead of setup viem in send_tx.mjs (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(runner|fee_currency): Fix failing e2e test (#371)

* Add Random in BlockContext to enable Merge and Shanghai fork in TryDebitFees

* Add --broadcast option in deploy_fee_currency to ensure fee currency is deployed in e2e

* Fix log assertion in e2e

* Add several e2e tests for admin blocking API

* Remove broadcast

e2e: Add gas estimation e2e test (#356)

e2e: Add e2e test for fee handler (#36)

Use Celo Sepolia for e2e test instead of alfajores

The changed error message is more precise and more stable across geth
versions.

Right now, the test "zero tip fee currency tx rejected" still fails for
Sepolia, but the same is true for Alfajores. It will work once the node
is updated.

Closes celo-org/celo-blockchain-planning#1158
piersy pushed a commit that referenced this pull request Jan 21, 2026
This is a squash commit of all e2e testing related previous commits.

e2e: Add shell based test runner (#21)

* Run all test_* files
* Report failure count
* Handle geth start and stop
* Use initialized genesis block instead of deploying token

e2e: Add token duality e2e test (#3, #21)

e2e: Add smoketest to e2e tests (#261)

Adds an e2e smoketest that sends value transfer, contract interaction
and contract creation transactions for all of the valid transaction types.

It also verifies that deprecated transactions (celo legacy & cip42) are
not supported.

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e: Add tests with Ethers and Viem (#42)

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>

e2e: Add sending overlapping nonce test and CIP-64 tx test in e2e viem test (#43, #55, #293)

Co-authored-by: Pastoh <hbandura@users.noreply.github.com>
Co-authored-by: kourin <yoshiki.takabayashi@clabs.co>

e2e(js): Loosen error check condition in e2e-test (#380)

Due to possible expansion of the responses error string in potential
proxy setups on a live RPC endpoint, the strict error check in the e2e
viem test caused the test to fail, although the error condition was
expected.

e2e(js): Add test of sending CIP-64 tx with unregistered fee currency in viem e2e test

e2e(js): Run e2e tests on alfajores (#212, #258, #268, #293)

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>

e2e(js): Get extra intrinsic gas for custom fee currency in e2e (#335)

* Get IntrinsicGas for custom fee currency in e2e

* Rename function name and add comments

* Add missing await

* Fix wrong method call

* Fix codes based reviews

e2e: Extract viem initialization code into viem_setup.mjs for reuse (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(js): Add mainnet & baklava config in e2e viem setup (#331, #340)

e2e: Add WebSocket support in e2e (#356)

e2e: set default TERM in e2e test for tput (#380)

e2e: Test fee currencies with failing debit/credit (#85)

This should normally not happen, but we have to make sure that such a
rare case won't crash geth nodes are cause stuck transactions that will
get re-executed on every block.

e2e(fee_currency): Refactor fee currency e2e tests (#212, #258)

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>

[squash]: e2e(ci): update foundry version to v1.1.0 (#380)

e2e(fee_currency): Update error message assertion (#363)

e2e(fee_currency): Fix account balance check (#266)

e2e(fee_currency): Import viem_setup.mjs instead of setup viem in send_tx.mjs (#261)

Co-authored-by: Karl Bartel <karl.bartel@clabs.co>

e2e(runner|fee_currency): Fix failing e2e test (#371)

* Add Random in BlockContext to enable Merge and Shanghai fork in TryDebitFees

* Add --broadcast option in deploy_fee_currency to ensure fee currency is deployed in e2e

* Fix log assertion in e2e

* Add several e2e tests for admin blocking API

* Remove broadcast

e2e: Add gas estimation e2e test (#356)

e2e: Add e2e test for fee handler (#36)

Use Celo Sepolia for e2e test instead of alfajores

The changed error message is more precise and more stable across geth
versions.

Right now, the test "zero tip fee currency tx rejected" still fails for
Sepolia, but the same is true for Alfajores. It will work once the node
is updated.

Closes celo-org/celo-blockchain-planning#1158
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.

2 participants