Contact Operations – Registry #274
Replies: 8 comments 9 replies
-
Attribute names are limited to 32 bytes. This will impose a barrier on id generation as well as registry namespace. |
Beta Was this translation helpful? Give feedback.
-
While there is no named limit to the size of the contact bundle stored in the registry, there is a practical limit of a few kb. |
Beta Was this translation helpful? Give feedback.
-
Long term the combination of saving the did and install key bundle might make more sense if it was part of an XMTP specific contract that uses the did registry as a form of perpetual storage. The following sequence would be reduced to a single transaction.
This is intended for POC purposes so the UX might not be as ideal as is required for a production release. |
Beta Was this translation helpful? Give feedback.
-
Just thinking aloud here, I'm a little bit concerned about the indexing strategy for these event logs -- what's an example of critical profile data that would be stored onchain/query-able from the contract? Once we have that, I assume we then expect inbox providers to each run this indexing service separately -- or would we provide the service for people to query? Or would we maybe use something like TheGraph or another pre-existing indexing service for the event logs Using merkle trees -- we keep the root of the event logs w/ attributes somewhere, but we still need to keep some logs around to send back w/ the proof. In general I really like this idea since it significantly reduces storage cost associated with indexing ETH, but re-indexing from the start would still require looking through all the historical blocks on ETH right? |
Beta Was this translation helpful? Give feedback.
-
Just want to get some clarity on the below statement.
Does this mean we should not expect to tether the workflow to Ethereum signature schemes indefinitely? Or, that parts, or all of, the contact bundle could eventually live outside of Ethereum? I suppose it could be both? There is a small typo in "did:eth" in the below sentence
Why would a user want to predefine an expiration date for the grant?
What is the difference between grantInstallation() and saveInstallation()? |
Beta Was this translation helpful? Give feedback.
-
This is a statement of intent. First, to indicate that the eventual did mapping that we implement should be flexible enough to live in external storage with a variety of possible paths to resolution. Second, to indicate that we should not 'rest on our laurels' with a functional Ethereum implementation. We need to push past Ethereum to include additional possible layers and solutions. Having said this, as prototyping work, we will depend strongly on Ethereum as our DA.
Choice of signature scheme is going to be determined by the implementation of meta transactions. Putting something on Ethereum will require an Ethereum signature. That is not a choice. However, in the future, there may be additional paths to resolving the contact credential that does not involve Ethereum.
Because the installation bundle contains a public key. That key should have a fixed lifetime for security reasons and we should impose a requirement to rotate the keys at sufficient intervals to guarantee the safety of the users profile.
The pseudo implementation is not meant to be complete or final. I tried to offer some insight to the potential implementor as to some of the challenges they will face with signing this data to go on chain but there are more details that I left out. |
Beta Was this translation helpful? Give feedback.
-
The Contact Directory operates on the premise that an Ethereum public key (EPK) can effectively act as a proxy for a decentralized identity registered under the did:eth registry protocol. This registry offers a decentralized means to link a key bundle with an EPK, forming a unique contact ID. It's important to note that, with the long-term goals of XMTP in mind, the aim is to facilitate contact workflows that do not necessarily rely on Ethereum. In such scenarios, the on-chain registry must incorporate a mapping to accommodate a broader decentralized identity (DID) framework.
A decentralized identity allows a user to validate their own registration request using a robust cryptographic signature. This can typically be done with a blockchain wallet. This on-chain registration can serve to mitigate spam while providing a robust and censorship resistant identity record.
Contact Registry Workflow
As part of developing this workflow. We are working on a prototype or POC of XMTP integration with
did:eth
. The following operations directly support implementation of a Contact Directory.Installation Management
grantInstallation(wallet, keyBundle, metadata)
Declares that an installation is associated with a wallet. Currently, we do this by signing the installation’s keys using the wallet’s keys.
In v3, an installation has two keys, a Curve25519 + Ed25519 key. In MLS, the keys may be different, but the overall concept is the same.
One day we might consider adding an expiry date for the grant, before which it must be renewed.
Pseudo Implementation
Required Configuration
revokeInstallation(wallet, installationId)
Declares that an installation is no longer associated with a wallet (e.g. if it is compromised, or no longer used). Currently, we would do this by signing a revocation payload containing the installation’s keys using the wallet’s keys.
Pseudo Implementation
Required Configuration
Installation Search
getAllInstallations(wallet)
Fetch all valid installations for a given wallet. Basically, fetch all granted installations, and subtract revoked installations. This could be done manually by the client, or pre-computed by a trusted entity such as a smart contract before surfacing to the client.
A client would do this step before communicating with a wallet address.
A client might also enumerate its own installations for account management - in this case they would want to fetch the metadata too.
Pseudo Implementation
Iterate change history, checking revocation and expiration, saving a list of all prior changes
Required Configuration
Supporting Contract Operations
The did-eth registry supports a basic operational model for storage and retrieval of a contact key bundle. All API operations must be implemented on top of the following model operations
identityOwner
retrieve delegated owner id
validDelegate
confirm current identity is a valid delegate of identity specified
changeOwner
assign ownership of current identity to specified address
addDelegate
delegate control of identity to address for the specified time range
revokeDelegate
remove a previously associated delegate from identity
setAttribute
Assign name and value for attribute, aka key bundle, on identity
revokeAttribute
Remove the previous assignment for a name and value on identity
Issues
In the current contract specification, setAttribute does not store any data on-chain. This is a cost optimization. The burden will fall on the client to search for and retrieve the indexed data from Ethereum event logs. My intention is to propose and implement a storage solution for this problem that will take possibly both of the following approaches.
Beta Was this translation helpful? Give feedback.
All reactions