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): merge unlocked vesting outputs into one output per address #1238

Merged
merged 9 commits into from
Jul 23, 2024

Conversation

muXxer
Copy link
Contributor

@muXxer muXxer commented Jul 19, 2024

Description of change

This PR collects the already unlocked vesting outputs into one per unique address in the iota-genesis-build.

  • Reduces the number of Coin<IOTA> objects by roughly ~2.2 million
  • Decreases the object snapshot size by ~277 MB

Links to any relevant issues

fixes issue #1224

Type of change

  • Enhancement (a non-breaking change which adds functionality)

How the change has been tested

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

@muXxer muXxer requested review from kodemartin, miker83z and a team as code owners July 19, 2024 13:48
@lzpap
Copy link
Member

lzpap commented Jul 19, 2024

I tested the PR by running a single validator locally (iota and smr state), but there was no significant reduction of RAM.
Peak RAM while executing iota start ... that uses the swarm config was about 60 GB still.

genesis.blob size is 6.38 GB

Copy link
Contributor

@miker83z miker83z left a comment

Choose a reason for hiding this comment

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

Welcome to the rust side! 🎊 LGTM!
Just run cargo clippy and implement the suggestions!

(Additionally, NIT: to make the main cleaner you could create a dedicated handle_iota_migration function that replaces the code under the CoinType::Iota branch)

@lzpap lzpap added the sc-platform Issues related to the Smart Contract Platform group. label Jul 23, 2024
miker83z
miker83z previously approved these changes Jul 23, 2024
Copy link
Member

@lzpap lzpap left a comment

Choose a reason for hiding this comment

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

Tried locally, managed to run a single validator!

@muXxer muXxer requested a review from miker83z July 23, 2024 12:36
@lzpap lzpap merged commit 1a1e357 into develop Jul 23, 2024
32 of 41 checks passed
@lzpap lzpap deleted the sc-platform/issue-1224 branch July 23, 2024 13:43
alexsporn pushed a commit that referenced this pull request Sep 6, 2024
…utput per address (#1238)

* feat(iota-genesis-builder): merge unlocked vesting outputs into one output per address

* Fix filter condition

* Apply review suggestions

* Use a custom iterator

* Applied the clippy suggestions

* Fixed rustfmt error

---------

Co-authored-by: Chloe Martin <chloedaughterofmars@gmail.com>
alexsporn pushed a commit that referenced this pull request Sep 6, 2024
…utput per address (#1238)

* feat(iota-genesis-builder): merge unlocked vesting outputs into one output per address

* Fix filter condition

* Apply review suggestions

* Use a custom iterator

* Applied the clippy suggestions

* Fixed rustfmt error

---------

Co-authored-by: Chloe Martin <chloedaughterofmars@gmail.com>
alexsporn pushed a commit that referenced this pull request Sep 6, 2024
…utput per address (#1238)

* feat(iota-genesis-builder): merge unlocked vesting outputs into one output per address

* Fix filter condition

* Apply review suggestions

* Use a custom iterator

* Applied the clippy suggestions

* Fixed rustfmt error

---------

Co-authored-by: Chloe Martin <chloedaughterofmars@gmail.com>
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants