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

Migration system does not support more than one migration #61

Open
3esmit opened this issue Feb 21, 2024 · 1 comment
Open

Migration system does not support more than one migration #61

3esmit opened this issue Feb 21, 2024 · 1 comment
Labels
type: discussion type: feature New feature or request
Milestone

Comments

@3esmit
Copy link
Collaborator

3esmit commented Feb 21, 2024

Migration allows a new contract to be accepted by accounts.

The following actions would not follow a third migration:

  • When an account starts migration, in would try to migrate to next version, not to latest.
  • When an account processes while on migration, it informs of minted MPs on past epochs.

Possible solutions:

  1. When receiving migration data, while on migration, forward call to next version. Good: easy to implement. Bad: Will not process under the rules of the intermidiate version
  2. Lock ABI of migration and allow direct migration to latest version. Good: Easy to implement, very predictable. Bad: Locked into a certain ABI.
  3. Allow owner to change migration address. Good: Cheapest in gas, versatile. Bad: Migration address can change, locked into a certain ABI
  4. Architect migration in a way that the migration is processed at each contract. Good: enforce that user passes through all rules for past epoch for the intermediate version. Bad: gas expansive, tricky to implement

There is no perfect solution on that, each of own have its own advantages and drawbacks.

@0x-r4bbit 0x-r4bbit added this to the Staking V1 milestone Feb 23, 2024
@0x-r4bbit 0x-r4bbit added the type: feature New feature or request label Feb 23, 2024
@3esmit
Copy link
Collaborator Author

3esmit commented Mar 6, 2024

We decided going for option 4. due requirement in accounts being processed for each epoch in past contract rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants