Skip to content

Commit

Permalink
Merge pull request #427 from 0xPolygon/jesteban/add_port_cdk_node
Browse files Browse the repository at this point in the history
feat: add RPC port to cdk-node
  • Loading branch information
praetoriansentry authored Dec 18, 2024
2 parents a4d18b2 + 1240275 commit a7a8df5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ DEFAULT_PORTS = {
"zkevm_pprof_port": 6060,
"zkevm_rpc_http_port": 8123,
"zkevm_rpc_ws_port": 8133,
"zkevm_cdk_node_port": 5576,
}

DEFAULT_STATIC_PORTS = {
Expand Down
13 changes: 12 additions & 1 deletion lib/cdk_node.star
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,14 @@ def create_cdk_node_service_config(
def get_cdk_node_ports(args):
# We won't have an aggregator if we're in PP mode
if args["consensus_contract_type"] == "pessimistic":
return (dict(), dict())
ports = {
"rpc": PortSpec(
args["zkevm_cdk_node_port"],
application_protocol="http",
),
}
public_ports = ports_package.get_public_ports(ports, "cdk_node_start_port", args)
return (ports, public_ports)

# In the case where we have pre deployed contract, the cdk node
# can go through a syncing process that takes a long time and
Expand All @@ -58,6 +65,10 @@ def get_cdk_node_ports(args):
application_protocol="grpc",
wait=aggregator_wait,
),
"rpc": PortSpec(
args["zkevm_cdk_node_port"],
application_protocol="http",
),
}

public_ports = ports_package.get_public_ports(ports, "cdk_node_start_port", args)
Expand Down
2 changes: 2 additions & 0 deletions templates/trusted-node/cdk-node-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Outputs = ["stderr"]
Port = "{{.aggregator_db.port}}"
EnableLog = false
MaxConns = 200
[RPC]
Port = {{.zkevm_cdk_node_port}}

[AggSender]
CertificateSendInterval = "1m"
Expand Down

0 comments on commit a7a8df5

Please sign in to comment.