forked from 0xPolygon/kurtosis-cdk
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: integrate arpeggio (0xPolygon#249)
* wip * add arpeggio to additional services * doc additions for arpeggio * fix port spec name * ws port spec for cdk-erigon-node * ws port config for cdk-erigon-node * lint * add arpeggio health check to deploy workflow
- Loading branch information
1 parent
0053336
commit dae0801
Showing
8 changed files
with
99 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
service_package = import_module("../../lib/service.star") | ||
|
||
ARPEGGIO_IMAGE = "christophercampbell/arpeggio:v0.0.1" | ||
RPC_PROXY_PORT = 8545 | ||
WS_PROXY_PORT = 8546 | ||
# METRICS_PORT = 9105 | ||
|
||
|
||
def run(plan, args): | ||
arpeggio_config_artifact = get_arpeggio_config(plan, args) | ||
plan.add_service( | ||
name="arpeggio" + args["deployment_suffix"], | ||
config=ServiceConfig( | ||
image=ARPEGGIO_IMAGE, | ||
ports={ | ||
"rpc": PortSpec(RPC_PROXY_PORT, application_protocol="http"), | ||
"ws": PortSpec(WS_PROXY_PORT, application_protocol="ws"), | ||
# "prometheus": PortSpec(METRICS_PORT, application_protocol="http"), | ||
}, | ||
files={"/etc/arpeggio": arpeggio_config_artifact}, | ||
), | ||
) | ||
|
||
|
||
def get_arpeggio_config(plan, args): | ||
arpeggio_config_template = read_file( | ||
src="../../static_files/additional_services/arpeggio-config/config.yml" | ||
) | ||
l2_rpc_urls = service_package.get_l2_rpc_urls(plan, args) | ||
return plan.render_templates( | ||
name="arpeggio-config", | ||
config={ | ||
"config.yml": struct( | ||
template=arpeggio_config_template, | ||
data={ | ||
"l2_rpc_name": args["l2_rpc_name"], | ||
"l2_rpc_url": l2_rpc_urls.http, | ||
"l2_ws_url": l2_rpc_urls.ws, | ||
}, | ||
) | ||
}, | ||
) |
24 changes: 24 additions & 0 deletions
24
static_files/additional_services/arpeggio-config/config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
logging: | ||
level: info | ||
|
||
providers: | ||
chainId: 1 | ||
nodes: | ||
- name: "{{.l2_rpc_name}}" | ||
rpc: "{{.l2_rpc_url}}" | ||
ws: "{{.l2_ws_url}}" | ||
|
||
proxy: | ||
poolSize: | ||
http: 1000 | ||
ws: 2000 | ||
|
||
rateLimit: | ||
active: false | ||
|
||
metrics: | ||
active: true | ||
http: | ||
host: localhost | ||
port: 9105 |