xmtp / libxmtp

MIT License
33 stars 13 forks source link

Remove non-zero nonce restriction for client creation that doesn't use legacy key #823

Closed 37ng closed 4 weeks ago

37ng commented 4 weeks ago

Also optimized the tests so that they won't use same account address for client creation.

side chat

PR is smol but let me give a side chat. My understanding for nonce is

CreateInbox If the initial_address_signature comes from a Legacy Delegated Account, the Inbox must have been created with nonce 0

AddAssociation If either the existing_member_signature or the new_member_signature is a Legacy Delegated signature the Inbox must have been created with nonce 0.



- If non legacy key is or will be involved, then we can use whatever nonce.

So it seems to me that nonce is primarily for legacy key so that we can verify the one-way relationship from address to inbox Id. Why do we need this & will we still need this after legacy key is fully deprecated?