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

Refactor ABSTAIN to UNSET #96

Closed
wants to merge 1 commit into from

Conversation

Ramarti
Copy link

@Ramarti Ramarti commented Apr 14, 2024

Reviewing AccessController logic, ABSTAIN confused me because of the connotations.
It's used as indicative of 0, no value set yet.
UNSET helped me understand better.

@kingster-will
Copy link

'ABSTAIN' is a term that is commonly utilized within permission systems.
For example: "The authorization .... makes the ultimate decision by checking the individual responses (permit, deny, abstain) "

@Ramarti
Copy link
Author

Ramarti commented Apr 14, 2024

I understand, but adapting it to Solidity development, it's more intuitive (at least to me) to understand that the value is a consequence of a value that's not set.
Abstain made me think the user did a conscious action to set that value, when most of the time the value is not something the user set, just Solidity returning 0 if a uint8 is not set.
We would probably not be naming that value if Solidity had null or undefined.

@Ramarti
Copy link
Author

Ramarti commented Apr 14, 2024

Just trying to improve code readability for audits.

@jdubpark
Copy link

  • Many Solidity practices treat 0 as "unset"
  • "Unset" is treated as abstain in the Access Controller

I think it's more apt to describe it closely to the Access system, ie. ABSTAIN. We could interchangeably use the terms ABSTAIN and UNSET since the former is what's used but the latter is a common theme in Solidity (value 0), just need to make it clear in the comments and documentation.

@jdubpark
Copy link

Closing as it seems like we've settled on "ABSTAIN." Please comment if there's misalignment @Ramarti

@jdubpark jdubpark closed this Apr 16, 2024
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

Successfully merging this pull request may close these issues.

3 participants