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

Add upgrade handler migration to enable send for restricted markers #1427

Closed
4 tasks
nullpointer0x00 opened this issue Mar 16, 2023 · 5 comments · Fixed by #1429
Closed
4 tasks

Add upgrade handler migration to enable send for restricted markers #1427

nullpointer0x00 opened this issue Mar 16, 2023 · 5 comments · Fixed by #1429
Assignees
Labels
marker Marker Module
Milestone

Comments

@nullpointer0x00
Copy link
Contributor

nullpointer0x00 commented Mar 16, 2023

Summary

Currently, all restricted markers have been set to SendEnabled false. With the implementation of #1256 we can delete all items from the table. This will allow the send restrictions to be applied with the new handler.

Problem Definition

Proposal


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@iramiller
Copy link
Member

For this migration ... are the "send disabled" records within the bank module simply deleted? Or is there still a record for each token created ... this will have some impact on the management of that configuration within the marker module....

@nullpointer0x00
Copy link
Contributor Author

nullpointer0x00 commented Mar 16, 2023

As of right now, we are setting the send enabled to true(coin) or false(restricted) within from the marker module. With #1256 I set true for both with our current ensureSendEnabledStatus method. However, we could probably just delete them all and not have our marker module set them. The cosmos sdk has a parameter that indicates what it should default to if the coin is not found in the table. On both testnet and mainnet it is set to true. Therefore, if they all deleted from the table on upgrade IsSendEnabled will be true for the coin.

It would be nice to delete the ensureSendEnabledStatus method from the marker module and have the upgrade remove all entries. @SpicyLemon Thoughts?

@iramiller
Copy link
Member

I feel like the best approach would be to remove all of those send disabled records, remove the ensure send disabled checks, and focus on the restrictions api style checking within the marker module itself for allowed/disallowed transfers. Not having the extra data in the bank module would be helpful here for reducing the gas costs slightly

@nullpointer0x00
Copy link
Contributor Author

I agree. It is now removed and I updated the description of the ticket.

@SpicyLemon
Copy link
Contributor

Just catching up on this.

I agree with removing ensureSendEnabledStatus.

And the only reason to keep all of those SendEnabled records around would be in the crazy off-chance that we change the DefaultSendEnabled param. I feel like that's pretty far outside the realm of possibilities, though, so it's okay to remove all those records. It'll save a little state, but each is just a key/value pair where the value is a single byte.

But since we need to either update them all to true or delete them, might as well just delete them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
marker Marker Module
Projects
Development

Successfully merging a pull request may close this issue.

3 participants