Skip to content

Commit

Permalink
op-chain-ops: delete check-l2 (#8942)
Browse files Browse the repository at this point in the history
As of #8933 and #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.
  • Loading branch information
tynes authored Jan 11, 2024
1 parent 5996d0b commit cef704a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1,003 deletions.
6 changes: 0 additions & 6 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,6 @@ def wait_for_rpc_server(url):


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([
Expand Down
9 changes: 4 additions & 5 deletions op-bindings/bindgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
7 changes: 1 addition & 6 deletions op-chain-ops/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
all: check-l2

check-l2:
go build -o ./bin/check-l2 ./cmd/check-l2/main.go

test:
go test ./...

Expand All @@ -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
22 changes: 0 additions & 22 deletions op-chain-ops/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
# 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
```
Loading

0 comments on commit cef704a

Please sign in to comment.