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

Update genesis generation script #115

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattdean-digicatapult
Copy link
Contributor

@mattdean-digicatapult mattdean-digicatapult commented Jan 21, 2025

Pull Request

Checklist

  • Have you read Digital Catapult's Code of Conduct?
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

PR Type

Please delete options that are irrelevant.

  • Bug Fix
  • Chore
  • Feature
  • Documentation Update
  • Code style update (formatting, local variables)
  • Breaking Change (fix or feature that would cause existing functionality to change)

Linked tickets

https://digicatapult.atlassian.net/browse/SQNC-95

High level description

Updates the genesis script following the introduction of the the session and validatorSet pallets

Detailed description

Following digicatapult/sqnc-node#233 new chains should use an updated genesis format whereby validators are set in the session and validatorSet pallets. Note a few other changes here:

  • updated logic so a new account is created as owner of each node. This is required by the session pallet
  • updated documentation to actually match the script
  • removed balance as an input as transactions aren't charged for. A nominal balance is still added to ensure account existance
  • removed unused functions assert_balance and create_node_identity
  • merged functions assert_node_valid and assert_account_valid as we need to make sure names don't overlap between the two and the functionality became equivalent

Describe alternatives you've considered

None

Operational impact

None

Additional context

None

@mattdean-digicatapult mattdean-digicatapult marked this pull request as ready for review January 21, 2025 16:45
@mattdean-digicatapult mattdean-digicatapult requested a review from a team as a code owner January 21, 2025 16:45
@mattdean-digicatapult mattdean-digicatapult marked this pull request as draft January 22, 2025 09:21
@mattdean-digicatapult
Copy link
Contributor Author

This is draft as we want to generate an old style genesis for staging to test the upgrade

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.

1 participant