Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make snapshot url configurable #507

Merged
merged 15 commits into from
Mar 5, 2024
Merged
2 changes: 1 addition & 1 deletion .github/tests/holesky-shadowfork-verkle.yaml_norun
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ participants:
network_params:
electra_fork_epoch: 1
network: holesky-shadowfork-verkle
genesis_delay: 300
#network_sync_base_url: localhost:10000/snapshots/
barnabasbusa marked this conversation as resolved.
Show resolved Hide resolved
additional_services:
- dora
snooper_enabled: true
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,13 @@ network_params:
# Defaults to 256 epoch ~27 hours
shard_committee_period: 256

# Network sync base url for syncing public networks from a custom snapshot (mostly useful for shadowforks)
# Defaults to "https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/
# If you have a local snapshot, you can set this to the local url:
# network_snapshot_url_base = "http://10.10.101.21:10000/snapshots/"
# The snapshots are taken with https://github.com/ethpandaops/snapshotter
network_sync_base_url: https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/

# Configuration place for transaction spammer - https:#github.com/MariusVanDerWijden/tx-fuzz
tx_spammer_params:
# A list of optional extra params that will be passed to the TX Spammer container for modifying its behaviour
Expand Down
1 change: 1 addition & 0 deletions network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ network_params:
network: kurtosis
min_validator_withdrawability_delay: 256
shard_committee_period: 256
network_sync_base_url: https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/

additional_services:
- tx_spammer
Expand Down
2 changes: 2 additions & 0 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def input_parser(plan, input_args):
"min_validator_withdrawability_delay"
],
shard_committee_period=result["network_params"]["shard_committee_period"],
network_sync_base_url=result["network_params"]["network_sync_base_url"],
),
mev_params=struct(
mev_relay_image=result["mev_params"]["mev_relay_image"],
Expand Down Expand Up @@ -614,6 +615,7 @@ def default_network_params():
"network": "kurtosis",
"min_validator_withdrawability_delay": 256,
"shard_committee_period": 256,
"network_sync_base_url": "https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/",
}


Expand Down
6 changes: 4 additions & 2 deletions src/participant_network.star
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def launch_participant_network(
] # overload the network id to match the network name
latest_block = plan.run_sh( # fetch the latest block
run="mkdir -p /shadowfork && \
curl -o /shadowfork/latest_block.json https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/"
curl -o /shadowfork/latest_block.json "
+ network_params.network_sync_base_url
+ base_network
+ "/geth/"
+ shadowfork_block
Expand Down Expand Up @@ -146,7 +147,8 @@ def launch_participant_network(
config=ServiceConfig(
image="alpine:3.19.1",
cmd=[
"apk add --no-cache curl tar zstd && curl -s -L https://ethpandaops-ethereum-node-snapshots.ams3.digitaloceanspaces.com/"
"apk add --no-cache curl tar zstd && curl -s -L "
+ network_params.network_sync_base_url
+ base_network
+ "/"
+ el_client_type
Expand Down
Loading