This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gavofyork
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
D5-nicetohaveaudit ⚠️
PR contains trivial changes to logic that should be properly reviewed.
D9-needsaudit 👮
PR contains changes to fund-managing logic that should be properly reviewed and externally audited
and removed
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
D5-nicetohaveaudit ⚠️
PR contains trivial changes to logic that should be properly reviewed.
labels
Mar 20, 2023
gavofyork
changed the title
Make ED balance of zero work
Make ED of zero (kind of) work
Mar 20, 2023
ggwpez
approved these changes
Mar 20, 2023
sam0x17
approved these changes
Mar 20, 2023
ruseinov
approved these changes
Mar 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just out of curiosity: why not enforce ED > 0 if it’s shooting us in the leg otherwise?
There's at least one team who is unfortunately relying on it. |
Altered the PR to ban an ED of zero unless you enable it with |
@ggwpez could you quickly re-review? |
ggwpez
reviewed
Mar 21, 2023
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Could name the feature |
ggwpez
reviewed
Mar 23, 2023
bot rebase |
Rebased |
breathx
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Apr 22, 2023
* Minimum of 1 for ED * Avoid need for ED to be minimum one * Docs * Ban ED of zero unless feature enabled * use integrity_test * Docs * Cleanup * Update frame/balances/Cargo.toml Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Ensure dodgy code is disabled by default * zero_ed -> insecure_zero_ed --------- Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
louismerlin
added
D1-audited 👍
PR contains changes to fund-managing logic that has been properly reviewed and externally audited
and removed
D9-needsaudit 👮
PR contains changes to fund-managing logic that should be properly reviewed and externally audited
labels
May 4, 2023
This pull request has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/polkadot-release-analysis-v0-9-41-v0-9-42/2828/1 |
15 tasks
nathanwhit
pushed a commit
to nathanwhit/substrate
that referenced
this pull request
Jul 19, 2023
* Minimum of 1 for ED * Avoid need for ED to be minimum one * Docs * Ban ED of zero unless feature enabled * use integrity_test * Docs * Cleanup * Update frame/balances/Cargo.toml Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/balances/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Ensure dodgy code is disabled by default * zero_ed -> insecure_zero_ed --------- Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D1-audited 👍
PR contains changes to fund-managing logic that has been properly reviewed and externally audited
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make things work when existential deposit is zero. Note this means that once an account has a balance at all it will always have a provider, so naturally represents an account spam vector.
The problem of having an ED of zero is that the balances provider "always" exists because the account begins with a balance which satisfies
>= ED
. Therefore it never actually increments the provider ref, assuming it has already been incremented at some point in the past when the balance became>= ED
.So now we increment it either when it becomes newly
>= ED
or when it should already be incremented but there are zero provider refs.When
ED > 0
, the latter condition can never be true since if balance>= ED
is satisfied there will already be a provider ref in place.