-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/cdk-erigon-node-3
- Loading branch information
Showing
12 changed files
with
542 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
def run(plan, args): | ||
blutgang_name = "blutgang" + args["deployment_suffix"] | ||
blutgang_config_template = read_file( | ||
src="./templates/blutgang/blutgang-config.toml" | ||
) | ||
|
||
zkevm_sequencer_service = plan.get_service(name="zkevm-node-sequencer" + args["deployment_suffix"]) | ||
zkevm_sequencer_http_url = "http://{}:{}".format(zkevm_sequencer_service.ip_address, zkevm_sequencer_service.ports["rpc"].number) | ||
|
||
zkevm_rpc_service = plan.get_service(name="zkevm-node-rpc" + args["deployment_suffix"]) | ||
zkevm_rpc_http_url = "http://{}:{}".format(zkevm_rpc_service.ip_address, zkevm_rpc_service.ports["http-rpc"].number) | ||
zkevm_rpc_ws_url = "ws://{}:{}".format(zkevm_rpc_service.ip_address, zkevm_rpc_service.ports["ws-rpc"].number) | ||
|
||
zkevm_rpc_pless_service = plan.get_service(name="zkevm-node-rpc-pless" + args["deployment_suffix"]) | ||
zkevm_rpc_pless_http_url = "http://{}:{}".format(zkevm_rpc_pless_service.ip_address, zkevm_rpc_pless_service.ports["http-rpc"].number) | ||
zkevm_rpc_pless_ws_url = "ws://{}:{}".format(zkevm_rpc_pless_service.ip_address, zkevm_rpc_pless_service.ports["ws-rpc"].number) | ||
|
||
blutgang_config_artifact = plan.render_templates( | ||
name="blutgang-config-artifact", | ||
config={ | ||
"blutgang-config.toml": struct(template=blutgang_config_template, data={ | ||
"l2_sequencer_url": zkevm_sequencer_http_url, | ||
"l2_rpc_url": zkevm_rpc_http_url, | ||
"l2_ws_url": zkevm_rpc_ws_url, | ||
"l2_rpc_pless_url": zkevm_rpc_pless_http_url, | ||
"l2_ws_pless_url": zkevm_rpc_pless_ws_url, | ||
} | args) | ||
}, | ||
) | ||
|
||
blutgang_service_config = ServiceConfig( | ||
image=args["blutgang_image"], | ||
ports={ | ||
"http": PortSpec(args["blutgang_rpc_port"], application_protocol="http"), | ||
"admin": PortSpec(args["blutgang_admin_port"], application_protocol="http"), | ||
}, | ||
files={ | ||
"/etc/blutgang": Directory( | ||
artifact_names=[ | ||
blutgang_config_artifact, | ||
] | ||
), | ||
}, | ||
cmd=["/app/blutgang", "-c", "/etc/blutgang/blutgang-config.toml"] | ||
) | ||
|
||
plan.add_service( | ||
name=blutgang_name, | ||
config=blutgang_service_config, | ||
description="Starting blutgang service", | ||
) |
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,2 @@ | ||
Docs in this folder are ready to be edited and meant for public | ||
guides. |
357 changes: 357 additions & 0 deletions
357
doc-drafts/working-with-the-timelock/working-with-the-timelock.org
Large diffs are not rendered by default.
Oops, something went wrong.
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,86 @@ | ||
# Config for blutgang goes here | ||
[blutgang] | ||
# Clear the cache DB on startup | ||
do_clear = true | ||
# Where to bind blutgang to | ||
address = "0.0.0.0:{{.blutgang_rpc_port}}" | ||
# Moving average length for the latency | ||
ma_length = 100 | ||
# Sort RPCs by latency on startup. Recommended to leave on. | ||
sort_on_startup = true | ||
# Enable health checking | ||
health_check = true | ||
# Enable content type header checking. Set this to `true` if you want | ||
# Blutgang to be JSON-RPC compliant. | ||
header_check = true | ||
# Acceptable time to wait for a response in ms | ||
ttl = 30 | ||
# How many times to retry a request before giving up | ||
max_retries = 32 | ||
# Block time in ms, used as a sanity check when not receiving subscriptions | ||
expected_block_time = 20000 | ||
# Time between health checks in ms | ||
health_check_ttl = 400 | ||
# Supress the health check running info messages | ||
supress_rpc_check = false | ||
|
||
# Note: the admin namespace contains volatile functions and | ||
# should not be exposed publicly. | ||
[admin] | ||
# Enable the admin namespace | ||
enabled = true | ||
# Address for the admin RPC | ||
address = "0.0.0.0:{{.blutgang_admin_port}}" | ||
# Only allow read-only methods | ||
# Recommended `true` unless you 100% need write methods | ||
readonly = true | ||
# Enable the use of JWT for auth | ||
# Should be on if exposing to the internet | ||
jwt = false | ||
# jwt token | ||
key = "" | ||
|
||
# Sled config | ||
# Sled is the database we use for our cache, for more info check their docs | ||
[sled] | ||
# Path to db | ||
db_path = "./blutgang-cache" | ||
# sled mode. Can be HighThroughput/LowSpace | ||
mode = "HighThroughput" | ||
# Cache size in bytes. | ||
cache_capacity = 1000000000 | ||
# Use zstd compression. Reduces size 60-70%, | ||
# and increases CPU and latency by around 10% for db writes and 2% for reads. | ||
# If storage constrained, it's fine to have it be on. | ||
compression = false | ||
# Print DB profile when dropped. Doesn't do anything for now. | ||
print_profile = false | ||
# Frequency of flushes in ms | ||
flush_every_ms = 240 | ||
|
||
# Add separate RPCs as TOML tables | ||
# DO NOT name an rpc `blutgang`, `admin`, or `sled` | ||
|
||
[sequencer] | ||
url = "{{.l2_sequencer_url}}" | ||
# ws_url = "{{.l2_sequencer_ws_url}}" | ||
# The maximum amount of time we can use this rpc in a row. | ||
max_consecutive = 150 | ||
# Max amount of queries per second. | ||
max_per_second = 200 | ||
|
||
[rpc] | ||
url = "{{.l2_rpc_url}}" | ||
ws_url = "{{.l2_ws_url}}" | ||
# The maximum amount of time we can use this rpc in a row. | ||
max_consecutive = 150 | ||
# Max amount of queries per second. | ||
max_per_second = 200 | ||
|
||
[rpcpless] | ||
url = "{{.l2_rpc_pless_url}}" | ||
ws_url = "{{.l2_ws_pless_url}}" | ||
# The maximum amount of time we can use this rpc in a row. | ||
max_consecutive = 150 | ||
# Max amount of queries per second. | ||
max_per_second = 200 |
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