-
Notifications
You must be signed in to change notification settings - Fork 986
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
fix: client side check to prevent threshold=0 on init/update #2747
fix: client side check to prevent threshold=0 on init/update #2747
Conversation
e58987d
to
d002fee
Compare
Thanks for the PR! I think the logic is almost correct, but I would say it better to check if the threshold is |
@Fraccaman I think it's 2 differents issues. Checking if the threshold <= public-keys would not prevent it from begin 0, right ? |
Also, I can see that some of the CI check are not passing. Is it expected, or should I fix them ? (I've fixed the namada-release already, Im not used to Rust - make build works fine locally though) |
to get CI to work, just rebase this branch on
This should solve both the issues, wdyt? |
for |
Hi, looks like this is actually what I am trying to implement in my PR #2677. Sorry, am new to rust and hence taking a little longer. Will try to see I can get this implemented for update-account and currently planning to throw and exception and exit if threshold > num-public-keys is ever detected |
also, please rebase on the latest
|
Am i not supposed to continue working on my fork ? Im not used to open source contributions, so I'd rather not mess up my branche :D |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2747 +/- ##
==========================================
- Coverage 53.95% 53.94% -0.02%
==========================================
Files 308 308
Lines 100018 100042 +24
==========================================
- Hits 53967 53966 -1
- Misses 46051 46076 +25 ☔ View full report in Codecov by Sentry. |
f0e67c4
to
b09e238
Compare
you won't mess it up xd your changes are pretty trivial, you shouldn't run into any conflicts by rebasing. the |
Yeah rebase is already done. Im trying to figure out the NoneZeroU8 change now. But Im not so much of a Rust coder. More into typescript/frontend/react native :D But I'll keep hacking into it (unless you want to handle that your own way 😅 ) |
320f222
to
35d90f5
Compare
Closing this in favor of #3154. |
Adding Client side check to ensure
threshold
> 0 ininit-account
andupdate-account
(alsoinit-validator
)Describe your changes
Accounts (and validator accounts) should not be created/updated with less than 1 as threshold, otherwise this would allow transaction requiring to signature.
Indicate on which release or other PRs this topic is based on
I initially first reported this in #2671.
Checklist before merging to
draft