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

RFC: Dust Protection #32

Merged
merged 22 commits into from
Nov 18, 2021
Merged

RFC: Dust Protection #32

merged 22 commits into from
Nov 18, 2021

Conversation

GalRogozinski
Copy link
Contributor

text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
@thibault-martinez thibault-martinez changed the title Dust Protection RFC first commit Dust Protection RFC Dec 10, 2020
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
@Wollac Wollac changed the title Dust Protection RFC RFC: Dust Protection Dec 11, 2020
Gal Rogozinski and others added 4 commits December 14, 2020 12:43
Co-authored-by: Wolfgang Welz <welzwo@gmail.com>
Co-authored-by: Wolfgang Welz <welzwo@gmail.com>
Co-authored-by: Wolfgang Welz <welzwo@gmail.com>
Gal Rogozinski and others added 3 commits December 15, 2020 19:35
Co-authored-by: Andrea V <andreakarimodm@gmail.com>
@Wollac Wollac added discussion needed RFC has pending protocol team discussions testnet ready and removed testnet ready labels Jan 6, 2021
@GalRogozinski GalRogozinski added ready for testnet and removed discussion needed RFC has pending protocol team discussions labels Jan 7, 2021
Copy link
Contributor

@karimodm karimodm left a comment

Choose a reason for hiding this comment

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

I find the pseudo-code really hard to follow! I think it needs to be consistently simplified.

The second option is much more complicated as it introduces a completely new unlock mechanisms and requires the nodes to store the Merkle tree roots indefinitely.


# Unresolved questions
Copy link
Contributor

Choose a reason for hiding this comment

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

This entire section should be gone.

text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
@Wollac
Copy link
Contributor

Wollac commented Jan 12, 2021

I find the pseudo-code really hard to follow! I think it needs to be consistently simplified.

I agree. I was even wondering whether it should be removed completely. During the last few iterations the Validation rules got rather precise and well-defined, so IMHO they are much easier to understand and review than the pseudo code.

@Wollac
Copy link
Contributor

Wollac commented Jan 12, 2021

If we really wanna keep the pseudo code, it must be simplified:
E.g

  • remove if tx not null it is fair to assume this is always given
  • remove the maps and rather write something like "if there is another SigLockedDustAllowanceOutput with address in tx"
  • ...

@Thoralf-M
Copy link
Member

An attacker can send microtransactions to an address with a SigLockedDustAllowanceOutput in order to fill the allowed threshold and block honest senders of microtransactions.

Not only that, the attacker could also make it basically impossible to move all funds from that address if more dust per dust allowance output is allowed than one can have inputs in a single transaction to collect it with the dust allowance output together
Even large dust allowance outputs should not allow more than 100 dust

@GalRogozinski
Copy link
Contributor Author

@Thoralf-M
you have a good point

But maybe the address owner can take funds out in batches?
The idea of increasing the number of outputs so that the address would not be easily blocked for dust recieval.

For example, a service can put 3 Mi and constantly consolidate 100 outputs.

@Thoralf-M
Copy link
Member

But maybe the address owner can take funds out in batches?

@GalRogozinski if an attacker constantly sends new transaction to this address the owner of the address can only move all funds if he does the PoW faster than the attacker or if the attacker stops spamming at some point
If you want to receive more dust on an address you should create multiple dust allowance outputs on it

@Thoralf-M
Copy link
Member

Thoralf-M commented Jan 20, 2021

Reducing the dust per output to 100, independent of the amount of the dust allowance output, also protects in cases where someone with a lot iotas (1 Ti for example) creates a dust allowance output unintentional (unintentional with such a large amount), then an attacker can just spam 100 million dust outputs to this address

@GalRogozinski
Copy link
Contributor Author

Since we have a rule that a single message can't create more than 1 output per address, it means that an attacker will have to create 100 different messages with a signature for each. A sweeper can use 100 inputs with 1 output and 1 signature in a single message. At least from tests on my personal laptop I concluded that the attacker would need to have X20 PoW power to keep up with the sweeper.

I want to point out that the current know flaws with the proposal are discussed here https://hackmd.io/@iota-protocol/S1zFaBCjP (just a draft). In the Chrysalis protocol team we talked about implementing the dust tiers idea later on. The assumption behind the dust tiers solution is that tiny dust is less useful for business purposes than larger dust. Meaning we can be very limiting on small dust outputs, but not so much on larger dust, which will be more expensive to spend in a large scale.

If you want to receive more dust on an address you should create multiple dust allowance outputs on it
I don't understand the difference in security between having more dust allowance outputs or just having one consolidated one

As for the last comment about someone accidentally creating a 1 Ti allowance, I guess it is possible but unlikely...
The default behavior of libs would be to create regular outputs. How often would people do it accidentally? Will it amass to 1 Ti?

The reason to allow more than 100 is to make sure that businesses that want to rely on microtransactions can actually do it w.o having their addresses blocked. From a security perspective, I agree with you.

Co-authored-by: Wolfgang Welz <welzwo@gmail.com>
@Wollac Wollac added deployed on testnet discussion needed RFC has pending protocol team discussions labels Jan 20, 2021
@GalRogozinski
Copy link
Contributor Author

GalRogozinski commented Jan 25, 2021 via email

text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
text/0032-dust-protection/0032-dust-protection.md Outdated Show resolved Hide resolved
Co-authored-by: Wolfgang Welz <welzwo@gmail.com>
Let A be the address that should hold the dust outputs' balances. Let S be the sum of all the amounts of all unspent `SigLockedDustAllowanceOutputs` on A. Then, the maximum number of allowed dust outputs on A is S divided by 100,000 and rounded down, i.e. 10 outputs for each 1 Mi deposited.
However, regardless of S, the number of dust outputs must never exceed 100 per address.

The amount of a `SigLockedDustAllowanceOutput` must be at least 1 Mi. Apart from this, `SigLockedDustAllowanceOutputs` are processed identical to `SigLockedSingleOutput`. The transaction validation as defined in [Draft RFC-18](https://github.com/luca-moser/protocol-rfcs/blob/signed-tx-payload/text/0000-transaction-payload/0000-transaction-payload.md), however, needs to be adapted.
Copy link
Member

Choose a reason for hiding this comment

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

The amount of a SigLockedDustAllowanceOutput must be at least 1 Mi.

This is already said right after in the syntactical validation, bit repetitive.

@Wollac Wollac removed the discussion needed RFC has pending protocol team discussions label Jan 25, 2021
@oopsmonk oopsmonk mentioned this pull request Feb 23, 2021
@Wollac Wollac merged commit aebcbba into iotaledger:master Nov 18, 2021
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.

None yet

7 participants