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

Consider restricting the creation of sudt/xudt cells with empty amount #82

Open
tea2x opened this issue Apr 26, 2024 · 5 comments
Open

Comments

@tea2x
Copy link

tea2x commented Apr 26, 2024

There are xudt/sudt cells with zero balance being created. For example: This CAT++ transaction, output 3 is an xudt cell with zero balance.

The creation of this type of cells either by mistakes or by intention are meaningless.
Restricting them can help keep CKB UTXO set minimal and lightweight.

@XuJiandong
Copy link
Collaborator

XuJiandong commented Apr 26, 2024

You're correct, these cells are meaningless as they can't be spent anymore. Note that these cells can be recycled by attaching them to a minting transaction(normal transaction can't consume it).

@quake
Copy link
Member

quake commented Apr 26, 2024

Note that these cells can be recycled by attaching them to a minting transaction(normal transaction can't consume it).

can we combine a zero udt cell with a non-zero udt cell as inputs and transfer them to one output cell?

@tea2x
Copy link
Author

tea2x commented Apr 27, 2024

Note that these cells can be recycled by attaching them to a minting transaction(normal transaction can't consume it).

yeah now users have to do additional tasks to consolidate these cells but it's sort of cumbersome.

I understand your comment in #83 (comment) that production scripts can't be upgraded but if this is really considered... can it be batched in the next hardfork?

@XuJiandong
Copy link
Collaborator

The hardfork cannot upgrade such a script. Instead, you can deploy a new one with a patch to the mainnet, and then perform a migration.

@tea2x
Copy link
Author

tea2x commented Apr 29, 2024

Ok. Thanks for the confirmation.

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

No branches or pull requests

3 participants