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

Make Rbac iterable #95

Closed
encody opened this issue Nov 10, 2022 · 1 comment · Fixed by #99
Closed

Make Rbac iterable #95

encody opened this issue Nov 10, 2022 · 1 comment · Fixed by #99
Labels
breaking change Fixing this issue will require a breaking change to the API enhancement New feature or request

Comments

@encody
Copy link
Contributor

encody commented Nov 10, 2022

This could mean:

  • Changing the current Rbac to support role holder enumeration. This would be a state-breaking change.
  • Adding an EnumerableRbac alternative that supports enumeration.
@encody encody added enhancement New feature or request breaking change Fixing this issue will require a breaking change to the API labels Nov 10, 2022
@encody
Copy link
Contributor Author

encody commented Nov 10, 2022

An EnumerableRbac could be implemented in two ways:

  • Implementing the whole iterable collection manually
  • Just serializing all of the AccountIds into a single slot. Though this is usually frowned upon, in this case it might not actually be the worst idea: The collection has to be iterable, and a smart contract should rarely, if ever, iterate over a collection that is very large, due to gas concerns. This would require some testing.

@encody encody linked a pull request Nov 14, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Fixing this issue will require a breaking change to the API enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant