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

don't validate genesis for statesync mode #48

Merged
merged 1 commit into from
Feb 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pystarport/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,6 @@ def create_account(cli, account, use_ledger=False):
config.get("genesis", {}),
)
(data_dir / "genesis.json").write_text(json.dumps(genesis))
cli.validate_genesis()

# create accounts
accounts = []
Expand Down Expand Up @@ -864,6 +863,12 @@ def create_account(cli, account, use_ledger=False):
jsonmerge.merge(config.get("app-config", {}), val.get("app-config", {})),
)

# if the first validator is using statesync mode, then don't validate genesis,
# because the new binary may be a breaking one.
doc = tomlkit.parse((data_dir / "node0/config/config.toml").read_text())
if not doc["statesync"]["enable"]:
cli.validate_genesis()

# write supervisord config file
with (data_dir / SUPERVISOR_CONFIG_FILE).open("w") as fp:
write_ini(
Expand Down