Skip to content

Commit

Permalink
fix: disable pbss when gcmode archive set (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Apr 15, 2024
1 parent 555ad7d commit e085462
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ snooper_enabled: true
| Teku BN | ✅ | ✅ | ✅ | ✅ | ✅
| Lodestar BN | ✅ | ❌ | ❌ | ✅ | ❌
| Nimbus BN | ✅ | ❌ | ✅ | ❌ | ✅
| Grandine BN | ✅ | ✅ | ✅ | | ✅
| Grandine BN | ✅ | ✅ | ✅ | | ✅

## Custom labels for Docker and Kubernetes

Expand Down
14 changes: 13 additions & 1 deletion src/el/geth/geth_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ def get_config(
)
elif constants.NETWORK_NAME.shadowfork in network:
init_datadir_cmd_str = "echo shadowfork"

elif (
"--gcmode archive" in extra_params
): # Disable path based storage scheme archive mode
init_datadir_cmd_str = "geth init --datadir={0} {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
constants.GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER + "/genesis.json",
)
else:
init_datadir_cmd_str = "geth init --state.scheme=path --datadir={0} {1}".format(
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
Expand All @@ -226,7 +234,11 @@ def get_config(
"geth",
# Disable path based storage scheme for electra fork and verkle
# TODO: REMOVE Once geth default db is path based, and builder rebased
"{0}".format("--state.scheme=path" if "verkle" not in network else ""),
"{0}".format(
"--state.scheme=path"
if "verkle" not in network and "--gcmode archive" not in extra_params
else ""
),
# Override prague fork timestamp for electra fork
"{0}".format("--cache.preimages" if "verkle" in network else ""),
# Override prague fork timestamp
Expand Down
5 changes: 3 additions & 2 deletions src/package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,14 @@ def parse_network_params(input_args):

total_participant_count += participant["count"]


if total_participant_count == 1:
for index, participant in enumerate(result["participants"]):
# If there is only one participant, we run lodestar as a single node mode
if participant["cl_type"] == constants.CL_TYPE.lodestar:
participant["cl_extra_params"].append("--sync.isSingleNode")
participant["cl_extra_params"].append("--network.allowPublishToZeroPeers")
participant["cl_extra_params"].append(
"--network.allowPublishToZeroPeers"
)

if result["network_params"]["network_id"].strip() == "":
fail("network_id is empty or spaces it needs to be of non zero length")
Expand Down

0 comments on commit e085462

Please sign in to comment.