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
41 stars 72 forks source link

bridge deployment don't support custom L1 RPC #163

Open cachalots opened 3 months ago

cachalots commented 3 months ago

Background & motivation

https://github.com/0xPolygon/kurtosis-cdk/blob/769c4674681e7386c9819a6506b6e22a3a4bc589/cdk_bridge_infra.star#L133 When I deploy bridge using custom L1, script didn't use the custom L1 RPC

Desired behaviour

Hope to support custom L1 RPC

How important is this to you?

Nice to have; This feature would make using Kurtosis CDK more enjoyable.

jhkimqd commented 3 months ago

If the goal is to test bridging between Lx and Ly (not the deployment of the bridge-ui), you could try using:

Its a cli tool which abstracts away the bridging contract calls without having to spin up a bridge-ui.

jarrodwatts commented 3 months ago

@cachalots if you are deploying to Sepolia as the L1, you need to make the following changes:

Inside cdk_bridge_infra.star, comment out the following lines:

    # l1rpc_service = plan.get_service("el-1-geth-lighthouse")

                    # "l1rpc_ip": l1rpc_service.ip_address,
                    # "l1rpc_port": l1rpc_service.ports["rpc"].number,

Inside haxproxy.cfg, comment out the following lines:

    # acl url_l1rpc path_beg /l1rpc

    # use_backend backend_l1rpc if url_l1rpc

# backend backend_l1rpc
#     http-request set-path /
#     server server1 {{.l1rpc_ip}}:{{.l1rpc_port}}

You can see at this timestamp of my video tutorial I run into and address the same issue you are facing.

cachalots commented 3 months ago

@cachalots if you are deploying to Sepolia as the L1, you need to make the following changes:

Inside cdk_bridge_infra.star, comment out the following lines:

    # l1rpc_service = plan.get_service("el-1-geth-lighthouse")

                    # "l1rpc_ip": l1rpc_service.ip_address,
                    # "l1rpc_port": l1rpc_service.ports["rpc"].number,

Inside haxproxy.cfg, comment out the following lines:

    # acl url_l1rpc path_beg /l1rpc

    # use_backend backend_l1rpc if url_l1rpc

# backend backend_l1rpc
#     http-request set-path /
#     server server1 {{.l1rpc_ip}}:{{.l1rpc_port}}

You can see at this timestamp of my video tutorial I run into and address the same issue you are facing.

got it, but I‘m not sure if comment out these will result in some features being unavailable?

leovct commented 3 months ago

Hi @cachalots, have you managed to get it working?

cachalots commented 2 months ago

Hi @cachalots, have you managed to get it working?

I successfully deployed it in Sepolia, but the zkEVM bridge deposit has been unable to be credited. The status has always been processing

jhkimqd commented 2 months ago

@cachalots could you clarify which method you are using to make the bridge deposits? There is the hermez bridge-ui, the simple bridge-ui, and the polycli commands above.

The hermez bridge-ui may have an issue when using it on Sepolia, making the transactions stuck on processing forever. You could directly invoke the bridge smart contracts using the simple bridge-ui or the polycli commands which have been tested to work on Sepolia.

cachalots commented 2 months ago

@jhkimqd I used the bridge-ui deployed by kurtosis-cdk, the docker image is leovct/zkevm-bridge-ui:multi-network, after seeing your reply, I tried using simple bridge-ui for depoist, but the result was the same. L2 didn't receive ETH. call {haproxy}/bridgeservice/bridges/{address} response: {"deposits":[], "total_cnt":"0"}

image