0xPolygon / kurtosis-cdk

A Kurtosis package that deploys a private, portable, and modular Polygon CDK devnet
https://docs.polygon.technology/cdk
Apache License 2.0
29 stars 47 forks source link

Can't deploy on Sepolia: EIP-155 Replay Protection Error: Transactions Missing chainId #119

Closed M-Francia closed 1 month ago

M-Francia commented 1 month ago

System information

Ubuntu 22.04 amd

Commit id

9381ebbbf2424343a33f7a56506fa56c8a1f9a51

Tools versions

✅ kurtosis 0.89.10 is installed, meets the requirement (=0.89). ✅ docker 26.1.3 is installed, meets the requirement (>=24.7).

You might as well need the following tools to interact with the environment... ✅ jq 1.6 is installed. ✅ yq 3.4.3 is installed, meets the requirement (>=3.2). ✅ cast 0.2.0 is installed. ✅ polycli v0.1.43-5-g73ad3f4 is installed.

Description & steps to reproduce

Describe the bug Transactions do not specify the chainId, causing replay protection (EIP-155) errors when deploying contracts.

To Reproduce Steps to reproduce the behavior:

  1. Deploy contracts using the current setup on Sepolia.
  2. Observe the error: Transactions must be replay-protected.

Expected behavior Transactions should include the chainId to comply with EIP-155 replay protection requirements.

Additional context The error originates from the file deployment/v2/2_deployPolygonZKEVMDeployers.ts (line 73) which deploys a contract using deployment/helpers/deployment-helpers.ts. The transactions in the helpers file do not specify the chainId.

Also, public nodes on Sepolia do not accept transactions without EIP-155, preventing the transactions from being processed correctly.

Proposed Solution Ensure all transactions specify the chainId in the deployment scripts.

Example:

const options = {
    gasLimit: 8000000,
    chainId: 11155111 // Correct chainId for Sepolia
};

Desired behavior

Transactions should include the chainId to comply with EIP-155 replay protection requirements, ensuring they are processed correctly by public nodes on Sepolia.

What is the severity of this bug?

Critical; I am blocked and Kurtosis CDK is unusable for me because of this bug.

jhkimqd commented 1 month ago

Hey! thanks for raising the issue. Could you provide more context into how the issue could be reproduced? e.g. Have you changed anything else in the code to customize something or are you using a valid L1 RPC provider or is your L1 account not from the mnemonic in params.yml, etc...?

From your description, it seems like you're attempting to deploy the Kurtosis-CDK with Sepolia as L1. I've attempted to try it based on the same commit ID, following the instructions here and it seems to be fine with no issues you've experienced:

Deploying zkevm contracts on L1
Command returned with exit code '0' and the following output:
--------------------
[2024-05-22 09:54:05] Waiting for the L1 RPC to be available
blockHash               0x521a6d39d509e95585276bf9ea9059f78f7614df449ad9ac6b0ee13665155653
blockNumber             5953899
contractAddress         
cumulativeGasUsed       1534196
effectiveGasPrice       11775809132
from                    0x5A13035786d906732509D1a0815906c7124fB58C
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xf001ed2151209ba9414c82856165b12caa8c18fa23737627b7680ff097a514a8
transactionIndex        31
type                    2
to                      0x5b06837A43bdC3dD9F114558DAf4B26ed49842Ed
[2024-05-22 09:54:15] L1 RPC is now available
[2024-05-22 09:54:15] Funding important accounts on l1
[2024-05-22 09:54:15] Funding admin account
blockHash               0xae1d6d531b1846d92c879381212f97c3a59fc9635ef6f3a7d0e44e15c35c1821
blockNumber             5953900
contractAddress         
cumulativeGasUsed       644845
effectiveGasPrice       11608117534
from                    0x5A13035786d906732509D1a0815906c7124fB58C
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xd30d99d5906c9b756bdc680f17d8e48c2bed241614af77862d40ecab35e8a53f
transactionIndex        11
type                    2
to                      0xE34aaF64b29273B7D567FCFc40544c014EEe9970
[2024-05-22 09:54:31] Funding sequencer account
blockHash               0xc9b0e5358cdd5193053badef13d48e9ab0392daf71f40682d5af9c37970850a8
blockNumber             5953901
contractAddress         
cumulativeGasUsed       1289732
effectiveGasPrice       11811437181
from                    0x5A13035786d906732509D1a0815906c7124fB58C
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xf93c37a7af39dc6b18ad02f79c91a4c26bec52bddaf199d9aaff175876c4630e
transactionIndex        26
type                    2
to                      0x5b06837A43bdC3dD9F114558DAf4B26ed49842Ed
[2024-05-22 09:54:40] Funding aggregator account
blockHash               0xbff6a20545f3386e30a153d4eaa77f9fd5addc7dee7084c7d642be3ce8fc464d
blockNumber             5953902
contractAddress         
cumulativeGasUsed       689279
effectiveGasPrice       12033130884
from                    0x5A13035786d906732509D1a0815906c7124fB58C
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xb5a7569f9f23b81f66aa9dc221a035a371d56049b50d1c4e71102ddb2e800dce
transactionIndex        13
type                    2
to                      0xCae5b68Ff783594bDe1b93cdE627c741722c4D4d
[2024-05-22 09:54:55] Funding agglayer account
blockHash               0xf0f461a64c8e8fad8e8eeda9bf5bb098227c2adc1855e5c7ec11fd359a9daa67
blockNumber             5953903
contractAddress         
cumulativeGasUsed       1232674
effectiveGasPrice       11738164685
from                    0x5A13035786d906732509D1a0815906c7124fB58C
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xde14eb720f56d1c859bf3ea3c2978d1a6bc2763784d51ac13a00f2468e049f1b
transactionIndex        25
type                    2
to                      0x351e560852ee001d5D19b5912a269F849f59479a
[2024-05-22 09:55:03] Funding claimtxmanager account
blockHash               0x8566113c36137cf72591aabb70f113e73475189e6975220d1a2f436f92ee1729
blockNumber             5953904
contractAddress         
cumulativeGasUsed       966400
effectiveGasPrice       11976389773
from                    0x5A13035786d906732509D1a0815906c7124fB58C
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xa78d961d572656f6ea076b4a77dd442b775b634a10cd7194f973756ee8ba3e92
transactionIndex        20
type                    2
to                      0x5f5dB0D4D58310F53713eF4Df80ba6717868A9f8
/opt/zkevm-contracts /opt
[2024-05-22 09:55:18] Deploying zkevm contracts to L1
[2024-05-22 09:55:18] Step 1: Preparing tesnet
> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/testnet/prepareTestnet.ts --network localhost
#######################
pol deployed to: 0xbC360Ec1Dc83be58116DD748D7C453a262f68a63
[2024-05-22 09:55:49] Step 2: Creating genesis
> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> ts-node deployment/v2/1_createGenesis.ts
Warning: Potentially unsafe deployment of contracts/PolygonZkEVMGlobalExitRootL2.sol:PolygonZkEVMGlobalExitRootL2
    You are using the `unsafeAllow.state-variable-immutable` flag.
Warning: Potentially unsafe deployment of contracts/PolygonZkEVMGlobalExitRootL2.sol:PolygonZkEVMGlobalExitRootL2
    You are using the `unsafeAllow.constructor` flag.
[2024-05-22 09:55:53] Step 3: Deploying PolygonZKEVMDeployer
> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/v2/2_deployPolygonZKEVMDeployer.ts --network localhost
#######################
polygonZkEVMDeployer already deployed on:  0xe5CF69183CFCF0571E733D59a1a53d4E6ceD6E85
[2024-05-22 09:55:55] Step 4: Deploying contracts
> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/v2/3_deployContracts.ts --network localhost
#######################
Proxy admin deployed to: 0x5fbbf91bB7dfdB32E8667Abf65B44c008D4c975C
#######################
bridge impl deployed to: 0x20599082fB1d47dC10326d68742EEC7144eC3c20
#######################
##### Deployment TimelockContract  #####
#######################
minDelayTimelock: 3600
timelockAdminAddress: 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
Rollup Manager: 0x621d68D77fCe4428bCB9b48cc16434681bA5a34d
#######################
Polygon timelockContract deployed to: 0xfE88dFB863dA4a266cC413c9C880D8952ABafDDa
#######################
#####  Checks TimelockContract  #####
#######################
polygonZkEVM (Rollup Manager): 0x621d68D77fCe4428bCB9b48cc16434681bA5a34d
#######################
PolygonZkEVMBridge deployed to: 0xEEF79Fb542143716Fb7E004e16B39E93805B4f2A
#######################
#####    Checks PolygonZkEVMBridge   #####
#######################
PolygonZkEVMGlobalExitRootAddress: 0xfa5F4A81e10260E69e1e6861E392dEFBa3e96332
networkID: 0n
Rollup Manager: 0x621d68D77fCe4428bCB9b48cc16434681bA5a34d
Warning: Potentially unsafe deployment of contracts/v2/PolygonZkEVMGlobalExitRootV2.sol:PolygonZkEVMGlobalExitRootV2
    You are using the `unsafeAllow.state-variable-immutable` flag.
Warning: Potentially unsafe deployment of contracts/v2/PolygonZkEVMGlobalExitRootV2.sol:PolygonZkEVMGlobalExitRootV2
    You are using the `unsafeAllow.constructor` flag.
#######################
polygonZkEVMGlobalExitRoot deployed to: 0xfa5F4A81e10260E69e1e6861E392dEFBa3e96332
#######################
##### Deployment Rollup Manager #####
#######################
deployer: 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
PolygonZkEVMGlobalExitRootAddress: 0xfa5F4A81e10260E69e1e6861E392dEFBa3e96332
polTokenAddress: 0xbC360Ec1Dc83be58116DD748D7C453a262f68a63
polygonZkEVMBridgeContract: 0xEEF79Fb542143716Fb7E004e16B39E93805B4f2A
trustedAggregator: 0xCae5b68Ff783594bDe1b93cdE627c741722c4D4d
pendingStateTimeout: 604799
trustedAggregatorTimeout: 604799
admin: 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
timelockContract: 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
emergencyCouncilAddress: 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
Warning: Potentially unsafe deployment of contracts/v2/newDeployments/PolygonRollupManagerNotUpgraded.sol:PolygonRollupManagerNotUpgraded
    You are using the `unsafeAllow.state-variable-immutable` flag.
Warning: Potentially unsafe deployment of contracts/v2/newDeployments/PolygonRollupManagerNotUpgraded.sol:PolygonRollupManagerNotUpgraded
    You are using the `unsafeAllow.constructor` flag.
#######################
polygonRollupManagerContract deployed to: 0x621d68D77fCe4428bCB9b48cc16434681bA5a34d
#######################
#####    Checks  Rollup Manager  #####
#######################
PolygonZkEVMGlobalExitRootAddress: 0xfa5F4A81e10260E69e1e6861E392dEFBa3e96332
polTokenAddress: 0xbC360Ec1Dc83be58116DD748D7C453a262f68a63
polygonZkEVMBridgeContract: 0xEEF79Fb542143716Fb7E004e16B39E93805B4f2A
pendingStateTimeout: 604799n
trustedAggregatorTimeout: 604799n
[2024-05-22 09:58:08] Step 5: Creating rollup
> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/v2/4_createRollup.ts --network localhost
#######################
Verifier deployed to: 0xA17C9E14Ca01ad750eE4b2311439c251B54bbA12
#######################
Added new Rollup Type deployed
#######################
Created new Rollup: 0x29B2D7Df10B78a05C628310e8F86E727Ce9B3D36
Warning: Potentially unsafe deployment of contracts/v2/consensus/validium/PolygonDataCommittee.sol:PolygonDataCommittee
    You are using the `unsafeAllow.constructor` flag.
[2024-05-22 09:59:51] Combining contract deploy files
/opt
/opt/zkevm /opt
[2024-05-22 09:59:51] Creating combined.json
[2024-05-22 09:59:51] Approving the rollup address to transfer POL tokens on behalf of the sequencer
blockHash               0x57a90f6549d6b147e1a4c2cb87db829ba5090d7c7232acc47b27ca91f683b452
blockNumber             5953927
contractAddress         
cumulativeGasUsed       7335658
effectiveGasPrice       14084381130
from                    0x5b06837A43bdC3dD9F114558DAf4B26ed49842Ed
gasUsed                 46267
logs                    [{"address":"0xbc360ec1dc83be58116dd748d7c453a262f68a63","topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x0000000000000000000000005b06837a43bdc3dd9f114558daf4b26ed49842ed","0x00000000000000000000000029b2d7df10b78a05c628310e8f86e727ce9b3d36"],"data":"0x0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000","blockHash":"0x57a90f6549d6b147e1a4c2cb87db829ba5090d7c7232acc47b27ca91f683b452","blockNumber":"0x5ad987","transactionHash":"0x4da2874cd2c1f9b6129262982a3b84dcb389c4e65c5db7065f1ff8b40d2a34f0","transactionIndex":"0x43","logIndex":"0x64","removed":false}]
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000800000008000000000000000000000001000000000000000000020000000000000000002000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000010000000000000000000000001000000000000000000100000000000000000
root                    
status                  1
transactionHash         0x4da2874cd2c1f9b6129262982a3b84dcb389c4e65c5db7065f1ff8b40d2a34f0
transactionIndex        67
type                    0
to                      0xbC360Ec1Dc83be58116DD748D7C453a262f68a63
[2024-05-22 10:00:07] Setting the data availability committee
blockHash               0xe8404b09d63d66ae6b10c2f3cf1484a501bcd03e16083c8c7981c7994eb62c32
blockNumber             5953928
contractAddress         
cumulativeGasUsed       2555288
effectiveGasPrice       15895021424
from                    0xE34aaF64b29273B7D567FCFc40544c014EEe9970
gasUsed                 146938
logs                    [{"address":"0xe69086b03525db437e9931c799ccd9cd1c08dd19","topics":["0x831403fd381b3e6ac875d912ec2eee0e0203d0d29f7b3e0c96fc8f582d6db657"],"data":"0xe4e05261d6d69a2de8d0b41196695761a8e911eb19355d391a8ce19d9a9f7cbe","blockHash":"0xe8404b09d63d66ae6b10c2f3cf1484a501bcd03e16083c8c7981c7994eb62c32","blockNumber":"0x5ad988","transactionHash":"0xea651074d7e14518c2f35ccaf21b92526b9dcd9eedd1ddadd6956c0515a1f655","transactionIndex":"0xe","logIndex":"0xe","removed":false}]
logsBloom               0x00000000000000000100000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000001
root                    
status                  1
transactionHash         0xea651074d7e14518c2f35ccaf21b92526b9dcd9eedd1ddadd6956c0515a1f655
transactionIndex        14
type                    2
to                      0xE69086b03525Db437e9931c799Ccd9cD1c08DD19
[2024-05-22 10:00:16] Setting the data availability protocol
blockHash               0xa6519e9175968dd9b39b4dbafc040426ccb1e9938421a073bf226db1c1d070d0
blockNumber             5953929
contractAddress         
cumulativeGasUsed       676897
effectiveGasPrice       15717877572
from                    0xE34aaF64b29273B7D567FCFc40544c014EEe9970
gasUsed                 32178
logs                    [{"address":"0x29b2d7df10b78a05c628310e8f86e727ce9b3d36","topics":["0xd331bd4c4cd1afecb94a225184bded161ff3213624ba4fb58c4f30c5a861144a"],"data":"0x000000000000000000000000e69086b03525db437e9931c799ccd9cd1c08dd19","blockHash":"0xa6519e9175968dd9b39b4dbafc040426ccb1e9938421a073bf226db1c1d070d0","blockNumber":"0x5ad989","transactionHash":"0x306afeaf56d67c2fc7124c6bf64ea691d1c81a79cead04f92c1064479e6fc3ac","transactionIndex":"0xf","logIndex":"0x8","removed":false}]
logsBloom               0x00008000000000000000010000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000808000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0x306afeaf56d67c2fc7124c6bf64ea691d1c81a79cead04f92c1064479e6fc3ac
transactionIndex        15
type                    2
to                      0x29B2D7Df10B78a05C628310e8F86E727Ce9B3D36
[2024-05-22 10:00:25] Granting the aggregator role to the agglayer so that it can also verify batches
blockHash               0x62b4fce67df85ca8f934e7da44a779ff2e83d4c8bd0447ff03bea74d09f04e34
blockNumber             5953930
contractAddress         
cumulativeGasUsed       381093
effectiveGasPrice       15363660624
from                    0xE34aaF64b29273B7D567FCFc40544c014EEe9970
gasUsed                 58519
logs                    [{"address":"0x621d68d77fce4428bcb9b48cc16434681ba5a34d","topics":["0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d","0x084e94f375e9d647f87f5b2ceffba1e062c70f6009fdbcf80291e803b5c9edd4","0x000000000000000000000000351e560852ee001d5d19b5912a269f849f59479a","0x000000000000000000000000e34aaf64b29273b7d567fcfc40544c014eee9970"],"data":"0x","blockHash":"0x62b4fce67df85ca8f934e7da44a779ff2e83d4c8bd0447ff03bea74d09f04e34","blockNumber":"0x5ad98a","transactionHash":"0xe001daf7d41022150323984dce6a0adb8f39af11c87ee9ba5a6d06bfbacd5ee9","transactionIndex":"0x7","logIndex":"0x6","removed":false}]
logsBloom               0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000080000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000110000000000008000000000000000000000000000001000000000000000200000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001000000020000000
root                    
status                  1
transactionHash         0xe001daf7d41022150323984dce6a0adb8f39af11c87ee9ba5a6d06bfbacd5ee9
transactionIndex        7
type                    2
to                      0x621d68D77fCe4428bCB9b48cc16434681bA5a34d
--------------------
M-Francia commented 1 month ago

Hello @jhkimqd and thanks for your reply.

I followed the same documentation and made the necessary changes in params.yml as specified. Here are the values I modified:

# Deploy local L1.
deploy_l1: false
...
# Addresses generated using a mnemonic and polycli wallet inspect --mnemonic '<mnemonic>' --addresses 9 | tee keys.txt | jq -r '.Addresses[] | [.ETHAddress, .HexPrivateKey] | @tsv' | awk 'BEGIN{split("sequencer,aggregator,claimtxmanager,timelock,admin,loadtest,agglayer,dac,proofsigner",roles,",")} {print "zkevm_l2_" roles[NR] "_address: \"" $1 "\""; print "zkevm_l2_" roles[NR] "_private_key: \"0x" $2 "\"\n"}'

zkevm_l2_sequencer_address: "0x..."
zkevm_l2_sequencer_private_key: "0x..."

zkevm_l2_aggregator_address: "0x..."
zkevm_l2_aggregator_private_key: "0x..."

zkevm_l2_claimtxmanager_address: "0x..."
zkevm_l2_claimtxmanager_private_key: "0x..."

zkevm_l2_timelock_address: "0x..."
zkevm_l2_timelock_private_key: "0x..."

zkevm_l2_admin_address: "0x"
zkevm_l2_admin_private_key: "0x"

zkevm_l2_loadtest_address: "0x..."
zkevm_l2_loadtest_private_key: "0x..."

zkevm_l2_agglayer_address: "0x..."
zkevm_l2_agglayer_private_key: "0x..."

zkevm_l2_dac_address: "0x..."
zkevm_l2_dac_private_key: "0x..."

zkevm_l2_proofsigner_address: "0x..."
zkevm_l2_proofsigner_private_key: "0x..."
...
## L1 configuration.
l1_chain_id: 11155111
l1_preallocated_mnemonic: <other mnemonic>
l1_funding_amount: 1ether
l1_rpc_url: https://ethereum-sepolia-rpc.publicnode.com
l1_ws_url: wss://ethereum-sepolia-rpc.publicnode.com
# https://github.com/kurtosis-tech/ethereum-package/tree/main?tab=readme-ov-file#configuration
l1_additional_services: [
  # blockscout, # block explorer
  # dora, # beaconchain explorer
  # el_forkmon, # fork monitor tool
]

I did more tests:

Regards!

jhkimqd commented 1 month ago

I've tried it a few times again - using the same L1 URLs you've provided, and changing the salt.. but I still can't seem to reproduce the issue. It all ran successfully on my end with the same system (Ubuntu 22.04, AMD as well)..

Could you please share the logs from the contract-deployment stage after running kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . ?

M-Francia commented 1 month ago

Hi @jhkimqd commit: ed431e5a6a6e10bcad9f95ad9a80bc18c19f0662 Fore sure, there it is:

~/Documents/kurtosis-cdk git:[main]
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
INFO[2024-05-23T10:52:54+02:00] Creating a new enclave for Starlark to run inside... 
INFO[2024-05-23T10:52:57+02:00] Enclave 'cdk-v1' created successfully        
INFO[2024-05-23T10:52:57+02:00] Executing Starlark package at '/home/mario/Documents/kurtosis-cdk' as the passed argument '.' looks like a directory 
INFO[2024-05-23T10:52:57+02:00] Compressing package 'github.com/0xPolygon/kurtosis-cdk' at '.' for upload 
INFO[2024-05-23T10:52:57+02:00] Uploading and executing package 'github.com/0xPolygon/kurtosis-cdk' 

Container images used in this run:
> 0xpolygon/agglayer:0.1.3 - remotely downloaded
> grafana/grafana-enterprise:9.5.12 - remotely downloaded
> hermeznetwork/zkevm-bridge-service:v0.4.2 - remotely downloaded
> leovct/zkevm-contracts:fork9 - remotely downloaded
> 0xpolygon/cdk-validium-node:0.6.5-cdk - remotely downloaded
> badouralix/curl-jq - remotely downloaded
> postgres:16.2 - remotely downloaded
> 0xpolygon/cdk-data-availability:0.0.7 - remotely downloaded
> haproxy:2.9.7 - remotely downloaded
> leovct/zkevm-bridge-ui:multi-network - remotely downloaded
> hermeznetwork/zkevm-prover:v6.0.0 - remotely downloaded
> prom/prometheus:latest - remotely downloaded
> minhdvu/panoptichain - remotely downloaded

Printing a message
Deploying CDK environment...

Printing a message
Skipping the deployment of a local L1

Printing a message
Deploying zkevm contracts on L1

Rendering a template to a files artifact with name 'deploy-parameters-artifact'
Templates artifact name 'deploy-parameters-artifact' rendered with artifact UUID '1c711984fdec43d0b5e20a671a135fc9'

Rendering a template to a files artifact with name 'create-rollup-parameters-artifact'
Templates artifact name 'create-rollup-parameters-artifact' rendered with artifact UUID '14bd8fd9dac747dc9caa43acfc315c42'

Rendering a template to a files artifact with name 'contract-deployment-script-artifact'
Templates artifact name 'contract-deployment-script-artifact' rendered with artifact UUID 'e974146156d24b86b86e7041a759d931'

Rendering a template to a files artifact with name 'create-keystores-script-artifact'
Templates artifact name 'create-keystores-script-artifact' rendered with artifact UUID '7913c04a54024c999b0ae4b6a6fe0e3c'

Adding service with name 'contracts-001' and image 'leovct/zkevm-contracts:fork9'
Service 'contracts-001' added with service UUID '246d836ace6240028580e82181ad8fd6'

Checking if contracts are already initialized
Command returned with exit code '1' and the following output:
--------------------
stat: cannot statx '/opt/zkevm/.init-complete.lock': No such file or directory

--------------------

Deploying zkevm contracts on L1
Command returned with exit code '0' and the following output:
--------------------
[2024-05-23 08:53:06] Waiting for the L1 RPC to be available

blockHash               0x8d158dcd3adcacf792f287130d386edc4a6a808ab773f57cdcf7a31370047e98
blockNumber             5960441
contractAddress         
cumulativeGasUsed       1870274
effectiveGasPrice       23379597703
from                    0x874DF5e9678F939295d5519D8947a0c9e41628e8
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xf712e880505e75ecf60fa55783ccd90ffe6bfb949d36414a7121f69521baf151
transactionIndex        16
type                    2
to                      0xaF2A3fE1160D948765e6c454d9c62eBe2b3f6747
[2024-05-23 08:53:13] L1 RPC is now available
[2024-05-23 08:53:13] Funding important accounts on l1
[2024-05-23 08:53:13] Funding admin account

blockHash               0x42828831f3299157fe7c0d1af7cb1864f1e81cfa9b0acfe47d8fd0ff3ab6f1f1
blockNumber             5960442
contractAddress         
cumulativeGasUsed       2387817
effectiveGasPrice       23541730649
from                    0x874DF5e9678F939295d5519D8947a0c9e41628e8
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xd7ff845c7d0fb3555a79d378666e0504c255500a3197b12bc54119a7e74f2457
transactionIndex        13
type                    2
to                      0x1A94eEC634e06F5bfA8f0CF2d17fB913F65F1D95
[2024-05-23 08:53:26] Funding sequencer account

blockHash               0x513247e88a22d7aca07b2d9b28bdcc9018c8718f39225fbb1ef52f8e165f89fa
blockNumber             5960443
contractAddress         
cumulativeGasUsed       416883
effectiveGasPrice       23599128695
from                    0x874DF5e9678F939295d5519D8947a0c9e41628e8
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0xa1d98da7dd179962aaf46c9ff4dbdee731c477e3c5eb47f7b289d05d868ae15e
transactionIndex        8
type                    2
to                      0xaF2A3fE1160D948765e6c454d9c62eBe2b3f6747
[2024-05-23 08:53:39] Funding aggregator account

blockHash               0x420ddb7a0fa3fbdeb84adc3896e7e4a96f2368326061b68472ecc365de50bf32
blockNumber             5960444
contractAddress         
cumulativeGasUsed       466849
effectiveGasPrice       23026247701
from                    0x874DF5e9678F939295d5519D8947a0c9e41628e8
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0x12e035b841f6e35c559c2c7507a853ab70b9f5ca0b39a0441fc0fa90b6539bac
transactionIndex        11
type                    2
to                      0xb42AA23ab7131aaF3F807c9fF0bf7CEB19baE41b
[2024-05-23 08:53:52] Funding agglayer account

blockHash               0xf20b2a71316711062eace26e6dbd0b418b561e49f64d36b9cb4c6a67a688c502
blockNumber             5960445
contractAddress         
cumulativeGasUsed       1167749
effectiveGasPrice       22154783170
from                    0x874DF5e9678F939295d5519D8947a0c9e41628e8
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0x95201cfd617893d590054a907af07c96a77afe97a922f4ca855a8d7140153a47
transactionIndex        15
type                    2
to                      0x7687FF546751DD3BE96049A1CB86681d83CE3898
[2024-05-23 08:54:05] Funding claimtxmanager account

blockHash               0x4b6713275977e879b8f7c5588ab1395f6f78c5da054149d0bc9439052134d3bd
blockNumber             5960446
contractAddress         
cumulativeGasUsed       957297
effectiveGasPrice       21610833619
from                    0x874DF5e9678F939295d5519D8947a0c9e41628e8
gasUsed                 21000
logs                    []
logsBloom               0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
root                    
status                  1
transactionHash         0x19fa27131f38fd967ed03b3ae069cdd3ce0a4d63fed887d1ac59be574997b169
transactionIndex        17
type                    2
to                      0x823DE8c82E1f9b7eA32ba8eD2788bF341f2C1E6F
/opt/zkevm-contracts /opt
[2024-05-23 08:54:12] Deploying zkevm contracts to L1
[2024-05-23 08:54:12] Step 1: Preparing tesnet

> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/testnet/prepareTestnet.ts --network localhost

#######################

pol deployed to: 0x0A2eba9F80d206bf4A339315b61192200D87aBAf
[2024-05-23 08:54:49] Step 2: Creating genesis

> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> ts-node deployment/v2/1_createGenesis.ts

Warning: Potentially unsafe deployment of contracts/PolygonZkEVMGlobalExitRootL2.sol:PolygonZkEVMGlobalExitRootL2

    You are using the `unsafeAllow.state-variable-immutable` flag.

Warning: Potentially unsafe deployment of contracts/PolygonZkEVMGlobalExitRootL2.sol:PolygonZkEVMGlobalExitRootL2

    You are using the `unsafeAllow.constructor` flag.

[2024-05-23 08:54:54] Step 3: Deploying PolygonZKEVMDeployer

> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/v2/2_deployPolygonZKEVMDeployer.ts --network localhost

ProviderError: only replay-protected (EIP-155) transactions allowed over RPC
    at HttpProvider.request (/opt/zkevm-contracts/node_modules/hardhat/src/internal/core/providers/http.ts:88:21)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at async HardhatEthersProvider.broadcastTransaction (/opt/zkevm-contracts/node_modules/@nomicfoundation/hardhat-ethers/src/internal/hardhat-ethers-provider.ts:266:33)
    at async deployPolygonZkEVMDeployer (/opt/zkevm-contracts/deployment/helpers/deployment-helpers.ts:71:12)
    at async main (/opt/zkevm-contracts/deployment/v2/2_deployPolygonZKEVMDeployer.ts:73:54)
[2024-05-23 08:55:02] Step 4: Deploying contracts

> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/v2/3_deployContracts.ts --network localhost

Error: Missing parameter: zkEVMDeployerAddress
    at main (/opt/zkevm-contracts/deployment/v2/3_deployContracts.ts:86:19)
    at Object.<anonymous> (/opt/zkevm-contracts/deployment/v2/3_deployContracts.ts:552:1)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module.m._compile (/opt/zkevm-contracts/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Object.require.extensions.<computed> [as .ts] (/opt/zkevm-contracts/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1024:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49
[2024-05-23 08:55:03] Step 5: Creating rollup

> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/v2/4_createRollup.ts --network localhost

Error: Cannot find module './deploy_output.json'
Require stack:
- /opt/zkevm-contracts/deployment/v2/4_createRollup.ts
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/opt/zkevm-contracts/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/opt/zkevm-contracts/deployment/v2/4_createRollup.ts:17:22)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module.m._compile (/opt/zkevm-contracts/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Object.require.extensions.<computed> [as .ts] (/opt/zkevm-contracts/node_modules/ts-node/src/index.ts:1621:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/opt/zkevm-contracts/deployment/v2/4_createRollup.ts' ]
}
[2024-05-23 08:55:05] Combining contract deploy files
cp: cannot stat '/opt/zkevm-contracts/deployment/v2/create_rollup_output.json': No such file or directory
/opt
/opt/zkevm /opt
[2024-05-23 08:55:05] Creating combined.json
jq: Bad JSON in --slurpfile rollup create_rollup_output.json: Could not open create_rollup_output.json: No such file or directory
[2024-05-23 08:55:05] Approving the rollup address to transfer POL tokens on behalf of the sequencer
Error: 
Failed to resolve ENS name: ens name not found: 
[2024-05-23 08:55:05] Setting the data availability committee
Error: 
Failed to resolve ENS name: ens name not found: 
[2024-05-23 08:55:06] Setting the data availability protocol
Error: 
Failed to resolve ENS name: ens name not found: 
[2024-05-23 08:55:06] Granting the aggregator role to the agglayer so that it can also verify batches
Error: 
Failed to resolve ENS name: ens name not found: 

--------------------

Creating keystores for zkevm-node/cdk-validium components
Command returned with exit code '0' with no output

Printing a message
Skipping the deployment of helper service to retrieve rollup data

Printing a message
Deploying zkevm node and cdk peripheral databases

Uploading file './templates/databases/event-db-init.sql' to files artifact 'event-db-init.sql-001'
Files with artifact name 'event-db-init.sql-001' uploaded with artifact UUID 'f09fb10b911a41fa8eedb33e8f3ca599'

Uploading file './templates/databases/prover-db-init.sql' to files artifact 'prover-db-init.sql-001'
Files with artifact name 'prover-db-init.sql-001' uploaded with artifact UUID 'c40af2ab19c44b94a1ca8c3425156e28'

Starting node and peripheral databases
Successfully added the following '7' services:
  Service 'event-db-001' added with UUID 'e4b19bd5a4574bce8aac08fd330bfed4'
  Service 'prover-db-001' added with UUID '2cc48300c4e54f5b99e129209f683ffc'
  Service 'bridge-db-001' added with UUID '8beeb44627b84789be558cf469847e01'
  Service 'agglayer-db-001' added with UUID '6b483459c7ed407e8728428c52f96852'
  Service 'dac-db-001' added with UUID 'c4cdfb7de57c4b33bc6a41303d3ba07f'
  Service 'pool-db-001' added with UUID 'd44c286faab14ad5a935d0fe17753257'
  Service 'state-db-001' added with UUID 'b6727e4319f1419487627ee0fb0da7ba'

Printing a message
Getting genesis file...

Storing files from service 'contracts-001' at path '/opt/zkevm/genesis.json' to files artifact with name 'genesis'
Files with artifact name 'genesis' uploaded with artifact UUID '02692584c94849d29683b0d26502a226'

Printing a message
Deploying cdk central/trusted environment

Rendering a template to a files artifact with name 'prover-config-artifact'
Templates artifact name 'prover-config-artifact' rendered with artifact UUID '04c08011deb94afdb41c566ebabe3ae8'

Determining CPU system architecture
Command returned with exit code '0' and the following output: x86_64

Adding service with name 'zkevm-prover-001' and image 'hermeznetwork/zkevm-prover:v6.0.0'
Service 'zkevm-prover-001' added with service UUID 'dda739f69b50416d994b4220f10c9ecb'

Rendering a template to a files artifact with name 'trusted-node-config'
Templates artifact name 'trusted-node-config' rendered with artifact UUID '61d0283b16454e7db45ebcc9bb2d0142'

Adding service with name 'zkevm-node-synchronizer-001' and image '0xpolygon/cdk-validium-node:0.6.5-cdk'
There was an error executing Starlark code 
An error occurred executing instruction (number 24) at github.com/0xPolygon/kurtosis-cdk/lib/zkevm_node.star[50:21]:
  add_service(name="zkevm-node-synchronizer-001", config=ServiceConfig(image="0xpolygon/cdk-validium-node:0.6.5-cdk", ports={"pprof": PortSpec(number=6060, application_protocol="http"), "prometheus": PortSpec(number=9091, application_protocol="http")}, files={"/etc/zkevm": Directory(artifact_names=["trusted-node-config", "genesis"])}, entrypoint=["/app/zkevm-node"], cmd=["run", "--cfg=/etc/zkevm/node-config.toml", "--network=custom", "--custom-network-file=/etc/zkevm/genesis.json", "--components=synchronizer"]))
  Caused by: Unexpected error occurred starting service 'zkevm-node-synchronizer-001'
  Caused by: An error occurred waiting for all TCP and UDP ports to be open for service 'zkevm-node-synchronizer-001' with private IP '172.16.0.15'; this is usually due to a misconfiguration in the service itself, so here are the logs:
  == SERVICE 'zkevm-node-synchronizer-001' LOGS ===================================
  panic: failed to load genesis configuration from file. Error: json: cannot unmarshal non-string into Go struct field L1Config.L1Config.polygonZkEVMGlobalExitRootAddress of type common.Address

  goroutine 1 [running]:
  github.com/0xPolygonHermez/zkevm-node/config.(*Config).loadNetworkConfig(0xc000476000, 0x15ecc40?)
        /home/runner/work/cdk-validium-node/cdk-validium-node/config/network.go:74 +0x1d3
  github.com/0xPolygonHermez/zkevm-node/config.Load(0x0?, 0x1)
        /home/runner/work/cdk-validium-node/cdk-validium-node/config/config.go:186 +0x432
  main.start(0xc000150dc0)
        /home/runner/work/cdk-validium-node/cdk-validium-node/cmd/run.go:52 +0x37
  github.com/urfave/cli/v2.(*Command).Run(0xc0001b0dc0, 0xc000150dc0, {0xc000444190, 0x5, 0x5})
        /home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/command.go:277 +0x9d8
  github.com/urfave/cli/v2.(*Command).Run(0xc00055c000, 0xc000150980, {0xc00003e1e0, 0x6, 0x6})
        /home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/command.go:270 +0xc25
  github.com/urfave/cli/v2.(*App).RunContext(0xc0003203c0, {0x1d5c320?, 0x2b2b440}, {0xc00003e1e0, 0x6, 0x6})
        /home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/app.go:335 +0x5db
  github.com/urfave/cli/v2.(*App).Run(...)
        /home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.26.0/app.go:309
  main.main()
        /home/runner/work/cdk-validium-node/cdk-validium-node/cmd/main.go:198 +0xd3b

  == FINISHED SERVICE 'zkevm-node-synchronizer-001' LOGS ===================================
  Caused by: An error occurred while waiting for all TCP and UDP ports to be open
  Caused by: Unsuccessful ports check for IP '172.16.0.15' and port spec '{privatePortSpec:0xc001b7a630}', even after '240' retries with '500' milliseconds in between retries. Timeout '2m0s' has been reached
  Caused by: An error occurred while calling network address '172.16.0.15:6060' with port protocol 'TCP' and using time out '200ms'
  Caused by: dial tcp 172.16.0.15:6060: i/o timeout

Error encountered running Starlark code.

⭐ us on GitHub - https://github.com/kurtosis-tech/kurtosis
INFO[2024-05-23T10:57:27+02:00] =============================================== 
INFO[2024-05-23T10:57:27+02:00] ||          Created enclave: cdk-v1          || 
INFO[2024-05-23T10:57:27+02:00] =============================================== 
Name:            cdk-v1
UUID:            cf8745f3f615
Status:          RUNNING
Creation Time:   Thu, 23 May 2024 10:52:54 CEST
Flags:           

========================================= Files Artifacts =========================================
UUID           Name
e974146156d2   contract-deployment-script-artifact
7913c04a5402   create-keystores-script-artifact
14bd8fd9dac7   create-rollup-parameters-artifact
1c711984fdec   deploy-parameters-artifact
f09fb10b911a   event-db-init.sql-001
02692584c948   genesis
04c08011deb9   prover-config-artifact
c40af2ab19c4   prover-db-init.sql-001
61d0283b1645   trusted-node-config

========================================== User Services ==========================================
UUID           Name               Ports                                                  Status
6b483459c7ed   agglayer-db-001    postgres: 5432/tcp -> postgresql://127.0.0.1:32772     RUNNING
8beeb44627b8   bridge-db-001      postgres: 5432/tcp -> postgresql://127.0.0.1:32774     RUNNING
246d836ace62   contracts-001      <none>                                                 RUNNING
c4cdfb7de57c   dac-db-001         postgres: 5432/tcp -> postgresql://127.0.0.1:32770     RUNNING
e4b19bd5a457   event-db-001       postgres: 5432/tcp -> postgresql://127.0.0.1:32773     RUNNING
d44c286faab1   pool-db-001        postgres: 5432/tcp -> postgresql://127.0.0.1:32771     RUNNING
2cc48300c4e5   prover-db-001      postgres: 5432/tcp -> postgresql://127.0.0.1:32775     RUNNING
b6727e4319f1   state-db-001       postgres: 5432/tcp -> postgresql://127.0.0.1:32769     RUNNING
dda739f69b50   zkevm-prover-001   executor-server: 50071/tcp -> grpc://127.0.0.1:32776   RUNNING
                                  hash-db-server: 50061/tcp -> grpc://127.0.0.1:32777    
420516460 commented 1 month ago

ProviderError: only replay-protected (EIP-155) transactions allowed over RPC

I think it should be the RPC port you are using that is rejecting eip-155 txs, so you r block at this step

jhkimqd commented 1 month ago

I also think its the RPC provider as @420516460 mentioned - I'm retrying again with the RPC urls @M-Francia provided, and it seems like I'm being hit with rate limits, and I assume there must be other restrictions in public RPCs depending on the provider - something like replay protection:

Deploying zkevm contracts on L1
There was an error executing Starlark code 
An error occurred executing instruction (number 10) at github.com/0xPolygon/kurtosis-cdk/deploy_zkevm_contracts.star[94:14]:
  exec(service_name="contracts-001", recipe=ExecRecipe(command=["/bin/sh", "-c", "chmod +x /opt/contract-deploy/run-contract-setup.sh && /opt/contract-deploy/run-contract-setup.sh"]), description="Deploying zkevm contracts on L1")
  Caused by: Exec returned exit code '1' that is not part of the acceptable status codes '[0]', with output:
    "[2024-05-24 03:50:23] Waiting for the L1 RPC to be available\nError: \n\x1b[31mDeserialization Error: expected value at line 1 column 1. Response: Rate limit (600rqs/60s) reached. To remove restrictions, order a dedicated full node here: https://www.allnodes.com/eth/host. Retry after 4m24s\x1b[0m\n[2024-05-24 03:50:25] L1 RPC might not be ready... Retrying (1)...\nError: \n\x1b[31mDeserialization Error: expected value at line 1 column 1. Response: Ra

I recommend trying it with a more private endpoint using RPC providers like Alchemy/Infura which provide RPC endpoints for free when you sign in. For reference, I've used Alchemy with success:

  l1_rpc_url: https://eth-sepolia.g.alchemy.com/v2/<api_key>
  l1_ws_url: wss://eth-sepolia.g.alchemy.com/v2/<api_key>
420516460 commented 1 month ago

I also think its the RPC provider as @420516460 mentioned - I'm retrying again with the RPC urls @M-Francia provided, and it seems like I'm being hit with rate limits, and I assume there must be other restrictions in public RPCs depending on the provider - something like replay protection:

Deploying zkevm contracts on L1
There was an error executing Starlark code 
An error occurred executing instruction (number 10) at github.com/0xPolygon/kurtosis-cdk/deploy_zkevm_contracts.star[94:14]:
  exec(service_name="contracts-001", recipe=ExecRecipe(command=["/bin/sh", "-c", "chmod +x /opt/contract-deploy/run-contract-setup.sh && /opt/contract-deploy/run-contract-setup.sh"]), description="Deploying zkevm contracts on L1")
  Caused by: Exec returned exit code '1' that is not part of the acceptable status codes '[0]', with output:
    "[2024-05-24 03:50:23] Waiting for the L1 RPC to be available\nError: \n\x1b[31mDeserialization Error: expected value at line 1 column 1. Response: Rate limit (600rqs/60s) reached. To remove restrictions, order a dedicated full node here: https://www.allnodes.com/eth/host. Retry after 4m24s\x1b[0m\n[2024-05-24 03:50:25] L1 RPC might not be ready... Retrying (1)...\nError: \n\x1b[31mDeserialization Error: expected value at line 1 column 1. Response: Ra

I recommend trying it with a more private endpoint using RPC providers like Alchemy/Infura which provide RPC endpoints for free when you sign in. For reference, I've used Alchemy with success:

  l1_rpc_url: https://eth-sepolia.g.alchemy.com/v2/<api_key>
  l1_ws_url: wss://eth-sepolia.g.alchemy.com/v2/<api_key>

yes, i have done tests before, for example the public rpc in the chainlist will rejects eip-155 transactions

M-Francia commented 1 month ago

Hello @420516460 @jhkimqd

Thanks for your heIp, I changed the RPC to use Alchemy, and it works now, it seems public nodes have configured the EIP-155 protection. However, I'm curious why it works for you, @jhkimqd , because the error occurs due to EIP-155 protection. If the chainId is not specified in the transaction, it shouldn't work in any case.

I believe the solution is not to use a node without EIP-155 protection, but rather to add the chainId to the transaction. Otherwise, the transaction signature could be replicated on other DLTs, which poses a security risk.

What you think?

Regards! =)

jhkimqd commented 1 month ago

@M-Francia great to hear it's resolved! And also glad you asked.. because I also did some digging into why it seemed to work.

I did not change the mnemonic nor the addresses for different components being used, and the zkEVM contract deployment stage seems to check for existing deployments before attempting to redeploy contracts. This seems different from changing the salt value only. The deployment output shows it - the deployment step which was causing the issue was being stepped over.

[2024-05-24 03:30:42] Step 3: Deploying PolygonZKEVMDeployer

> @0xpolygonhermez/zkevm-contracts@3.0.0 npx
> hardhat run deployment/v2/2_deployPolygonZKEVMDeployer.ts --network localhost

#######################

polygonZkEVMDeployer already deployed on:  0xe5CF69183CFCF0571E733D59a1a53d4E6ceD6E85