Skip to content

fix: clear asset genesis to prevent accounts referencing undefined assets#481

Closed
mchristou wants to merge 2 commits intomainfrom
fix_penpal
Closed

fix: clear asset genesis to prevent accounts referencing undefined assets#481
mchristou wants to merge 2 commits intomainfrom
fix_penpal

Conversation

@mchristou
Copy link
Copy Markdown
Contributor

closes #480

When customizing parachain chain-specs, runtime presets may include
asset account balances for assets that are not defined in the genesis.
This causes pallet_assets genesis build to panic with "assertion failed:
result.is_ok()" when increase_balance() is called for non-existent assets.

Clear assets genesis data in clear_authorities()
to ensure accounts aren't assigned balances for undefined assets.

…sets

Prevents pallet_assets panic by clearing asset-related genesis fields
when accounts have balances for assets that don't exist
@mchristou mchristou requested a review from pepoviola December 16, 2025 12:40
@pepoviola
Copy link
Copy Markdown
Collaborator

Thanks @mchristou, I just commented here since I think we (zombienet) should only modify/remove keys needed to spawn the network. Here we can take the opposite approach and ensure that the account in assets is present since is a better dx for end users.

Thx!

@mchristou
Copy link
Copy Markdown
Contributor Author

Thanks @mchristou, I just commented here since I think we (zombienet) should only modify/remove keys needed to spawn the network. Here we can take the opposite approach and ensure that the account in assets is present since is a better dx for end users.

Thx!

Hi @pepoviola, yes that make sense.
If there's no corresponding entry in assets for each account should we remove it or add a default one?

@mchristou
Copy link
Copy Markdown
Contributor Author

closing in favor of #482

@mchristou mchristou closed this Dec 18, 2025
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.

[bug] penpal doesn't works with the current customizations

2 participants