Author

Topic: UTXO Dust (Read 72 times)

legendary
Activity: 2114
Merit: 15144
Fully fledged Merit Cycler - Golden Feather 22-23
January 08, 2022, 05:40:09 AM
#2
Ne approfitto per rilanciare un mio vecchio thread che illustrava il concetto di "Dust attack" e cosa fare quando se ne è vittima:

Dust Attack, what it is, why it is dangerous and how to prevent falling to it

Da non sottovalutare.
legendary
Activity: 3066
Merit: 2595
December 30, 2021, 01:29:28 PM
#1
Sempre ravanando nei sorgenti di bitcoin, ho trovato questo:

nel file  bitcoin/src/policy/policy.cpp  viene definito il concetto di "dust",
ossia di UTXO con un valore cosi' basso che non conviene transare, in quanto
le fee spese per fare la transazione costano piu' del valore dell'UTXO stess.

(Do' per scontato che sappiate cos'e' un UTXO)


    // "Dust" is defined in terms of dustRelayFee,
    // which has units satoshis-per-kilobyte.
    // If you'd pay more in fees than the value of the output
    // to spend something, then we consider it dust.
    // A typical spendable non-segwit txout is 34 bytes big, and will
    // need a CTxIn of at least 148 bytes to spend:
    // so dust is a spendable txout less than
    // 182*dustRelayFee/1000 (in satoshis).
    // 546 satoshis at the default rate of 3000 sat/kvB.
    // A typical spendable segwit P2WPKH txout is 31 bytes big, and will
    // need a CTxIn of at least 67 bytes to spend:
    // so dust is a spendable txout less than
    // 98*dustRelayFee/1000 (in satoshis).
    // 294 satoshis at the default rate of 3000 sat/kvB.


E' ovvio che cosa si intende per "Dust" varia al variare delle fee, e piu' aumentano le fee
piu' sono le UTXO inspendibili, inoltre varia anche dal tipo di transazione usata (segwit o non segwit).

Per puro esercizio ho provato a fare il totale degli UTXO con un contenuto <= 500 sat
un valore che in non segwit non e' spendibile, e in segwit e' veramente poco appetibile spendere.

ecco i risultati al blocco 715471:


tot Num UTXO                              78290328
tot Num UTXO Dust                          1810792
tot % DUST                                    2.31
tot BTC UTXO Dust                       1.57701941


Non mi sembra un problema enorme, ma neppure una cosa da prendere sottogamba,
sono pur sempre un gran numero di UTXO quasi certamente inutili che tutti i wallet si devono sorbire.

E lo vedo anche un modo per spammare la rete ad un costo relativamente basso.

Insomma un parametro sicuramente da tenere monitorato.


Jump to: