Re: [bitcoin-dev] [Lightning-dev] Lightning and other layer 2 projects with multiple RBF policies

2022-02-13 Thread Michael Folkson via bitcoin-dev
Hi Prayank

> 1.Is Lightning Network and a few other layer 2 projects vulnerable to 
> multiple RBF policies being used?

Clearly the security of the Lightning Network and some other Layer 2 projects 
are at least impacted or partly dependent on policy rules in a way that the 
base blockchain/network isn't. As I (and others) have said on many occasions 
ideally this wouldn't be the case but it is best we can do with current 
designs. I (and others) take the view that this is not a reason to abandon 
those designs in the absence of an alternative that offers a strictly superior 
security model. Going back to a model where *all* activity is onchain (or even 
in less trust minimized protocols than Lightning) doesn't seem like the right 
approach to me.

> 2.With recent discussion to change things in default RBF policy used by Core, 
> will we have multiple versions using different policies? Are users and 
> especially miners incentivized to use different versions and policies? Do 
> they have freedom to use different RBF policy?

Without making policy rules effective consensus rules users (including miners) 
are free to run different policy rules. I think it is too early to say what the 
final incentives will be to run the same or differing policies. Research into 
Lightning security is still nascent and we have no idea whether alternative 
Layer 2 projects will thrive and whether they will have the same or conflicting 
security considerations to Lightning. I suspect as with defaults generally most 
users will run whatever the defaults are as they won't care to change them (or 
even be capable of changing them if they are very non-technical). But users who 
have a stake in the security of Lightning (or other Layer 2 projects) will 
clearly want to run whatever policy rules are beneficial to those protocols.

As you know the vast majority of the full nodes on the network currently run 
Bitcoin Core. Whether that will change in future and whether this a good thing 
or not is a whole other discussion. But the reality is that with such strong 
dominance there is the option to set defaults that are widely used. I think if 
certain defaults can bolster the security of Lightning (and possibly other 
Layer 2 projects) at no cost to full node users with no interest in those 
protocols we should discuss what those defaults should be.

> 3.Are the recent improvements suggested for RBF policy only focused on 
> Lightning Network and its security which will anyway remain same or become 
> worse with multiple RBF policies?

I think by nature of the Lightning Network being the most widely adopted Layer 
2 project most of the focus has been on Lightning security. But contributors to 
other Layer 2 projects are free to flag and discuss security considerations 
that aren't Lightning specific.

> Note: Bitcoin Knots policy is fully configurable, even in the GUI - users can 
> readily choose whatever policy *they* want.

The maintainer(s) and contributors to Bitcoin Knots are free to determine what 
default policy rules they want to implement (and make it easier for users to 
change those defaults) in the absence of those policy rules being made 
effective consensus rules. I suspect there would be strong opposition to making 
some policy rules effective consensus rules but we are now venturing again into 
future speculation and none of us have a crystal ball. Certainly if you take 
the view that these policy rules should never be made effective consensus rules 
then the fact there is at least one implementation taking a contrasting 
approach to Core is a good thing.

--
Michael Folkson
Email: michaelfolkson at [protonmail.com](http://protonmail.com/)
Keybase: michaelfolkson
PGP: 43ED C999 9F85 1D40 EAF4 9835 92D6 0159 214C FEE3

--- Original Message ---
On Sunday, February 13th, 2022 at 6:09 AM, Prayank via Lightning-dev 
 wrote:

> Hello World,
>
> There was a discussion about improving fee estimation in Bitcoin Core last 
> year in which 'instagibbs' mentioned that we cannot consider mempool as an 
> orderbook in which which everyone is bidding for block space because nodes 
> can use different relay policies: 
> https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-09-22#706294;
>
> Although I still don't consider fee rates used in last few blocks relevant 
> for fee estimation, it is possible that we have nodes with different relay 
> policies.
>
> Similarly if we have different RBF policies being used by nodes in future, 
> how would this affect the security of lightning network implementations and 
> other layer 2 projects?
>
> Based on the things shared by 'aj' in
> https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019846.html
>  it is possible for an attacker to use a different RBF policy with some 
> nodes, 10% hash power and affect the security of different projects that rely 
> on default RBF policy in latest Bitcoin Core.
>
> There was even a CVE in which RBF policy not being documented 

Re: [bitcoin-dev] A suggestion to periodically destroy (or remove to secondary storage for Archiving reasons) dust, Non-standard UTXOs, and also detected burn

2022-02-13 Thread shymaa arafat via bitcoin-dev
Are you big  Developers aware of what is said in this thread
https://bitcointalk.org/index.php?topic=5385559.new#new
That "Omni" ALT coin, and all Alt coins and new protocols do create such
extensive amount of dust that they are thinking of dividing 1 Satoshi to
fractions or how to accept a UTXO with 0 value
Isn't that almost the definition of non-standard transactions; the famous
2016 email?
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2016-May/012715.html



On Sun, Feb 13, 2022, 13:02 yanmaani--- via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> On 2022-02-07 14:34, Billy Tetrud via bitcoin-dev wrote:
> > I do think that UTXO set size is something that will need to be
> > addressed at some point. I liked the idea of utreexo or some other
> > accumulator as the ultimate solution to this problem.
>
> What about using economic incentives to disincentivize the creation of
> new UTXOs? Currently, the fee is only charged per byte of space. What if
> you instead charged a fee of (bytes*byte_weight +
> net_utxos*utxo_weight)? For example, if utxo_weight=500, then a
> transaction that creates 2 new UTXOs would cost as if it were 1 KB in
> size. And a transaction that consolidated 2 UTXOs into one might even
> get a negative transaction fee (rebate).
>
> Technologically, you'd implement this by lowering the block size cap by
> max(0, net_utxos_created*utxo_weight). That would be a soft fork, if
> maybe a contentious one. It's probably also a good idea to limit it at
> 0, separate from consensus issues, because it means you're not
> guaranteed to get back whatever you put into it.
> ___
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>
___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


Re: [bitcoin-dev] A suggestion to periodically destroy (or remove to secondary storage for Archiving reasons) dust, Non-standard UTXOs, and also detected burn

2022-02-13 Thread yanmaani--- via bitcoin-dev

On 2022-02-07 14:34, Billy Tetrud via bitcoin-dev wrote:

I do think that UTXO set size is something that will need to be
addressed at some point. I liked the idea of utreexo or some other
accumulator as the ultimate solution to this problem.


What about using economic incentives to disincentivize the creation of 
new UTXOs? Currently, the fee is only charged per byte of space. What if 
you instead charged a fee of (bytes*byte_weight + 
net_utxos*utxo_weight)? For example, if utxo_weight=500, then a 
transaction that creates 2 new UTXOs would cost as if it were 1 KB in 
size. And a transaction that consolidated 2 UTXOs into one might even 
get a negative transaction fee (rebate).


Technologically, you'd implement this by lowering the block size cap by 
max(0, net_utxos_created*utxo_weight). That would be a soft fork, if 
maybe a contentious one. It's probably also a good idea to limit it at 
0, separate from consensus issues, because it means you're not 
guaranteed to get back whatever you put into it.

___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


Re: [bitcoin-dev] A suggestion to periodically destroy (or remove to secondary storage for Archiving reasons) dust, Non-standard UTXOs, and also detected burn

2022-02-13 Thread shymaa arafat via bitcoin-dev
I just want to add an alarming info to this thread...

*There are at least 5.7m UTXOs≤1000 Sat (~7%), *
*8.04 m ≤1$ (10%), *
*13.5m ≤ 0.0001BTC (17%)*

It seems that bitInfoCharts took my enquiry seriously and added a main link
for dust analysis:
https://bitinfocharts.com/top-100-dustiest-bitcoin-addresses.html
Here, you can see just *the first address contains more than 1.7m dust
UTXOs*
(ins-outs =1,712,706 with a few real UTXOs holding the bulk of 415 BTC)
https://bitinfocharts.com/bitcoin/address/1HckjUpRGcrrRAtFaaCAUaGjsPx9oYmLaZ

»
 That's alarming isn't it?, is it due to the lightning networks protocol or
could be some other weird activity going on?
.
The following address are similar but less severe
~394k UTXOs, 170k, 92k, 10*20k, 4or5 *14k,...etc
add at least 2.7m UTXOs coming from addresses with a higher balance to the
interval numbers here (calculated & mentioned in my previous email)
https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html


I think it seems bitInfoCharts will probably make their own report about it
soon

Regards
Shymaa M. Arafat

On Wed, Feb 9, 2022, 07:19 shymaa arafat  wrote:

> If 1 Sat reached 100$, you may adjust the delete( or call it omitting or
> trimming) threshold, since you will need to acquire decimal places inside
> the Sat variable too ( people may have TXs less than 100$)
>
> -Talking with today's numbers,
> https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html
>
> it is hard to imagine that someone's all holdings in Bitcoin is just ≤1000
> Sat (3.15 m address) or even ≤10,000 Sat (4.1$, with currently 7.6m
> addresses in addition to the 3.15m)
> So we'll just incentivise those people to find a low fee time in say a 6
> month interval and collect those UTXOs into one of at least 5$
> (10.86m≤4.1$) or 1$ (5.248m≤1$) your decision.
>
> -During 4 days after showing the smaller intervals, those ≤1000Sat
> increase by ~2K everyday with total holding increased by 0.01BTC. Addresses
> in millions:
> 3.148, 3.1509, 3.152895, 3.154398
> Total BTC:
> 14.91,14.92,14.93,14.94
>
> -The number of ≤10,000 Sat increases by 4-8 k per day.
> Addresses in millions:
> 7.627477, 7.631436, 7.639287, 7.644925
> Total BTC
> 333.5, 333.63, 333.89, 334.1
>
> -remember that no. of addresses is a lowerbound on no. of UTXOs; ie., the
> real numbers could be even more.
> .
> + There's also non-standard & burned , yes they're about 0.6m UTXOs, but
> they're misleading on the status of the value they hold.
> .
> At the end, I'm just suggesting...
> .
> Regards,
> Shymaa
>
> On Wed, Feb 9, 2022, 00:16  wrote:
>
>> Good Morning,
>>
>> I wish to point out that because fees are variable there is no reason
>> fees could not be less than 1 sat in future if fees climb. You may
>> consider this optimistic but I recall in the first days of Bitcoin when
>> fees were voluntary. It is not unreasonable provided the fungibility
>> (money-like-quality) of Bitcoin is maintained for 1 sat to be worth over
>> $100.00 in the future.
>>
>> KING JAMES HRMH
>> Great British Empire
>>
>> Regards,
>> The Australian
>> LORD HIS EXCELLENCY JAMES HRMH (& HMRH)
>> of Hougun Manor & Glencoe & British Empire
>> MR. Damian A. James Williamson
>> Wills
>>
>> et al.
>>
>>
>> Willtech
>> www.willtech.com.au
>> www.go-overt.com
>> duigco.org DUIGCO API
>> and other projects
>>
>>
>> m. 0487135719
>> f. +61261470192
>>
>>
>> This email does not constitute a general advice. Please disregard this
>> email if misdelivered.
>> --
>> On 2022-02-06 09:39, Pieter Wuille via bitcoin-dev wrote:
>> >> Dear Bitcoin Developers,
>> >
>> >> -When I contacted bitInfoCharts to divide the first interval of
>> >> addresses, they kindly did divided to 3 intervals. From here:
>> >> https://bitinfocharts.com/top-100-richest-bitcoin-addresses.html
>> >> -You can see that there are more than 3.1m addresses holding ≤
>> >> 0.01 BTC (1000 Sat) with total value of 14.9BTC; an average of 473
>> >> Sat per address.
>> >
>> >> -Therefore, a simple solution would be to follow the difficulty
>> >> adjustment idea and just delete all those
>> >
>> > That would be a soft-fork, and arguably could be considered theft.
>> > While commonly (but non universally) implemented standardness rules
>> > may prevent spending them currently, there is no requirement that such
>> > a rule remain in place. Depending on how feerate economics work out in
>> > the future, such outputs may not even remain uneconomical to spend.
>> > Therefore, dropping them entirely from the UTXO set is potentially
>> > destroying potentially useful funds people own.
>> >
>> >> or at least remove them to secondary storage
>> >
>> > Commonly adopted Bitcoin full nodes already have two levels of storage
>> > effectively (disk and in-RAM cache). It may be useful to investigate
>> > using amount as a heuristic about what to keep and how long. IIRC, not
>> > even every full node implementation even uses a UTXO model.
>> >
>> >> for Archiving with extra cost to get 

[bitcoin-dev] Lightning and other layer 2 projects with multiple RBF policies

2022-02-13 Thread Prayank via bitcoin-dev
Hello World,

There was a discussion about improving fee estimation in Bitcoin Core last year 
in which 'instagibbs' mentioned that we cannot consider mempool as an orderbook 
in which which everyone is bidding for block space because nodes can use 
different relay policies: 
https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2021-09-22#706294;

Although I still don't consider fee rates used in last few blocks relevant for 
fee estimation, it is possible that we have nodes with different relay policies.

Similarly if we have different RBF policies being used by nodes in future, how 
would this affect the security of lightning network implementations and other 
layer 2 projects? 

Based on the things shared by 'aj' in 
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/019846.html
 it is possible for an attacker to use a different RBF policy with some nodes, 
10% hash power and affect the security of different projects that rely on 
default RBF policy in latest Bitcoin Core.

There was even a CVE in which RBF policy not being documented according to the 
implementation could affect the security of LN: 
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-May/018893.html

1.Is Lightning Network and a few other layer 2 projects vulnerable to multiple 
RBF policies being used? 

2.With recent discussion to change things in default RBF policy used by Core, 
will we have multiple versions using different policies? Are users and 
especially miners incentivized to use different versions and policies? Do they 
have freedom to use different RBF policy?

3.Are the recent improvements suggested for RBF policy only focused on 
Lightning Network and its security which will anyway remain same or become 
worse with multiple RBF policies?

Note: Bitcoin Knots policy is fully configurable, even in the GUI - users can 
readily choose whatever policy *they* want.

-- 
Prayank

A3B1 E430 2298 178F
___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev