Karlb/celo rebase 17 preview#480
Draft
karlb wants to merge 96 commits intokarlb/celo-rebase-17-upstreamfrom
Draft
Karlb/celo rebase 17 preview#480karlb wants to merge 96 commits intokarlb/celo-rebase-17-upstreamfrom
karlb wants to merge 96 commits intokarlb/celo-rebase-17-upstreamfrom
Conversation
It is better to remove documentation that is not really applicable to Celo rather than have it confuse potential users. They will have less problems if they read our official documentation. Closes celo-org/celo-blockchain-planning#889.
Adding funding.json, required for retroPGF application.
We want to fall back to the celo-org security policy, as requested in celo-org/celo-blockchain-planning#1199
This is preventing us from effectively checking our own commits.
* Add renovate.json Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * renovate: Disable all but security updates --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Paul Lange <palango@gmx.de> renovate: Enable fork processing (#384) See https://docs.renovatebot.com/mend-hosted/hosted-apps-config/#fork-processing chore: Fix renovate config (#407) chore: move renovate config to root (#409) For forks, renovate does not seem to check the .github/renovate.json location for config file, and thus assumes an empty config. This is then lacking `forkProcessing: "enabled"` option, which leads to the renovate github app to disable the repository. chore(config): migrate config renovate.json (#413) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
palango
reviewed
Mar 3, 2026
fa064d0 to
1f1a80a
Compare
This will make it work on non-x86 platforms via emulation.
Co-authored-by: pputman12 <putman.patrick@gmail.com>
github: Ensure generated types (#303) Updates generated code and adds a CI step to check that generated types are up to date. Co-authored-by: Karl Bartel <karl.bartel@clabs.co> github: Run e2e tests on Alfajores in CI github: Add e2e-test-deployed-network.yaml (#261) github: Fix and update CI test workflows (#380) * chore(ci): use new op-stack-base image runner * chore(ci): determine npm version from package.json * chore(ci): put setup in composite action
* Add workflow to test snapsync. * Change cron schedule. * chore(ci): update op-node version for snapsync test * chore(ci): temporarily disable cron schedule for snapsync-test * chore(ci): increase snapsync-test job timeout to 5 days --------- Co-authored-by: Maximilian Langenfeld <15726643+ezdac@users.noreply.github.com>
Adds a workflow file that runs a series of checks on all commits in a a commit range (from a base commit to the tip of the current branch)
* defaults: increase `TransactionHistory` for Celo * pr review
Don't mention bedrock, but the L2 migration
…ain_gasused (#224) * Added metrics chain_txincluded, chain_basefee and chain_gasused * Safe-check for nil values
This adds support for handling pre cel2 calls to debug_traceCall by proxying them to the historical rpc service.
Given the one second block time of the celo chain, there is significantly reduced need, compared to ethereum's twelve seconds, for individual accounts to be able to include multiple transactions a single block. To account for this we can reduce the AccontSlots default. This makes for a more inclusive txpool, capable of accepting transactions from a more diverse range of accounts. Even though it might make sense to divide the AccountSlots default by a factor of 12, to match the account slots per second offered by ethereum, doing so would reduce the Account slots below the max tx size of 4 slots. So we set the AccontSlots default at 4, to inrease inclusion whilst still supporting large transactions.
This will be the hardfork used to enable all Celo related features in the op-geth. Disables Cel2 fork for certain tests Note that the bedrock block is the cel2 block
This keeps compatibility with the Celo L1, so that both core contracts and third party contracts will be able to do fresh deploys after the L2 migration. If we want to go the Ethereum's value, it is better done some time after the L2 migration to avoid having many breaking changes at the same time. Disabled tests the rely on MaxCodeSize We changed the value and the test fail for that reason. Some tests could be updated, but I didn't get them to pass right away. So I'm going the quick way for now and skip all problematic tests.
* Add error for no migrated data in bootstrapping * Move migrated data existence check into backend and add a new condition for full sync node * Improve error message for missing Celo1 blocks Fix wrong comparison in sanity check of migrated data in bootstrap (#324)
For binding generation and initialization of the `--dev` mode.
Adds a new interface for celo precompiled contracts that accepts an additional parameter (CeloPrecompiledContext) providing access to state and EVM functionality. Adds a struct that wraps exising precompiled contracts so that they implement the new celo interface and ensures that existing contracts are wrapped when accessed during the state transition. tracer test: Call trace for transfer precompile The precompile must show up as a CALL in call tracing. This test exercises both the call tracer and the transfer precompile. It is the first test that checks for the gas cost and return value of the precompile. See #69
* Add EffectiveGasTipInCurrency and EffectiveGasTipInCelo * Remove EffectiveGasTipCmp * Apply base fee currency conversion for EffectiveGasTip * Fix lint error * Cleanup EffectiveGasTipInCurrency and EffectiveGasTipInCelo * Add tests for FeeHistory and SuggestOptimismPriorityFee API * Add tests for gas fee currency conversion in GraphQL * Add tests for miner fee calculation with fee conversions * Fix error handlings in processBlock * Revert fix in GraphQL code * Revert deletion of EffectiveGasTipCmp * Simplify EffectiveGasTipInCurrency and EffectiveGasTipInCelo * Remove CeloAPIBackend from miner's Backend interface * Remove unused testAPIBackend * Fix tests * Fix lint error * Remove t.Fail() for debug * Removed celoBackend field from Ethereum object * Removed unnecessary error * Remove unnecessary interface * Remove EffectiveGasTipInCurrency
) * Only apply the blocklist filtering when node is not deriving from l1 * Only use a multigaspool when the node is not deriving from l1 * Add return value to multigaspools `PoolFor` We want to be able to recognize when the passed in fee-currency does not have an individual multi-gas-pool set, e.g. when setting the remaining gas-allowance to 0 due to a fee-currency block. * Change log-level to Err for fee-currency EVM error * Add flag to deactivate blocklists in workload * Add test for no blocklist in derivation / pending builder * Add comment clarifying parameter Co-authored-by: piersy <pierspowlesland@gmail.com> * Simplify multigaspool constructor Co-Authored-by: piersy <pierspowlesland@gmail.com> * Add context to test comments Co-authored-by: piersy <pierspowlesland@gmail.com> * Add warning log for blocked currency with non-multigaspool * Move fee-currency blocking up in function * Modify multi-gas-pool test --------- Co-authored-by: piersy <pierspowlesland@gmail.com> Fix intrinsic test
This PR adds the geth console bindings for the blocklist commands.
…stimation (#356) Refactor gasestimator. Cleaner and avoid unnecessary contract calls
…ions (#369,#379) * Add tests for miner tx ordering considering local and remote txs * Fix comments * Remove debug code and clean up codes in test * Remove shuffle function and add test cases with tx indicies * Rename local variable name Fix flaky issue in TestMinerFillTransactionsOrdering (#379) Transactions were not being added synchronously
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
This is not 100% accurate, but it works for many cases and serves as a good starting point for the rest.
We have our own workflows to build images.
Use the EvictionTimeoutSeconds constant directly instead of storing it as a field that never changes. Suggested in #440 (comment)
Closes celo-org/celo-blockchain-planning#1226 Adding the addresses to the access list reduces gas usage. The added test exercises the problem case of addresses not being warmed by the transfer precompile, see celo-org/celo-blockchain-planning#1222
This is an autogenerated version with light edits to suit my preferences and avoid some redundancy.
Transaction types now implement sigHash() method, including Celo legacy transactions. The txFuncs.hash field is removed in favor of calling tx.inner.sigHash() directly. Deprecated Celo L1 transactions return the full transaction hash to preserve compatibility with historical hashes. This was suggested in #440 (comment)
These testnets have been sunset. This removes: - Chain IDs and gas limit configurations - Isthmus activation timestamps - Contract addresses - Alfajores-specific L1 cost function workaround - E2E test network configurations - Related test cases 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This shows the current behaviour with regards to the transfer precompile and prestate tests, which I suspect to be wrong.
These were included due to a bug and must be allowed to keep the old blocks valid.
We need to keep these two txs valid even though they have the wrong chainId to avoid introducing a fork of the blockchain.
* Ignore Celo base fee floor after Jovian We want to use Jovian's minBaseFee instead. * Base fee floor tests pre- and post-Jovian We default to Jovian in the configs, so that new tests will use Jovian. * Apply tx rejection to both Celo fee floor and OP minBaseFee It makes sense in both cases and OP didn't implement the mechanism at all.
* Fix CI check for `go generate` * Skip tests relying on max code size --------- Co-authored-by: Piers Powlesland <pierspowlesland@gmail.com>
This is not used in op-geth yet, but I would use it in op-node for the fusaka BPO schedule fix if it was available. So it makes sense to add it for that use and similar ones.
) The eth/69 implementation added a new Receipt struct in eth/protocols/eth/receipt.go for network protocol encoding/decoding. This struct was missing support for CeloDynamicFeeTxV2 (CIP-64) receipts which include an extra BaseFee field. When receiving receipts from peers running older versions that encode receipts using types.Receipt (which includes BaseFee for CeloDynamicFeeTxV2Type), the decoding would fail with "rlp: call of ListEnd not positioned at EOL" because the BaseFee field was not being consumed. The base fee in the receipts is optional because we only added it during the L2 migration.
) On L2 chains with fast block times (1-2s), the skeleton sync can enter a death spiral when a missed p2p gossip block creates a chain gap. The gap triggers a sync restart, but filler.suspend() blocks while the backfiller imports queued blocks. During this window, all incoming head events are dropped, causing 2-3+ blocks to be lost at fast block rates. The restart then uses a stale head, the next block creates another gap, and the cycle repeats indefinitely. This problem was introduced by ethereum/go-ethereum#27397 . Fix this by remembering the latest forced head event received during the suspend window instead of just dropping it, and using it as the restart target. This ensures the restart head is current, so the next arriving block extends the chain without a gap, breaking the cascade. L1 Ethereum (12s blocks) is unaffected since suspend() completes well before the next block arrives.
The debit/credit values returned from this test are used in test_cip64_gas_matches_opgeth_sepolia_erc20_transfer in celo-kona to ensure that both implementation use the same gas cost calculation for debit/credit calls. I made the op-geth gas values visible in the test by adding ```diff diff --git a/contracts/fee_currencies.go b/contracts/fee_currencies.go index 286edf8..f5151c3f4 100644 --- a/contracts/fee_currencies.go +++ b/contracts/fee_currencies.go @@ -110,6 +110,7 @@ func DebitFees(evm *vm.EVM, feeCurrency *common.Address, address common.Address, } gasUsed := maxIntrinsicGasCost - leftoverGas + fmt.Printf("Gas used in DebitFees: %d\n", gasUsed) log.Trace("DebitFees called", "feeCurrency", *feeCurrency, "gasUsed", gasUsed) return gasUsed, err } @@ -165,6 +166,7 @@ func CreditFees( // ) txSender, tipReceiver, common.ZeroAddress, baseFeeReceiver, refund, feeTip, common.Big0, baseFee, ) + if err != nil { if errors.Is(err, vm.ErrOutOfGas) { // This is a configuration / contract error, since @@ -186,6 +188,7 @@ func CreditFees( gasUsed := maxAllowedGasForCredit - leftoverGas log.Trace("CreditFees called", "feeCurrency", *feeCurrency, "gasUsed", gasUsed) + fmt.Printf("Gas used in CreditFees: %d\n", gasUsed) intrinsicGas, ok := common.CurrencyIntrinsicGasCost(evm.Context.FeeCurrencyContext.IntrinsicGasCosts, feeCurrency) if !ok { @@ -193,6 +196,12 @@ func CreditFees( return fmt.Errorf("%w: %x", exchange.ErrUnregisteredFeeCurrency, feeCurrency) } gasUsedForDebitAndCredit := gasUsedDebit + gasUsed + fmt.Printf( + "gasUsed %d, intrinsicGas %d, feeCurrency %x\n", + gasUsedForDebitAndCredit, + intrinsicGas, + feeCurrency, + ) if gasUsedForDebitAndCredit > 2*intrinsicGas { log.Info( "Gas usage for debit+credit exceeds intrinsic gas!", ```
…flow version (#459) * Update GitHub Actions workflow for Docker build, using a recent reusable-workflow version * Update token lifetime to 120m * Reduce token lifetime to 1 hour
…ation (#475) * consensus/beacon: exempt Celo L2 migration block from extraData validation The Celo bedrock transition block (31056500) carries non-empty extraData ("Celo L2 migration" marker). The upstream ValidateOptimismExtraData check rejects any non-empty extraData in pre-Holocene blocks, causing beacon backfill to fail at this block during snap sync. Skip the validation for the exact bedrock block on Celo-migrated chains (identified via IsMigratedChain()), allowing backfill to proceed. * Re-organise change to reduce potential for conflicts * Update consensus.go Return nil error * Revert "Update consensus.go" This reverts commit ba59017. * Revert "Re-organise change to reduce potential for conflicts" This reverts commit d065873.
1f1a80a to
8ed2021
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM summary of merge conflicts:
errSubClosed (upstream) and emptyExchangeRates (Celo); kept both upstream SendRawTransactionSync tests and Celo backend stubs; fixed curly
quote encoding issue
config.BlockOverrides != nil && config.BlockOverrides.Number != nil
mergiraf auto-resolution