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

Complete dApp removal from dApp staking v3 #1152

Open
Dinonard opened this issue Jan 23, 2024 · 0 comments
Open

Complete dApp removal from dApp staking v3 #1152

Dinonard opened this issue Jan 23, 2024 · 0 comments
Labels
project Issue is part of an ongoing project

Comments

@Dinonard
Copy link
Member

Description

Even after dApp has been unregistered from the dApp staking v3, it will still occupy space inside the protocol.
It's kept under IntegratedDApps storage, only the state is changed into Unregistered.

All of the unclaimed rewards will also remain in storage.

The problems here are:

  • dApp Id is u16, and it's not a limitless number 🙂
  • if after dAPp unregistration, Id would also be released and reused by a new dApp, it would allow new dApp owner to potentially claim old unclaimed dApp rewards, which is wrong

There should be a system in place which frees up dApp Ids for reuse, after enough time has passed (i.e. rewards have expired) after old dApp unregistration.

Alternative is to use u32 instead of u16 but that would make it more problematic in respect to PoV size so for now this isn't an option.

This isn't something that needs to be addressed soon since we're unlikely to hit this wall anytime soon.

@Dinonard Dinonard added the project Issue is part of an ongoing project label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project Issue is part of an ongoing project
Projects
None yet
Development

No branches or pull requests

1 participant