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

[Protocol Specs] "SafeTransaction and SafeRootAccess MUST have an id requirement" is vague #32

Open
mmv08 opened this issue Aug 24, 2023 · 0 comments

Comments

@mmv08
Copy link
Member

mmv08 commented Aug 24, 2023

The manager specification states:

Both SafeTransaction and SafeRootAccess MUST have a unique ID, which is the EIP-712 hash of the object.

https://github.com/safe-global/safe-core-protocol-specs/blob/681c63678bfdd0a0087bbc26702979df769c50da/manager/README.md

This particular requirement seems a tad unclear to me because it can be understood in multiple ways:

  1. SafeTransaction and SafeRootAccess must have an ID field
  2. It should be possible to compute a unique identifier based on struct fields

The real meaning seems to be 2), judging by the Uniqueness section below. In my opinion, the current specs do not clearly define how to calculate an identifier (at least a basic example) and leave it slightly ambiguous. The general types section suggests using an EIP-712 hash, and the Uniqueness section requires it to be unique without uniqueness requirements (e.g., it should be uniquely identifiable across chains).

My suggestion:

  • Provide a basic example of a hashing algorithm
  • Define whether a manager should provide such functionality
  • Remove the MUST requirement from the types description and add a MUST to the "Uniqueness" section
@rmeissner rmeissner self-assigned this Aug 28, 2023
@rmeissner rmeissner removed their assignment Sep 29, 2023
@rmeissner rmeissner changed the title "SafeTransaction and SafeRootAccess MUST have an id requirement" is vague [Protocol Specs] "SafeTransaction and SafeRootAccess MUST have an id requirement" is vague Oct 27, 2023
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

No branches or pull requests

2 participants