Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
0ed1c9c8
Unverified
Commit
0ed1c9c8
authored
Jul 31, 2024
by
Barnabas Busa
Committed by
GitHub
Jul 31, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: blobscan redis dependency (#712)
parent
a4ba9a65
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
28 deletions
+61
-28
mix-with-tools-minimal.yaml
.github/tests/mix-with-tools-minimal.yaml
+1
-1
mix-with-tools.yaml
.github/tests/mix-with-tools.yaml
+1
-1
main.star
main.star
+1
-0
blobscan_launcher.star
src/blobscan/blobscan_launcher.star
+58
-26
No files found.
.github/tests/mix-with-tools-minimal.yaml
View file @
0ed1c9c8
...
...
@@ -22,7 +22,7 @@ additional_services:
-
prometheus_grafana
-
goomy_blob
-
custom_flood
#
- blobscan
-
blobscan
-
blockscout
-
dugtrio
-
blutgang
...
...
.github/tests/mix-with-tools.yaml
View file @
0ed1c9c8
...
...
@@ -22,7 +22,7 @@ additional_services:
-
prometheus_grafana
-
goomy_blob
-
custom_flood
#
- blobscan
-
blobscan
-
blockscout
-
dugtrio
-
blutgang
...
...
main.star
View file @
0ed1c9c8
...
...
@@ -527,6 +527,7 @@ def run(plan, args={}):
all_cl_contexts,
all_el_contexts,
network_id,
network_params,
persistent,
global_node_selectors,
args_with_right_defaults.port_publisher,
...
...
src/blobscan/blobscan_launcher.star
View file @
0ed1c9c8
shared_utils = import_module("../shared_utils/shared_utils.star")
postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star")
redis = import_module("github.com/kurtosis-tech/redis-package/main.star")
constants = import_module("../package_io/constants.star")
WEB_SERVICE_NAME = "blobscan-web"
API_SERVICE_NAME = "blobscan-api"
INDEXER_SERVICE_NAME = "blobscan-indexer"
SECRET_KEY = "supersecure"
WEB_HTTP_PORT_NUMBER = 3000
API_HTTP_PORT_NUMBER = 3001
...
...
@@ -51,12 +52,19 @@ POSTGRES_MAX_CPU = 1000
POSTGRES_MIN_MEMORY = 32
POSTGRES_MAX_MEMORY = 1024
# The min/max CPU/memory that redis can use
REDIS_MIN_CPU = 10
REDIS_MAX_CPU = 1000
REDIS_MIN_MEMORY = 32
REDIS_MAX_MEMORY = 1024
def launch_blobscan(
plan,
cl_contexts,
el_contexts,
chain_id,
network_id,
network_params,
persistent,
global_node_selectors,
port_publisher,
...
...
@@ -64,9 +72,7 @@ def launch_blobscan(
):
node_selectors = global_node_selectors
beacon_node_rpc_uri = "{0}".format(cl_contexts[0].beacon_http_url)
execution_node_rpc_uri = "http://{0}:{1}".format(
el_contexts[0].ip_addr, el_contexts[0].rpc_port_num
)
execution_node_rpc_uri = "{0}".format(el_contexts[0].rpc_http_url)
postgres_output = postgres.run(
plan,
...
...
@@ -78,10 +84,23 @@ def launch_blobscan(
persistent=persistent,
node_selectors=node_selectors,
)
redis_output = redis.run(
plan,
service_name="blobscan-redis",
min_cpu=REDIS_MIN_CPU,
max_cpu=REDIS_MAX_CPU,
min_memory=REDIS_MIN_MEMORY,
max_memory=REDIS_MAX_MEMORY,
persistent=persistent,
node_selectors=node_selectors,
)
api_config = get_api_config(
network_id,
postgres_output.url,
beacon_node_rpc_uri
,
chain_id
,
network_params.network
,
redis_output.url
,
node_selectors,
port_publisher,
additional_service_index,
...
...
@@ -94,8 +113,9 @@ def launch_blobscan(
web_config = get_web_config(
postgres_output.url,
network_params.network,
beacon_node_rpc_uri,
chain_id
,
execution_node_rpc_uri
,
node_selectors,
port_publisher,
additional_service_index,
...
...
@@ -104,17 +124,19 @@ def launch_blobscan(
indexer_config = get_indexer_config(
beacon_node_rpc_uri,
execution_node_rpc_uri,
blobscan_api_url,
execution_node_rpc_uri,
network_params.network,
node_selectors,
)
plan.add_service(INDEXER_SERVICE_NAME, indexer_config)
def get_api_config(
database_url,
beacon_node_rpc,
chain_id,
network_id,
postgres_url,
network_name,
redis_url,
node_selectors,
port_publisher,
additional_service_index,
...
...
@@ -133,11 +155,15 @@ def get_api_config(
ports=API_PORTS,
public_ports=public_ports,
env_vars={
"
BEACON_NODE_ENDPOINT": beacon_node_rpc
,
"
CHAIN_ID": chain_id
,
"
DATABASE_URL": database
_url,
"SECRET_KEY":
"supersecret"
,
"
CHAIN_ID": network_id
,
"
DATABASE_URL": postgres_url
,
"
REDIS_URI": redis
_url,
"SECRET_KEY":
SECRET_KEY
,
"BLOBSCAN_API_PORT": str(API_HTTP_PORT_NUMBER),
"POSTGRES_STORAGE_ENABLED": "true",
"NETWORK_NAME": network_name
if network_name in constants.PUBLIC_NETWORKS
else "devnet",
},
cmd=["api"],
ready_conditions=ReadyCondition(
...
...
@@ -160,9 +186,10 @@ def get_api_config(
def get_web_config(
database_url,
postgres_url,
network_name,
beacon_node_rpc,
chain_id
,
execution_node_rpc
,
node_selectors,
port_publisher,
additional_service_index,
...
...
@@ -184,11 +211,12 @@ def get_web_config(
ports=WEB_PORTS,
public_ports=public_ports,
env_vars={
"DATABASE_URL": database_url,
"SECRET_KEY": "supersecret",
"NEXT_PUBLIC_NETWORK_NAME": "devnet",
"BEACON_NODE_ENDPOINT": beacon_node_rpc,
"CHAIN_ID": chain_id,
"DATABASE_URL": postgres_url,
"NEXT_PUBLIC_NETWORK_NAME": network_name
if network_name in constants.PUBLIC_NETWORKS
else "devnet",
"SECRET_KEY": SECRET_KEY,
"POSTGRES_STORAGE_ENABLED": "true",
},
cmd=["web"],
min_cpu=WEB_MIN_CPU,
...
...
@@ -201,8 +229,9 @@ def get_web_config(
def get_indexer_config(
beacon_node_rpc,
execution_node_rpc,
blobscan_api_url,
execution_node_rpc,
network_name,
node_selectors,
):
IMAGE_NAME = "blossomlabs/blobscan-indexer:master"
...
...
@@ -210,10 +239,13 @@ def get_indexer_config(
return ServiceConfig(
image=IMAGE_NAME,
env_vars={
"
SECRET_KEY": "supersecret"
,
"
BEACON_NODE_ENDPOINT": beacon_node_rpc
,
"BLOBSCAN_API_ENDPOINT": blobscan_api_url,
"EXECUTION_NODE_ENDPOINT": execution_node_rpc,
"BEACON_NODE_ENDPOINT": beacon_node_rpc,
"NETWORK_NAME": network_name
if network_name in constants.PUBLIC_NETWORKS
else "devnet",
"SECRET_KEY": SECRET_KEY,
},
entrypoint=ENTRYPOINT_ARGS,
cmd=[" && ".join(["sleep 90", "/app/blob-indexer"])],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment