Skip to content

Commit

Permalink
Merge pull request #443 from 0xPolygon/jhilliard/agglayer-latest-version
Browse files Browse the repository at this point in the history
AggLayer Version Update
  • Loading branch information
praetoriansentry authored Jan 16, 2025
2 parents d0da892 + 99d936a commit 8ed9e2d
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .github/tests/agglayer-sp1-key.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
args:
agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.23
agglayer_prover_sp1_key: ""
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
consensus_contract_type: pessimistic
erigon_strict_mode: false
gas_token_enabled: false
Expand Down
2 changes: 1 addition & 1 deletion .github/tests/attach-second-cdk-pessimistic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ args:

cdk_node_image: ghcr.io/0xpolygon/cdk:0.5.0-beta10
cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.2
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
additional_services: []
consensus_contract_type: pessimistic
sequencer_type: erigon
Expand Down
2 changes: 1 addition & 1 deletion .github/tests/attach-second-cdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ args:
zkevm_l2_proofsigner_address: "0xf1a661D7b601Ec46a040f57193cC99aB8c4132FA"
zkevm_l2_proofsigner_private_key: "0xc7fe3a006d75ba9326d9792523385abb49057c66aee0b8b4248821a89713f975"

zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
2 changes: 1 addition & 1 deletion .github/tests/attach-third-cdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ args:
zkevm_l2_claimsponsor_private_key: "0xb97112e36cfcde131faa110430eed6593b75406e5d6991d8db3ed0f492a73b6f"

cdk_node_image: ghcr.io/0xpolygon/cdk:0.5.0-beta10
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
consensus_contract_type: pessimistic
erigon_strict_mode: false
gas_token_enabled: false
Expand Down
2 changes: 1 addition & 1 deletion .github/tests/fork12-pessimistic.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
args:
cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.2
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
additional_services: []
consensus_contract_type: pessimistic
sequencer_type: erigon
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,13 @@ jobs:
working-directory: .github/scripts
run: |
echo "Sending a bridge transaction from L1 to the PP network Erigon RPC..."
bridge_address=$(kurtosis service exec ${{ env.ENCLAVE_NAME }} contracts-001 'jq -r .polygonZkEVMBridgeAddress /opt/zkevm/combined.json' 2>&1 | grep -P '0x\h*')
originNetworkURL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} el-1-geth-lighthouse rpc)
polycli ulxly bridge asset \
--private-key 12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625 \
--value 1000000000000000000 \
--rpc-url http://$originNetworkURL \
--bridge-address 0xd8886e9D827218a02B8C04323b5550f2F36BC8d5 \
--bridge-address $bridge_address \
--destination-network 3 \
--force-update-root=true \
--destination-address 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
Expand All @@ -512,7 +513,7 @@ jobs:
destNetworkURL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} cdk-erigon-rpc-003 rpc)
bridgeURL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} zkevm-bridge-service-003 rpc)
polycli ulxly claim asset \
--bridge-address 0xd8886e9D827218a02B8C04323b5550f2F36BC8d5 \
--bridge-address $bridge_address \
--private-key 12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625 \
--deposit-count 3 \
--destination-address 0xE34aaF64b29273B7D567FCFc40544c014EEe9970 \
Expand All @@ -535,12 +536,13 @@ jobs:
working-directory: .github/scripts
run: |
echo "Sending a bridge transaction from third PP network to the first rollup Erigon RPC..."
bridge_address=$(kurtosis service exec ${{ env.ENCLAVE_NAME }} contracts-001 'jq -r .polygonZkEVMBridgeAddress /opt/zkevm/combined.json' 2>&1 | grep -P '0x\h*')
originNetworkURL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} cdk-erigon-rpc-003 rpc)
polycli ulxly bridge asset \
--private-key 12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625 \
--value 1000000000000 \
--rpc-url $originNetworkURL \
--bridge-address 0xd8886e9D827218a02B8C04323b5550f2F36BC8d5 \
--bridge-address $bridge_address \
--destination-network 1 \
--force-update-root=true \
--destination-address 0xE34aaF64b29273B7D567FCFc40544c014EEe9970 \
Expand All @@ -558,7 +560,7 @@ jobs:
destNetworkURL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} cdk-erigon-rpc-001 rpc)
bridgeURL=$(kurtosis port print ${{ env.ENCLAVE_NAME }} zkevm-bridge-service-003 rpc)
polycli ulxly claim asset \
--bridge-address 0xd8886e9D827218a02B8C04323b5550f2F36BC8d5 \
--bridge-address $bridge_address \
--private-key 12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625 \
--deposit-count 0 \
--destination-address 0xE34aaF64b29273B7D567FCFc40544c014EEe9970 \
Expand Down
3 changes: 3 additions & 0 deletions agglayer.star
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def run(plan, args, contract_setup_addresses):

prover_env_vars["RUST_BACKTRACE"] = "1"
if "agglayer_prover_sp1_key" in args and args["agglayer_prover_sp1_key"] != None:
prover_env_vars["NETWORK_PRIVATE_KEY"] = args["agglayer_prover_sp1_key"]
# Keeping this for backward compatibility for now
prover_env_vars["SP1_PRIVATE_KEY"] = args["agglayer_prover_sp1_key"]
prover_env_vars["NETWORK_RPC_URL"] = args["agglayer_prover_network_url"]

agglayer_prover = plan.add_service(
name="agglayer-prover",
Expand Down
2 changes: 1 addition & 1 deletion docs/multi-pp-testing/lxly.pict
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DestinationChain : L1, PP1, PP2, FEP
DestinationAddress : EOA, Contract, Precompile
BridgeType : Asset, Message, Weth
Token : NativeEther, LocalERC20, Buggy, WETH, GasToken
MetaData : 0x, Random
MetaData : 0x, Random, Huge, Max
ForceUpdate : True (4), False
Amount : 0, 1, Random, Max

Expand Down
4 changes: 2 additions & 2 deletions docs/multi-pp-testing/net1.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
args:
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
additional_services: []
consensus_contract_type: pessimistic
sequencer_type: erigon
erigon_strict_mode: false
gas_token_enabled: false
zkevm_use_real_verifier: true
enable_normalcy: true
agglayer_prover_sp1_key: 0xSOME_SP1_KEY
agglayer_prover_sp1_key: 0xsome_sp1_key

2 changes: 1 addition & 1 deletion docs/multi-pp-testing/net2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ args:
zkevm_l2_proofsigner_address: "0xf1a661D7b601Ec46a040f57193cC99aB8c4132FA"
zkevm_l2_proofsigner_private_key: "0xc7fe3a006d75ba9326d9792523385abb49057c66aee0b8b4248821a89713f975"

zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
additional_services: []
consensus_contract_type: pessimistic
sequencer_type: erigon
Expand Down
2 changes: 1 addition & 1 deletion docs/multi-pp-testing/net3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ args:
zkevm_l2_proofsigner_address: "0xDcd1d53324a9Ae5a50a55F62556A771376Fe434D"
zkevm_l2_proofsigner_private_key: "0xcb1f295abf6538023fcf96eaa8e81969a65ba70ab61590187b77e2c01aaba748"

zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1
zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.4-pp-fork.12
additional_services: []
sequencer_type: erigon

25 changes: 21 additions & 4 deletions docs/multi-pp-testing/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi

tester_contract_address=0xc54E34B55EF562FE82Ca858F70D1B73244e86388
test_erc20_buggy_addr=0x22939b3A4dFD9Fc6211F99Cdc6bd9f6708ae2956
test_lxly_proxy_addr=0x1786B94e55cA57b897aF0f59a1e5b31EA0469547
test_lxly_proxy_addr=0x5d1847D52a39a05E6EDb45F2890d52D83155CF7F
tester_contract_address=0xc54E34B55EF562FE82Ca858F70D1B73244e86388

l1_rpc_url=http://$(kurtosis port print pp el-1-geth-lighthouse rpc)
Expand Down Expand Up @@ -134,6 +134,14 @@ while read scenario ; do
testCommand="$testCommand --call-data $(date +%s | xxd -p)"
elif [[ $testMetaData == "0x" ]]; then
testCommand="$testCommand --call-data 0x"
elif [[ $testMetaData == "Huge" ]]; then
temp_file=$(mktemp)
xxd -p /dev/random | tr -d "\n" | head -c 97000 > $temp_file
testCommand="$testCommand --call-data-file $temp_file"
elif [[ $testMetaData == "Max" ]]; then
temp_file=$(mktemp)
xxd -p /dev/random | tr -d "\n" | head -c 261569 > $temp_file
testCommand="$testCommand --call-data-file $temp_file"
else
printf "Unrecognized Metadata: $testMetaData\n"
exit 1;
Expand Down Expand Up @@ -205,7 +213,7 @@ polycli ulxly claim-everything \
--destination-address $eth_address \
--private-key $private_key \
--rpc-url $l2_fep_url \
--bridge-limit 1000
--bridge-limit 1000 --bridge-offset 0
polycli ulxly claim-everything \
--bridge-address $bridge_address \
--bridge-service-map $network_id_fep=$l2_fepb_url \
Expand All @@ -214,7 +222,7 @@ polycli ulxly claim-everything \
--destination-address $eth_address \
--private-key $private_key \
--rpc-url $l2_pp1_url \
--bridge-limit 1000
--bridge-limit 1000 --bridge-offset 0
polycli ulxly claim-everything \
--bridge-address $bridge_address \
--bridge-service-map $network_id_fep=$l2_fepb_url \
Expand All @@ -223,4 +231,13 @@ polycli ulxly claim-everything \
--destination-address $eth_address \
--private-key $private_key \
--rpc-url $l2_pp2_url \
--bridge-limit 1000
--bridge-limit 1000 --bridge-offset 0
polycli ulxly claim-everything \
--bridge-address $bridge_address \
--bridge-service-map $network_id_fep=$l2_fepb_url \
--bridge-service-map $network_id_pp1=$l2_pp1b_url \
--bridge-service-map $network_id_pp2=$l2_pp2b_url \
--destination-address $eth_address \
--private-key $private_key \
--rpc-url $l1_rpc_url \
--bridge-limit 1000 --bridge-offset 0
Loading

0 comments on commit 8ed9e2d

Please sign in to comment.