Skip to content

Commit

Permalink
docs: latest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
praetoriansentry committed Dec 6, 2024
1 parent d44d726 commit ec8cae5
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 18 deletions.
9 changes: 2 additions & 7 deletions .github/tests/attach-second-cdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ deployment_stages:
deploy_agglayer: false

args:
verbosity: debug
deployment_suffix: "-002"
zkevm_rollup_chain_id: 20202
zkevm_rollup_id: 2
Expand All @@ -27,19 +26,15 @@ args:
zkevm_l2_proofsigner_private_key: "0xc7fe3a006d75ba9326d9792523385abb49057c66aee0b8b4248821a89713f975"


agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.19
cdk_node_image: ghcr.io/0xpolygon/cdk:0.5.0-beta7
cdk_node_image: ghcr.io/0xpolygon/cdk:0.5.0-beta8
cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0
zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC3
zkevm_bridge_ui_image: leovct/zkevm-bridge-ui:multi-network
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
additional_services: []
consensus_contract_type: pessimistic
sequencer_type: erigon
erigon_strict_mode: false
gas_token_enabled: true
agglayer_prover_sp1_key: "0x7a2baab6e39878897307784a76f9711e783d54e6221d23f1cd4f3baf7d044f6c"
zkevm_use_real_verifier: true
enable_normalcy: true
verifier_program_vkey: 0x00617f688d0a520d3cdda077a80a3437e1997f630595d404117adfcb0ad56785
verifier_program_vkey: 0x00766aa16a6efe4ac05c0fe21d4b50f9631dbd1a2663a982da861427085ea2ea

12 changes: 5 additions & 7 deletions .github/tests/fork12-pessimistic.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
args:
agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.19
cdk_node_image: ghcr.io/0xpolygon/cdk:0.5.0-beta7
cdk_node_image: ghcr.io/0xpolygon/cdk:0.5.0-beta8
cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0
zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC3
zkevm_bridge_ui_image: leovct/zkevm-bridge-ui:multi-network
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
additional_services: []
consensus_contract_type: pessimistic
sequencer_type: erigon
erigon_strict_mode: false
zkevm_use_gas_token_contract: false
#agglayer_prover_sp1_key:
gas_token_enabled: false
zkevm_use_real_verifier: true
enable_normalcy: true
verifier_program_vkey: 0x00617f688d0a520d3cdda077a80a3437e1997f630595d404117adfcb0ad56785
verifier_program_vkey: 0x00766aa16a6efe4ac05c0fe21d4b50f9631dbd1a2663a982da861427085ea2ea
agglayer_prover_sp1_key: ""

2 changes: 1 addition & 1 deletion input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DEFAULT_DEPLOYMENT_STAGES = {
}

DEFAULT_IMAGES = {
"agglayer_image": "ghcr.io/agglayer/agglayer:0.2.0-rc.19", # https://github.com/agglayer/agglayer/tags
"agglayer_image": "ghcr.io/agglayer/agglayer:0.2.0-rc.20", # https://github.com/agglayer/agglayer/tags
"cdk_erigon_node_image": "hermeznetwork/cdk-erigon:v2.60.0", # https://hub.docker.com/r/hermeznetwork/cdk-erigon/tags
"cdk_node_image": "ghcr.io/0xpolygon/cdk:0.4.0", # https://github.com/0xpolygon/cdk/pkgs/container/cdk
"cdk_validium_node_image": "0xpolygon/cdk-validium-node:0.7.0-cdk", # https://hub.docker.com/r/0xpolygon/cdk-validium-node/tags
Expand Down
27 changes: 25 additions & 2 deletions multi-pp-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ exit 1;
# networks. The secret file here is the same as the normal file but
# with an SP1 key
kurtosis run --enclave pp --args-file .github/tests/fork12-pessimistic-secret.yml .
kurtosis run --enclave pp --args-file .github/tests/attach-second-cdk.yml .
kurtosis run --enclave pp --args-file .github/tests/attach-second-cdk.yml . # TODO investigate issue with first block startup


# In order to proceed, we'll need to grab the combined files from both
# chains. We'll specifically want the create rollup parameters file
Expand All @@ -27,6 +28,29 @@ kurtosis service exec pp contracts-001 "cat /opt/zkevm/combined-001.json" | tai
kurtosis service exec pp contracts-002 "cat /opt/zkevm/combined-002.json" | tail -n +2 | jq '.' > combined-002.json
kurtosis service exec pp contracts-002 "cat /opt/zkevm-contracts/deployment/v2/create_rollup_parameters.json" | tail -n +2 | jq -r '.gasTokenAddress' > gas-token-address.json



cast logs --from-block 0 --to-block 1 --rpc-url https://rpc.cdk12.dev.polygon --address 0x1348947e282138d8f377b467F7D9c2EB0F335d1f 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498


curl http://127.0.0.1:33725 \
--json '{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"chainId": "0x1ce",
"data": "0xbab161bf",
"from": "0x0000000000000000000000000000000000000000",
"input": "0xbab161bf",
"to": "0xd8886e9D827218a02B8C04323b5550f2F36BC8d5"
},
"latest"
]
}'


# This diagnosis isn't critical, but it's nice to confirm that we are
# using a real verifier.
cast code --rpc-url http://$(kurtosis port print pp el-1-geth-lighthouse rpc) $(cat combined-001.json | jq -r '.verifierAddress')
Expand Down Expand Up @@ -200,7 +224,6 @@ curl -s $l2_pp2b_url/bridges/$target_address | jq '.deposits[] | select(.ready_f
cast balance --ether --rpc-url $l2_pp1_url $target_address
cast balance --ether --rpc-url $l2_pp2_url $target_address


# Let's check our L2 Pol token balance (both should be non-zero)
token_hash=$(cast keccak $(cast abi-encode --packed 'f(uint32,address)' 0 $pol_address))
l2_pol_address=$(cast call --rpc-url $l2_pp1_url $bridge_address 'tokenInfoToWrappedToken(bytes32)(address)' $token_hash)
Expand Down
24 changes: 23 additions & 1 deletion multi-pp-test.sh.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ with an SP1 key

```sh
kurtosis run --enclave pp --args-file .github/tests/fork12-pessimistic-secret.yml .
kurtosis run --enclave pp --args-file .github/tests/attach-second-cdk.yml .
kurtosis run --enclave pp --args-file .github/tests/attach-second-cdk.yml . # TODO investigate issue with first block startup
```

In order to proceed, we'll need to grab the combined files from both
Expand All @@ -34,6 +34,28 @@ from the second chain because we need to know the gas token address.
kurtosis service exec pp contracts-001 "cat /opt/zkevm/combined-001.json" | tail -n +2 | jq '.' > combined-001.json
kurtosis service exec pp contracts-002 "cat /opt/zkevm/combined-002.json" | tail -n +2 | jq '.' > combined-002.json
kurtosis service exec pp contracts-002 "cat /opt/zkevm-contracts/deployment/v2/create_rollup_parameters.json" | tail -n +2 | jq -r '.gasTokenAddress' > gas-token-address.json



cast logs --from-block 0 --to-block 1 --rpc-url https://rpc.cdk12.dev.polygon --address 0x1348947e282138d8f377b467F7D9c2EB0F335d1f 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498


curl http://127.0.0.1:33725 \
--json '{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"chainId": "0x1ce",
"data": "0xbab161bf",
"from": "0x0000000000000000000000000000000000000000",
"input": "0xbab161bf",
"to": "0xd8886e9D827218a02B8C04323b5550f2F36BC8d5"
},
"latest"
]
}'
```

This diagnosis isn't critical, but it's nice to confirm that we are
Expand Down

0 comments on commit ec8cae5

Please sign in to comment.