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

Feat: account seq #164

Merged
merged 9 commits into from
Jun 5, 2024
Merged

Feat: account seq #164

merged 9 commits into from
Jun 5, 2024

Conversation

gluax
Copy link
Collaborator

@gluax gluax commented May 31, 2024

Motivation

We want to avoid replay attacks.

Explanation of Changes

Add a sequence number. And use it for some messages.

Testing

All tests still pass.

Related PRs and Issues

N/A

@gluax gluax assigned mariocao and gluax and unassigned mariocao May 31, 2024
@gluax gluax requested a review from mariocao May 31, 2024 22:41
@gluax gluax force-pushed the feat/account-seq branch from 11e81d0 to 5199e05 Compare June 4, 2024 21:32
@gluax gluax requested review from mariocao and FranklinWaller June 4, 2024 21:49
Copy link
Member

@mariocao mariocao left a comment

Choose a reason for hiding this comment

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

I wanted also to discuss if it makes sense to add the sequence number to all execute messages or only to the unstake and withdraw (which are the sensitive methods). I was updating the overlay and it felt weird that we only increase the sequence number on only 2 functions.

Also, we could remove the unregister for whenever you withdraw and your funds are equal to zero. We could even unify the register and increase stake to simply stake(public_key, amount, memo).

What are your opinions @gluax and @FranklinWaller ?

@gluax gluax force-pushed the feat/account-seq branch from 08169a5 to 569e2ff Compare June 5, 2024 14:26
@gluax gluax requested a review from mariocao June 5, 2024 15:58
@gluax gluax merged commit 38e1269 into main Jun 5, 2024
2 checks passed
@gluax gluax deleted the feat/account-seq branch June 5, 2024 17:07
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