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: Devgenesis: Validator replacing script #358

Merged
merged 26 commits into from
Jun 12, 2024

Conversation

MissingNO57
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented May 29, 2024

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

@MissingNO57 MissingNO57 changed the title [WiP] feat: Validator replacing devgenesis script feat: Validator replacing devgenesis script May 30, 2024
@MissingNO57 MissingNO57 requested a review from pbukva May 30, 2024 08:47
@MissingNO57 MissingNO57 changed the title feat: Validator replacing devgenesis script Validator replacing devgenesis script May 30, 2024
@MissingNO57 MissingNO57 marked this pull request as ready for review May 30, 2024 08:47
scripts/Pipfile Outdated Show resolved Hide resolved
@pbukva pbukva force-pushed the feat/genesis_script_replace_validators branch from 25cb7ce to a041898 Compare May 30, 2024 16:43
Copy link
Collaborator

@pbukva pbukva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pbukva pbukva changed the title Validator replacing devgenesis script feat: Devgenesis: Validator replacing script Jun 11, 2024
Copy link
Collaborator

@pbukva pbukva left a 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.

Comment on lines 113 to 135
# 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)
Copy link
Collaborator

@pbukva pbukva Jun 12, 2024

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.

@MissingNO57 MissingNO57 requested a review from pbukva June 12, 2024 14:00
pbukva
pbukva previously approved these changes Jun 12, 2024
Copy link
Collaborator

@pbukva pbukva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@pbukva pbukva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MissingNO57 MissingNO57 merged commit dab8b4a into master Jun 12, 2024
4 checks passed
@MissingNO57 MissingNO57 deleted the feat/genesis_script_replace_validators branch June 12, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants