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

Provide timestamps in identity action updates #1073

Merged
merged 18 commits into from
Sep 20, 2024
Merged

Conversation

codabrink
Copy link
Contributor

Addresses #1044

Copy link

graphite-app bot commented Sep 18, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@codabrink codabrink marked this pull request as ready for review September 18, 2024 14:45
@codabrink codabrink requested a review from a team as a code owner September 18, 2024 14:45
Copy link
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

In case you're wondering why we have both a client_timestamp_ns and a server_timestamp_ns, maybe this is a good time to explain. When you create the IdentityUpdate we include a timestamp included the text that gets signed, so that you can do the same action multiple times and get a unique signature. That lets you associate a wallet, revoke it, and then re-associate the same wallet. If two actions have identical signatures, we will reject the second one.

The server_timestamp_ns only comes once you've uploaded the signed request to our nodes.

@codabrink codabrink marked this pull request as draft September 18, 2024 17:10
@codabrink codabrink marked this pull request as ready for review September 18, 2024 19:00
@codabrink codabrink changed the title Provide server timestamps in identity action updates Provide timestamps in identity action updates Sep 19, 2024
members.insert(identifier, new_member);
members
},
members: HashMap::from_iter([(identifier, new_member)]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup

Copy link
Contributor

@neekolas neekolas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up @nplasterer this is going to change the group.members() function to be async, which will need to get updated in iOS and Android.

Copy link
Contributor

@cameronvoell cameronvoell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work here!

@cameronvoell
Copy link
Contributor

cameronvoell commented Sep 19, 2024

#1044 wont be finished until we expose the timestamps for installations in the bindings inbox_state function, but I advise we do that in a follow up PR since changes in here are quite large

this one seem ready to merge 🚀

@codabrink codabrink merged commit 0af80f6 into main Sep 20, 2024
9 checks passed
@codabrink codabrink deleted the coda/member-timestamp branch September 20, 2024 13:52
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