Commit cef704af authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

op-chain-ops: delete check-l2 (#8942)

As of https://github.com/ethereum-optimism/optimism/pull/8933 and https://github.com/ethereum-optimism/optimism/pull/8911
all of `check-l2` tests exist in solidity and are better. There is no
real reason to keep `check-l2` around because it just adds additional
headache.
parent 5996d0bc
......@@ -329,12 +329,6 @@ CommandPreset = namedtuple('Command', ['name', 'args', 'cwd', 'timeout'])
def devnet_test(paths):
# Check the L2 config
run_command(
['go', 'run', 'cmd/check-l2/main.go', '--l2-rpc-url', 'http://localhost:9545', '--l1-rpc-url', 'http://localhost:8545'],
cwd=paths.ops_chain_ops,
)
# Run the two commands with different signers, so the ethereum nonce management does not conflict
# And do not use devnet system addresses, to avoid breaking fee-estimation or nonce values.
run_commands([
......
......@@ -332,8 +332,7 @@ Not every contract can be added as a predeploy, and some contracts have nuances
Once you've configured the `contracts-list` to include the contracts you'd like to add as predeploys, the next step is utilizing the BindGen outputs to configure the L2 genesis.
1. First we must update the [addresses.go](../predeploys/addresses.go) file to include the address we're predeploying our contracts to
2. Update the `switch` case found in [layer_two.go](../../op-chain-ops/genesis/layer_two.go) to include the `name` of your contracts
3. Update [immutables.go](../../op-chain-ops/immutables/immutables.go) to include your added contracts
4. Update [check-l2/main.go](../../op-chain-ops/cmd/check-l2/main.go) to include a check to verify your contract was added correctly
5. Update [Predeploys.sol](../../packages/contracts-bedrock/src/libraries/Predeploys.sol) to include your added contracts at their expected addresses
6. Update [Predeploys.t.sol](../../packages/contracts-bedrock/test/Predeploys.t.sol) to include the `name` of your contracts to avoid being tested for `Predeploys.PROXY_ADMIN`
1. Update the `switch` case found in [layer_two.go](../../op-chain-ops/genesis/layer_two.go) to include the `name` of your contracts
1. Update [immutables.go](../../op-chain-ops/immutables/immutables.go) to include your added contracts
1. Update [Predeploys.sol](../../packages/contracts-bedrock/src/libraries/Predeploys.sol) to include your added contracts at their expected addresses
1. Update [Predeploys.t.sol](../../packages/contracts-bedrock/test/Predeploys.t.sol) to include the `name` of your contracts to avoid being tested for `Predeploys.PROXY_ADMIN`
all: check-l2
check-l2:
go build -o ./bin/check-l2 ./cmd/check-l2/main.go
test:
go test ./...
......@@ -12,4 +7,4 @@ fuzz:
go test -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzAliasing ./crossdomain
go test -run NOTAREALTEST -v -fuzztime 10s -fuzz=FuzzVersionedNonce ./crossdomain
.PHONY: check-l2 test fuzz
.PHONY: test fuzz
# op-chain-ops
This package contains utilities for working with chain state.
## check-l2
The `check-l2` binary is used for verifying that an OP Stack L2
has been configured correctly. It iterates over all 2048 predeployed
proxies to make sure they are configured correctly with the correct
proxy admin address. After that, it checks that all [predeploys](../op-bindings/predeploys/addresses.go)
are configured and aliased correctly. Additional contract-specific
checks ensure configuration like ownership, version, and storage
is set correctly for the predeploys.
#### Usage
It can be built and run using the [Makefile](./Makefile) `check-l2` target.
Run `make check-l2` to create a binary in [./bin/check-l2](./bin/check-l2)
that can be executed by providing the `--l1-rpc-url` and `--l2-rpc-url` flags.
```sh
./bin/check-l2 \
--l2-rpc-url http://localhost:9545 \
--l1-rpc-url http://localhost:8545
```
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment