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

Add genesis config hash as extra data to migration ready transaction #2479

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

Eligioo
Copy link
Member

@Eligioo Eligioo commented May 17, 2024

What's in this pull request?

  • Fix PoW to PoS chain migration where the candidate block was also migrated into the PoS history store
  • Migration ready transactions now include a genesis config hash as extra data. This way validator ready transactions that have a different starting point are not counted towards the total validator readiness.

Pull request checklist

  • All tests pass. The project builds and runs.
  • I have resolved any merge conflicts.
  • I have resolved all clippy and rustfmt warnings.

@Eligioo Eligioo requested a review from jsdanielh May 17, 2024 10:54
pow-migration/src/lib.rs Outdated Show resolved Hide resolved
@Eligioo Eligioo force-pushed the stefan/migration-ready-tx branch from 9910539 to eaab34c Compare May 17, 2024 12:05
pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
pow-migration/src/monitor/mod.rs Show resolved Hide resolved
pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
pow-migration/src/lib.rs Outdated Show resolved Hide resolved
pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
@styppo styppo added this to the Nimiq PoS Mainnet milestone May 20, 2024
@sisou sisou changed the title Add genesis hash as extra data to migration ready transaction Add genesis config hash as extra data to migration ready transaction May 22, 2024
@Eligioo Eligioo force-pushed the stefan/migration-ready-tx branch 3 times, most recently from 49ff622 to 76ac937 Compare June 10, 2024 14:30
@Eligioo
Copy link
Member Author

Eligioo commented Jun 10, 2024

@jsdanielh addressed feedback and left a comment

@@ -24,19 +25,20 @@ pub const READY_PERCENTAGE: u8 = 80;
/// Sender: Validator address
/// Recipient: Burn address
/// Value: 1 Luna
/// Data: TBD
/// Data: Hash of the generated `GenesisConfig`
Copy link
Member

Choose a reason for hiding this comment

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

@ines-toupeira We might need to update the documentation to reflect this.

pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
pow-migration/src/monitor/mod.rs Outdated Show resolved Hide resolved
@Eligioo Eligioo force-pushed the stefan/migration-ready-tx branch from 76ac937 to e324599 Compare June 12, 2024 06:46
Copy link
Member

@jsdanielh jsdanielh left a comment

Choose a reason for hiding this comment

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

LGTM

@Eligioo Eligioo force-pushed the stefan/migration-ready-tx branch from e324599 to 0ae73cf Compare June 12, 2024 12:19
@Eligioo Eligioo merged commit 0ae73cf into albatross Jun 12, 2024
6 checks passed
@Eligioo Eligioo deleted the stefan/migration-ready-tx branch June 12, 2024 12:25
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.

4 participants