This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Conversation
ggwpez
approved these changes
Mar 20, 2023
sam0x17
approved these changes
Mar 20, 2023
ruseinov
approved these changes
Mar 20, 2023
Contributor
ruseinov
left a comment
There was a problem hiding this comment.
looks good, just out of curiosity: why not enforce ED > 0 if it’s shooting us in the leg otherwise?
Member
Author
|
There's at least one team who is unfortunately relying on it. |
Member
Author
|
Altered the PR to ban an ED of zero unless you enable it with |
Member
Author
|
@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>
Contributor
|
Could name the feature |
ggwpez
reviewed
Mar 23, 2023
Member
Author
|
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 <>
|
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 <>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
>= EDor 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>= EDis satisfied there will already be a provider ref in place.