Closed
Conversation
Includes the following: - A docker-compose setup with Dockerfiles for each service. The reference Geth implementation pulls an image from my personal repo for now. We can switch this out once we get CI running there. - An exponential backoff library, which is then used to retry connections to the L1/L2 provider on node startup. This prevents the opnode from crashing on startup due to the L1/L2 taking a while to start in Docker. - A fix for one of the CLI falgs - `--batchsubmitter.key` was specified as a boolean. - Make tasks to build the docker-compose setup, and clean it up. Fixes #259
Demo setup and fixes
We haven't been running those for a while, and someone did ask me about it. Let's add it back when we actually start doing them again.
This better handles the fork choice update in the rollup node, exposes the fork choice method throughout, cleans up the L2 Engine API interface, and random aspects of block creation. The l2.Source is the Ethereum client wrapper for the L2 execution engine. It directly wraps some block accessing methods (like BlockByNumber and BlockByHash). It also wraps raw RPC calls to create a golang interface for the Engine API (newBlock, forkchoiceUpdated, getPayload). This PR also pulls out the ethclient initialization loop into a standalone function.
This makes the following changes: 1. Flatten the L1 & L2 source into one object that fulfills several interfaces (primarily the BlockReference) 2. Place the L1Range function in the L1 Source (removed from sync package) 3. Provide FindSyncStart with the L2 block to use
- var -> const (+ removing som extra copies) - Rename BlockPreparer interface to Engine - Remove out of date comment and update safe block
ref impl: Flatten sources & Cleanup Sync Start
…type, sanity-check receipts, use l2 block height for deposits, update specs
Primarily for easier building and linting.
The misspell linter was trying to correct `strat` to `start`. This is typically correct, but not in this instance.
This enables the nice test ouput with `go test -v` that lists each test without polluting the output with logs from passing tests.
Required for go version 1.18
Add opnode makefile, lints, and go1.18
opnode/rollup/derive,specs: fix / harden deposit processing
Rely on intrinisic gas (which can be computed exactly) rather than using gas estimation. Adds commented out code to manage the nonce manually. I think that there was a race between gas estimation and nonce handling which previously caused problems. If problems continue, it makes sense to switch over to more manual nonce management.
Splits the workflow into 3 different steps which can run in parallel.
Parallelize solidity CI checks
…etter_stronger opnode: Speed up bss
* chore: copy L1 and L2 Messengers from Monorepo * test: Add Messenger test files Monorepo test cases are copied in as comments from the monorepo ts tests. * chore: Add OZ upgradable contracts New remappings were also added in order to avoid excessively long import statements. * chore: Importe OZ and OP contracts as node_modules Necessary because hardhat does not support remappings!?! y u no? * refactor: Remove replayMessage() We no longer need this function as it was only necessary when the CTC a maximum gas limit per epoch concept. In order to remove the function I had to copy in the L1xDM interface rather than import from the node_modules. * chore: Remove unused files The ts test file is made redundant by an itest in the itest package. The sol test file was not being used for anything * refactor: Remove Address Manager and Resolver Instead the CTC and SCC are state variables * refactor: Replace CTC with OptimismPortal * refactor: Remove SCC We don't need to replace it with the L2OutputOracle in the L1xDM, because the verification is now done in the OptimismPortal itself. * forge install: forge-std * forge install: ds-test * refactor: Move boilerplate test code into CommonTest * test: Add sendMessage and pause tests for L1xDM * test: L1CrossDomainMessenger sendMessage and pause * refactor: replace L2ToL1MessagePasser with Withdrawer contract Also adds a lib with constant values for new bedrock predeploys. * chore: Make functions external, and reorder for CEI For whatever reason a bunch of functions on the messengers were public, when they could have been external. I fixed that, and removed the slither annotations. Where possible (in the sendMessage functions), I also reordered the events and calls to respect Checks-Effects-Interactions. There was no risk previously, but this removes any question, and quiets slither. * refactor: Reorganize ts helpers Move helpers/index into utils.ts, and add other files which are exported in the new index.ts. * test: Add mock proof generation script and helpers * test: Add L1xDM relayMessageSucceeds tests * test: Add proof generation scripts and helpers * refactor: Add l2Sender check in L2xDM * refactor: Copy in the L1 and L2 standard bridge At this point they are simply verbatim. * refactor: Bridges - fix import paths * refactor: Token Bridge - replace messengers with Portal Also remove the CrossDomainEnabled lib. refactor: Token Bridge - replace messengers with Portal Also remove the CrossDomainEnabled lib. * style: Address/remove some slither disable comments style: Address/remove some slither disable comments * refactor: extract l2Sender check into a modifier * refactor: Support deposits of ETH in L2 Bridge This copies in the IL2ERC20Bridge interface so that payable can be added. In the case that the L2 token address matches OVM_ETH, the value of the call will be forwarded. * interface: add IWithdrawer.sol * contracts: add comments to L1 contracts * contracts: use unchecked * contracts: fix imports in common test * test: L1CrossDomainMessenger * test: L2CrossDomainMessenger * contracts: fix typo * tests: bridge tests * contracts: remove extra message assignment * contracts: update gas snapshot * forge install: solmate * contracts: remove usage of OVM_ETH All `OVM_ETH` will be migrated to `ETH` with the upgrade to bedrock. We do not want to allow for the creation of new `OVM_ETH` by depositing `ETH` into the bridge and have it create `OVM_ETH` on L2. * contracts: add in L2StandardERC20 * contracts: add in token factory The token factory will deploy tokens on L2 that correspond to tokens on L1. This allows for easy deposits through the bridge. * contracts: test rlp lib for computing contract addrs This library lets you compute the contract address based on the deployment account and nonce. h/t @t11s * contracts: test infra for bridge * contracts: add note to self * contracts: fix compiler warnings * contracts: update snapshot * contracts: add IDepositFeed * contracts: type cast uint256 to uint64 in messenger * test: fix merge * contracts: modify paths to compile with hardhat * hardhat: update config * contracts: fix build * forge tests: first yarn install * contracts: lint * contracts: update snapshot Co-authored-by: Maurelian <maurelian@protonmail.ch>
- Adopts Go workspaces for future compatibility with the Bedrock move into the monorepo - Moves Go packages to the root of the repo in order to fix import paths - Rewrites existing Go import paths - Removes Stackman, since it's not needed anymore
Use `abi.encode` instead of `abi.encodePacked` to ensure a constant serialization. `abi.encode` will be sure to pad the value to its size while `abi.encodePacked` will not when operating on integers. There should not have been a bug here because it was being called with a `bytes32`, which should always be 32 bytes when returned from `abi.encodePacked`.
|
Contributor
|
This PR changes implementation code, but doesn't include a changeset. Did you forget to add one? |
Contributor
|
Hey @protolambda! This PR has merge conflicts. Please fix them before continuing review. |
theochap
pushed a commit
that referenced
this pull request
Dec 10, 2025
## Overview Adds some simple metrics for the sequencer state to `kona-node-service`.
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.
This merges https://github.com/ethereum-optimism/optimistic-specs/ into the monorepo, based on top of the work in #2524 (
feat/go-workspacesv2) following this script to create all the contents: https://gist.github.com/protolambda/f7ef526d37a756bdb168de17a920c10bThis:
ope2e(previouslyopnode/test),l2os,opnode, all added to the monorepo go workspacepackages/bedrock-contractspackages/bedrock-integration-testsbedrock-opsspecsmetaREADME.mdwith new structure description./protocol, to be refactored/unified with other files. These are primarily configs and CI things.The idea here is that by merging the git history, we preserve git-blame and can easily merge any future/unmerged specs changes into the monorepo without having to copy-paste the contents.
Over time we should enable more of the specs-repo functionality that is merged into the monorepo by integrating and re-enabling CI, devnet, etc. things.
This is a draft based on discussion with @mslipper