What's the suggested workflow to edit the test docker image for the L1?
Closed this issue · 1 comments
My goal is to edit the Solidity contract that verifies a zkevm proof on the L1 for test purposes.
First step is to identify which of the docker containers in test/docker-compose.yml
corresponds to the L1. In the README I see
L2 RPC endpoint:
http://localhost:8123
L2 Chain ID: 1001
L1 RPC endpoint:http:localhost:8545
L1 Chain ID: 1337
And in test/docker-compose.yml
I see
cdk-validium-node/test/docker-compose.yml
Lines 453 to 457 in 0a1743e
Docker container name zkevm-mock-l1-network
strongly hints that this container is the L1. This suggestion is backed by the use of port 8545
. The associated docker image name 0xpolygon/cdk-validium-contracts:elderberry-fork.9-geth1.13.11
suggests to me that this image is built in repo cdk-validium-contracts
. In particular, I expect to be able to clone this repo, edit its contents, rebuild its docker image, then use it as a drop-in replacement for container zkevm-mock-l1-network
in the present repo.
Over at repo cdk-validium-contracts I see a couple of proof verification contracts:
- https://github.com/0xPolygon/cdk-validium-contracts/blob/main/contracts/verifiers/FflonkVerifier.sol
- https://github.com/0xPolygon/cdk-validium-contracts/blob/main/contracts/mocks/VerifierRollupHelperMock.sol
I'm able to edit these contracts and rebuild the docker image as per docs. So far so good!
The docker image I built has name hermeznetwork/geth-cdk-validium-contracts
. Unfortunately, this name does not match any image names appearing in test/docker-compose.yml
. At this point it's not clear which of the containers in test/docker-compose.yml
is the intended home of this new container I just built.
I edited test/docker-compose.yml
to point container zkevm-mock-l1-network
at my new image hermeznetwork/geth-cdk-validium-contracts
. But that broke the test: 8/13 containers exited immediately, most of which contained fatal log messages like no contract code at given address
.
I see here that the new image hermeznetwork/geth-cdk-validium-contracts
specifies chain ID 1001
:
From the above cited README I see that chain ID 1001
is the L2, not the L1. This suggests to me that this image is intended for the L2, not the L1.
At this point I decide to seek help: what's the suggested workflow to edit the test docker image for the L1?
Closing because I've found some other resources to help me learn:
- it seems that https://github.com/0xPolygon/kurtosis-cdk is the preferred repo for playing with the Polygon stack
- I found a cool video about that repo: https://www.youtube.com/watch?v=6ykNLEhwxIs