-
Notifications
You must be signed in to change notification settings - Fork 18
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(iota-genesis-builder): Allow Shimmer test outputs generation #1699
Conversation
crates/iota-genesis-builder/examples/snapshot_add_test_outputs.rs
Outdated
Show resolved
Hide resolved
crates/iota-genesis-builder/src/stardust/test_outputs/vesting_schedule_portfolio_mix.rs
Outdated
Show resolved
Hide resolved
crates/iota-genesis-builder/examples/snapshot_add_test_outputs.rs
Outdated
Show resolved
Hide resolved
pub(crate) async fn outputs(rng: &mut StdRng) -> anyhow::Result<Vec<(OutputHeader, Output)>> { | ||
pub(crate) async fn outputs( | ||
rng: &mut StdRng, | ||
coin_type: u32, |
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.
Maybe use an enum?
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.
It was with the enum before! Pls check this comment.
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 is private testing code, I think it's fair to avoid unnecessary code duplication here
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.
tbh I think that was a bad change
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.
I disagree, but as I've said in the original comment, I'm not super strongly opinionated, up to Mirko.
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 is private testing code
I think this reply is enough 😄
@kodemartin pls merge it when you'll come back, if something should be changed maybe @Thoralf-M or @valeriyr could help you! 😄 🏖️ |
) * feat(iota-genesis-builder): allow shimmer test outputs generation * fix(iota-genesis-builder): adapt the other example * fix(iota-genesis-builder): differentiate between shimmer and iota coin type * fix(iota-genesis-builder): use u32 instead of CoinType * fix(iota-genesis-builder): fix example about * fix(iota-genesis-builder): storage deposit amounts (#1811) --------- Co-authored-by: Thibault Martinez <[email protected]>
) * feat(iota-genesis-builder): allow shimmer test outputs generation * fix(iota-genesis-builder): adapt the other example * fix(iota-genesis-builder): differentiate between shimmer and iota coin type * fix(iota-genesis-builder): use u32 instead of CoinType * fix(iota-genesis-builder): fix example about * fix(iota-genesis-builder): storage deposit amounts (#1811) --------- Co-authored-by: Thibault Martinez <[email protected]>
) * feat(iota-genesis-builder): allow shimmer test outputs generation * fix(iota-genesis-builder): adapt the other example * fix(iota-genesis-builder): differentiate between shimmer and iota coin type * fix(iota-genesis-builder): use u32 instead of CoinType * fix(iota-genesis-builder): fix example about * fix(iota-genesis-builder): storage deposit amounts (#1811) --------- Co-authored-by: Thibault Martinez <[email protected]>
) * feat(iota-genesis-builder): allow shimmer test outputs generation * fix(iota-genesis-builder): adapt the other example * fix(iota-genesis-builder): differentiate between shimmer and iota coin type * fix(iota-genesis-builder): use u32 instead of CoinType * fix(iota-genesis-builder): fix example about * fix(iota-genesis-builder): storage deposit amounts (#1811) --------- Co-authored-by: Thibault Martinez <[email protected]>
Description of change
This PR allows to generate a test output snapshot starting from a Shimmer Hornet snapshot.
The generated test output snapshot includes addresses derived with the network coin type (IOTA or Shimmer) and uses the correct network total supply. After this changes, then, it is possible to produce Hornet snapshots containing test outputs able to be given as input to the Move objects snapshot generation script for generating Shimmer and IOTA snapshots.
Links to any relevant issues
Fixes #1660
Type of change
How the change has been tested
cargo run --release --example snapshot_only_test_outputs --features="test-outputs" -- iota --snapshot-path ../latest-full_snapshot-iota.bin
cargo run --release --bin iota-genesis-builder -- --disable-global-snapshot-verification iota --snapshot-path ../test-latest-full_snapshot-iota.bin --target-network alphanet-test
cargo run --release --example snapshot_only_test_outputs --features="test-outputs" -- shimmer --snapshot-path ../latest-full_snapshot-shimmer.bin
cargo run --release --bin iota-genesis-builder -- --disable-global-snapshot-verification shimmer --snapshot-path ../test-latest-full_snapshot-shimmer.bin --target-network alphanet-test
target/release/iota genesis --working-dir ../test_iota_config -f --with-faucet --num-validators 4 --local-migration-snapshots ./stardust_object_snapshot-iota.bin ./stardust_object_snapshot-shimmer.bin
Change checklist