-
Notifications
You must be signed in to change notification settings - Fork 83
SIP: Attestation registry #56
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
base: main
Are you sure you want to change the base?
SIP: Attestation registry #56
Conversation
cos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see attestations are happening :-)
High level, I would move in the direction of either curated attestation types or no type registry at all. The current design seems to add the complexity of a registry without much of the benefit of standardization. Actually, unless I'm missing something, the registry may not be necessary even with curated types.
We could just have some guidelines on the interface necessary for an attestation to be indexable. And shared event types for discoverability.
Also, imo, it would be really useful to have well-designed types, maybe part of this SIP, for what we already know. Like a really good audit type, including everything needed, auditor details, storage of artifacts on Walrus, etc. This way we won't end up with a bunch a different types created by different auditors, and indexes dealing with displaying diverse types in a pretty way.
I think the intention to "curate" attestation types does not contradict the possibility to discover all existing types in a structured form. The curation implies that everyone is able to create attestation types, while we will have a mechanism to highlight only certain ones. The curation mechanism is already in the heart of the "per-sender list of trusted attesters", and I just added a similar structure for the attestation types via a "per-sender list of trusted attestation types" which can be maintained by a trusted entity. To bring a bigger context, the proposal to create "attestation types" is highly inspired by the established on-chain attestation protocols like "EAS: Ethereum Attestation Service" (see their SchemaRegistry) and "EthSign: Sign Protocol" (see their Schema implementation). In addition to "making attestation types discoverable on-chain", adding a separate function required for creating attestation types is also useful to:
|
Yes, we're planning to propose the first attestation types and their implementation as part of the "reference implementation" section, but I think it shouldn't be the core of this SIP, as its primary focus is on establishing the registry itself. |
amnn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this @SidestreamStillJelly, I also had some questions about what "registry" really means in the context of this proposal, and some other thoughts about what needs to be stored on-chain as part of attestations vs not.
I think it's also worth getting some of the folks working on related standards, like Display to weigh in on their thinking -- I'll bring this up with them!
My take is that curated attestation types would be the hard and super useful part. For example, getting consensus among auditors on a common attestation type (and pretty Some form of registry might be the natural consequence of this discovery process, instead of being created first. |
|
Thanks for sharing the POC, that really helps make things concrete. I've been discussing this SIP internally with folks, here's what came out of that discussion, let me know what you think: ScopeThere has been a good discussion on this thread about what should and shouldn't be in scope for this SIP (i.e. what is a minimally viable attestations platform). Here's where we landed after our internal discussions: In Scope
Out of Scope
We can derive significant value from the in scope parts without these features, tackling them, when we have a better idea of how the system will be used. Others can also potentially contribute them, given the work is inherently decentralized. Let us know if you feel strongly about pulling these or other requirements in scope though. These are just our thoughts, and it's open for discussion. Common operationsRevocationIn the current design, whether or not an attestation is revocable is a property of the attestation type. We wonder whether this is necessary. Could we say that any attestation could be revoked if the attester later discovers a reason to? There is perhaps scope for saying that when an PinningThere was discussion about a way for package publishers to hide certain attestations, and then a concern that this would allow bad actors to hide legitimate attestations that showed their package in a bad light. When we discussed it internally, we came up with an alternative: Rather than package publishers being able to hide attestations they did not like, they could highlight (or "pin") attestations they do like. This would allow legitimate publishers to highlight high value attestations (e.g. an audit they commissioned from a reputable audit firm) without giving bad actors the power to silence legitimate attestations. Modifying AttestationsAlthough we want to avoid supporting arbitrary modifications to attestation contents, both revocation and pinning are a form of modification, and the initial idea of transferring the attestation to a package makes this difficult to achieve because packages are immutable. The current solution of storing modifications in a lookaside table is workable, but it means clients need to consult two places to understand the current state of an attestation. Internally we have been discussing a new feature that may help with this -- derived addresses -- which would allow packages to generate addresses from a parent address and a Move value (similarly to how dynamic field names work).
We do not have this feature yet, but it seems to yield a meaningful usability improvement, so if it seems appealing, we can prioritize developing it. Authorization schemeWe discussed that using the attestation's original sender to authorize further actions (like revocation) is not ideal. This advice comes from our past experience where this mechanism has been too rigid -- it makes it difficult to rotate keys, or delegate control. I'll nudge the relevant team to take a deeper look and give advice. |
I agree this is in the scope for our grant, but not sure how it can be applied to this document. I think the SIP can stay abstract and don’t mention specific attestation types as it will be irrelevant for the future readers thinking to implement their own types – let me know if you disagree. Also, we can keep this PR open until we have Audit attestation type implemented and used on-chain, but the discussion on specific attestation types can happen inside the PoC repository, in a relevant PR.
Agree with all points, but schema. For the library/frontend, it would be useful to have some form of registry and also forbid updating Display type. So if you're not fully against the currently proposed structure, we would like to keep this one point in scope.
Yes, using
Sounds good, that's actually what we assumed, when you first mentioned that package registry would integrate attestations. To be clear, the list of “pinned attestations per Publisher” will be stored and managed by the move registry?
I am not sure how pinning is supposed to modify the attestation. As you describe this functionality, we see it as an external set
Consulting two places is not ideal to assess current attestation status, but a compromise – if we decide that full immutability of the Attestation is a more important quality. But if you think that convenience of having a single call is more important, then a new “derived address” can become a solution. But in order to agree and plan this in, we need to understand a few points about this proposed feature:
Just to outline two other solutions to revocability that doesn’t require new features:
Agree here, we’ve updated the SIP as well as the PoC to use the proposed |
|
Thanks for the detailed reply @SidestreamStillJelly, and sorry for the delay in getting back to you. In Scope
I would be fine to leave the discussion about the conventions for common attestations out of this SIP. It may be worth raising another informational SIP for that though, because it is something that you may want to get feedback on from the broader community. Agreed that the end-to-end flow aspect is not relevant to this SIP. Out of Scope
In the previous design it looked like the type registry was used for two things:
So it seemed like you no longer needed a type registry to support the features you wanted to support in the initial implementation, but maybe I'm missing something -- can you share more details on how you imagine a type registry to be used by a library or front-end? Revocation
👍 thank you! The thinking on our part is that an "unrevocable" attestation seemed like an almost impossibly high bar, (accounting for human error, incomplete information, bugs, etc), so it seemed safest to say that you should be prepared for any attestation to be revocable. Pinning
Pinning and Move Registry integrations are unrelated.
Modifying Attestations
Here's how we imagined pinning would work:
It's possible to implement this feature using a lookaside table (although it should probably be keyed by the package ID, not the publisher ID), but that brings us to the topic below, about minimising the number of places that need to be consulted to understand the latest state of an attestation:
There's two properties that we're going for here:
We don't need to compromise on the immutability of attestation data to achieve this goal -- we just rely on the Attestation Move Package to enforce that property for us (that the content of an attestation cannot be modified), while still allowing us to make modifications for revocability and pinning.
These are great questions:
Timeline is always a tricky one, for a protocol feature like this, it's measured in months, but it also depends on demand for that feature. We're also mindful that timeline has funding implications. If we're aligned that this feature is the right thing to build attestations on top of, we can go back to the foundation and discuss how to amend terms so that we have the flexibility to build the right thing, and not the fast thing. On a technical level, it should be possible to prototype attestations using a centralised registry with dynamic fields, before we have derived address support, so depending on this feature wouldn't be a hard blocker until we're talking about the official launch.
These alternative solutions for revocations didn't meet the second property: If revocations are stored in a lookaside table, then people can forget to look at that table. If they are handled by sending a new revocation attestation, clients will potentially need to fetch all attestations to know that they have the most up-to-date knowledge of any given attestation. Pinning is similar in this regard. |
Modifying AttestationsBased on your comment @amnn, I understand that you're proposing the following (please correct me if I'm wrong):
Next stepsImmediate next steps
Steps after the feature is available
Align on the need to register type
I likely miss some important detail about Display standard or Move, as I could not figure out how can we enforce its immutability without the use of some sort of registry / table. Based on the docs, I can see that to edit a Display, a user need to provide mutable Display object, but nothing prevents someone with the Publisher object to simply create another Display object for the same type, multiple times (at least it doesn't throw when I tried it in the tests). How the subsequent Display objects for the same type are handled by the block scanners, I guess it up for their implementation, but likely they are using the latest one. Or do you, in general, had a different idea in mind for enforcing immutability?
Another reason to register types (besides enforcing immutability of the Display) is to make types self-discoverable. Ideally, a frontend wouldn't have to be updated to support a new attestation type, but will fetch a list of AttestationTypes, fetch relevant underlying Type definition and then construct an input form, derived from that type. In case there is no concept of AttestationTypes, it have to either hardcode possible types in the frontend or off-chain index all attestations to quickly find ones that reference unique underlying type. To be clear: the latest implementation in the PoC PR is using registry to enforce creation of a single Display and AttestationType, then use AttestationType to create attestation itself (without dependency on the registry). Please let me know if it's still something that you would rather remove. Align on the temporary implementation of the revocation, pinningCould you please outline a specific implementation that would be satisfactory here? By "centralised registry with dynamic fields", do you mean to use |
|
Hi @SidestreamStillJelly, yes we're aligned on my proposal. Align on the need to register type
This is a great point -- your understanding is right for how There are some ways around this (centered around the fact that you want to create a
If I understand correctly, this is to do with creating attestations, rather than about displaying them -- you want to be able to create a generic front-end for others to make attestations with. I can see how this would be useful, but I would treat this as an extension or a nice to have, for the following reasons:
All that being said, my main concern with a traditional "registry" pattern is that it creates a parallelisation bottleneck, and I think it's possible to avoid that and still support all the above by creating an immutable object as part of registration, rather than adding a type to a central registry: module attestation::type_def;
public struct AttestationType<T: key + store> has key {
id: UID,
/// Hypothetical cap for modifying `T`'s Display, in the registry model.
display: DisplayCap<T>,
}
public fun register<T: key + store>(display: DisplayCap<T>, ctx: &mut TxContext) {
transfer::freeze_object(AttestationType {
id: object::new(ctx),
display,
})
}By wrapping the Later on, if you wanted to create some subset of attestations that can be automatically created via a front-end, you could publish the schemas for those in the same way, so this approach is extensible and composable without sacrificing parallelism.
You can fetch all the dynamic fields owned by an object, just like you can fetch all objects owned by an address. |
Great 🖤
Agree on the parallelization issue, but I have to say that current implementation of the
I've now implemented both revocation and pinning in the PoC PR the way it was proposed above. Please review the PR: once approved, I will update SIP to match PoC. |
Ah noted -- I have been focussing mainly on the SIP, apologies. I will take a detailed look at the PoC in the next couple of days. |
|
I'm happy with the scope and wording of this SIP! I think we need to find you an Editor from Sui Foundation to get it officially stamped though. |
This PR creates a SIP draft, that intends to specify open standard for attesters to share signals about packages or modules, as per the original RFP "Record trust signals for packages onchain".