-
Notifications
You must be signed in to change notification settings - Fork 37
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: Devgenesis: Validator replacing script #358
Conversation
Visit the preview URL for this PR (updated for commit 99b33df): https://fetch-docs-preview--pr358-feat-genesis-script-4eeeusju.web.app (expires Mon, 17 Jun 2024 16:28:32 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f2de39fd4e81249941960b74fbab0a62d90d69f8 |
25cb7ce
to
a041898
Compare
…etchai/fetchd into feat/genesis_script_replace_validators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorru, now when I'm looking at things, it would be better to have just single cli/script - the devgenesis.py.
I will commit the change. to this PR.
scripts/replace_validator.py
Outdated
# Brute force replacement of all remaining occurrences | ||
genesis_dump = json.dumps(genesis) | ||
|
||
# Convert validator valcons address | ||
genesis_dump = re.sub( | ||
target_consensus_address, dest_consensus_address, genesis_dump | ||
) | ||
|
||
# Convert operator valoper address | ||
genesis_dump = re.sub( | ||
target_operator_address, | ||
dest_operator_valoper_address, | ||
genesis_dump, | ||
) | ||
|
||
# Convert operator base account address | ||
genesis_dump = re.sub( | ||
target_operator_base_address, | ||
dest_operator_base_address, | ||
genesis_dump, | ||
) | ||
|
||
genesis = json.loads(genesis_dump) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was redone due to potential risk of replacing something what was not supposed to be replaced + performance impact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.