-
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): create a Hornet snapshot filter framework + filter out voting outputs #4513
Conversation
…ddresses to destination during the migration process
… struct, minor renaming refactoring
…ss has been swapped at least once Create dedicated function to convert and swap addresses
… for iota snapshot
* Make some improvements to the address swap map usage
…nto sc-platform/address-swap-test
This pull request has been deployed to Vercel. Latest commit: f3a439d ✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-e8448wny2.vercel.app |
This pull request has been deployed to Vercel. Latest commit: f3a439d ✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-j2tjza35r.vercel.app |
This pull request has been deployed to Vercel. Latest commit: f3a439d ✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-429cow23n.vercel.app |
* simplify filters * Use debug for logs * fix errors * clippy * new method using iterators * clippy * use drop for logging * clippy
This pull request has been deployed to Vercel. Latest commit: 8a750b4 ✅ Preview: https://apps-ui-5if5ppu7m-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 8a750b4 |
This pull request has been deployed to Vercel. Latest commit: 8a750b4 ✅ Preview: https://rebased-explorer-b7p7ejrie-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 8a750b4 ✅ Preview: https://wallet-dashboard-pk9gonltg-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 0e5a810 |
This pull request has been deployed to Vercel. Latest commit: 0e5a810 ✅ Preview: https://wallet-dashboard-gq5dulnlh-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: 0e5a810 ✅ Preview: https://rebased-explorer-2jfwrjozo-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: e95504a |
This pull request has been deployed to Vercel. Latest commit: e95504a ✅ Preview: https://rebased-explorer-p6xd9h2wz-iota1.vercel.app |
This pull request has been deployed to Vercel. Latest commit: e95504a ✅ Preview: https://wallet-dashboard-9zdzqjjhq-iota1.vercel.app |
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 🎈
… + filter out voting outputs (#4513) * feat(iota-genesis-builder): add address swap map for swaping origin addresses to destination during the migration process * fix(iota-genesis-builder): relative path supporting, remove mut modifier * fix(iota-genesis-builder): address_swap_map become field of Migration struct, minor renaming refactoring * fix(iota-genesis-builder): add additional hashmap that track if address has been swapped at least once Create dedicated function to convert and swap addresses * fix(iota-genesis-builder): review's cmments fix * fix(iota-genesis-builder): anyhow error has been added instead of panic * cargo clippy * typo spell fix * fix(iota-genesis-builder): add comments to the public functions * fix(iota-genesis-builder): remove mut modificator, remove extra hashmap * fix(iota-types): parse first address from bech32 format, csv headers support * fix(iota-types): example of CSV file in comments above initialization function * Minor fix * refactor(iota-genesis-builder): move output processing out of main * feat(iota-genesis-builder): create a dedicated run migration function for iota snapshot * feat(iota-e2e-tests): include snapshot generation and address swap in migration test * Make some improvements to the address swap map usage (#4376) * Make some improvements to the address swap map usage * fix(iota-e2e-tests): update import * feat(iota-genesis-builder): create a Hornet snapshot filter framework * feat(iota-genesis-builder): add metrics print in filters * fix typo * refactor(iota-genesis-builder): voting -> participation filter * Simplify the filters by using nested iterators (#4526) * simplify filters * Use debug for logs * fix errors * clippy * new method using iterators * clippy * use drop for logging * clippy * refactor(iota-genesis-builder): update comments * fix(iota-genesis-builder): participation output keeps sender and issuer feats * clippy :) * fix(iota-genesis-builder): remove issuer from basic features --------- Co-authored-by: Dkwcs <pavlo.botnar@gmail.com> Co-authored-by: DaughterOfMars <chloedaughterofmars@gmail.com>
Description of change
This PR builds on top of #4389. In there, the
MergingIterator
was simply moved into its own file. This iterator was already filtering some outputs to: (i) scale the amount of iota from micro to nano, (ii) find unlockable vesting outputs and merge them (implemented in #1238).In this PR, these filtering operations are firstly standardized into iterators and then a third filter is added ->
ParticipationOutputIterator
. This one matches basic outputs having a tag being the voting "Participation Tag" and then removes Tag and Metadata features from the basic output.[edit]
After this comment and a discussion on Slack, me and @muXxer came to the conclusion that not only "voting" basic outputs should be filtered for feature and metadata removal, but also "staking" basic outputs (unintentionally the implementation was already done to do so).
Links to any relevant issues
#4380 + staking basic outputs
Type of change
How the change has been tested
cargo run --release --bin iota-genesis-builder -- --disable-global-snapshot-verification iota --snapshot-path ../latest-full_snapshot.bin --target-network alphanet-test --address-swap-map-path ../swap.csv
Change checklist