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(iota-genesis-builder): create a Hornet snapshot filter framework + filter out voting outputs #4513

Open
wants to merge 3 commits into
base: sc-platform/address-swap-test
Choose a base branch
from

Conversation

miker83z
Copy link
Contributor

@miker83z miker83z commented Dec 17, 2024

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 a trait HornetFilter and then a third filter is added -> ParticipationOutputFilter. This one matches basic outputs having a tag being the voting "Participation Tag" and then removes all 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

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

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

  • I have followed the contribution guidelines for this project
  • 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
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@miker83z miker83z requested review from a team as code owners December 17, 2024 08:44
@iota-ci iota-ci added sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team labels Dec 17, 2024
@miker83z miker83z self-assigned this Dec 17, 2024
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 2a536f7

✅ Preview: https://apps-ui-20pcmxjby-iota1.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 2a536f7

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-lwv68nnrd.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 2a536f7

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-ewtpgx65v.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 2a536f7

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-qvghimk2q.vercel.app

Copy link
Contributor

@DaughterOfMars DaughterOfMars left a comment

Choose a reason for hiding this comment

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

This seems like a quite complicated way of applying three static filters in order during iteration. IMO these could be functions as there is no need to unify these with a trait.

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: f3a439d

✅ Preview: https://apps-ui-hj16vihms-iota1.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: f3a439d

✅ Preview: https://apps-backend-29a719c9ccbdb9b80c97b599a599d8953354da-e8448wny2.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: f3a439d

✅ Preview: https://iota-rebased-explorer-092603f1de8088243ccb8b861b23e-j2tjza35r.vercel.app

Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: f3a439d

✅ Preview: https://wallet-dashboard-a225fcfa1e2f852205a61a7cd1d5d93e92-429cow23n.vercel.app

@miker83z miker83z requested a review from muXxer December 18, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sc-platform Issues related to the Smart Contract Platform group. vm-language Issues related to the VM & Language Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[genesis-builder] Filter out voting tags and metadata from basic outputs in a Hornet snapshot
4 participants