Re: [bitcoin-dev] BIP proposal: No chaining off replaceable transactions

2017-07-02 Thread James Hilliard via bitcoin-dev
This seems like something that might be better dealt with by modifying
the RBF eviction policy to calculate feerate separation between the
transactions in the mempool and opportunistically evict the sweep
transaction+parent if it has a sufficiently different feerate from the
bumped fee replacement. Basically you allow the fee bumped replacement
to evict the sweep transaction+parent if there is more than 1MB of
transactions(or whatever the block size/weight limit is) of
transactions between the sweep transaction+parent feerate and bumped
fee replacement feerate. This way the sweep transaction parent only
gets replaced if it is unlikely that miners would ever produce a block
template with transactions at the sweep transaction+parent feerate at
the same time as the replacement transaction feerate. From the miners
point of view this give a higher fee block template overall since it
would be unlikely that one would see transactions with the feerate of
both the CPFP sweep and the replacement parent in the same block
template.

On Sun, Jul 2, 2017 at 10:02 PM, Rhavar via bitcoin-dev
 wrote:
> Perhaps I am not following what you"re saying here.
>
> If the receiver is paying a higher feerate than your replacement,
> he"ll get it confirmed as fast or faster than your replacement in any
> case.
>
>
> It actually doesn't really matter much.
>
> Let's say I want to pay Alice and Bob (unrelated entities), so I send it to
> them (together) with a low-fee transaction of paying 50 sat/byte. After an
> hour it's obvious that it's not confirmed (maybe there was a big backlog, or
> no blocks mined), so I want to replace my small transaction with one that
> pays 70 sat/byte.
>
> But in the mean time, Alice has swept her wallet (or used a service that has
> done so) and generated 50KB of descendant transactions paying 40 sat/byte
> (i.e. total fees of 0.02 BTC or $50).
>
> According to the BIP125 rules, I would need to pay for the cost of
> invalidating all the transactions (an absolute higher amount of fee) along
> with the replay cost of the descendant transactions.
>
> So in this case, for me to fee bump the transaction I'm looking at throwing
> away $50 because of descendant transactions that were totally out of my
> control.  If I don't fee bump, I violate my promise to Bob to pay in a
> timely manner (and also probably Alice, as it wasn't in her control she was
> using an exchange that did this).
>
> If I guarantee to fee bump, the amount I risk is effectively unbounded. And
> even if the descendant transactions have a higher fee rate, and are
> assisting by CPFP boosting my transaction -- it very well might not be
> enough.
>
> --
>
> The idea of this proposal comes from the problems *in practice* of trying to
> low-ball fee estimation with scheduled continuous fee bumps until it
> confirms. At the moment it's not viable, but if this proposal was adopted
> then it would be.
>
> Personally I think it's of critical piece of having a stable fee market. Fee
> estimation is a fools game, even the new and improved fee estimation in
> master today was suggesting x30 fees to what was required (and I
> successfully made transactions with). People (and especially services) being
> able to be able to dynamically increase their fees sanely when dealing with
> withdrawals (and especially batched ones) will go a long way to helping the
> overall ecosystem.
>
>
> -Ryan
>
>
>  Original Message 
> Subject: Re: [bitcoin-dev] BIP proposal: No chaining off replaceable
> transactions
> Local Time: July 2, 2017 9:28 PM
> UTC Time: July 3, 2017 2:28 AM
> From: g...@xiph.org
> To: Rhavar 
> bitcoin-dev@lists.linuxfoundation.org
> 
>
> On Sun, Jul 2, 2017 at 9:01 PM, Rhavar  wrote:
>> That"s not really realistic. In practice some receivers do big sweeps and
>> include unconfirmed inputs. Replacing the transaction means you need to
>> pay
>> the cost of the sweep, which you probably don"t want to do (can be in the
>> order of $100s of dollars).
>
> Perhaps I am not following what you"re saying here.
>
> If the receiver is paying a higher feerate than your replacement,
> he"ll get it confirmed as fast or faster than your replacement in any
> case.
>
>
>
> ___
> 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] BIP proposal: No chaining off replaceable transactions

2017-07-02 Thread Rhavar via bitcoin-dev
> Perhaps I am not following what you"re saying here.
> If the receiver is paying a higher feerate than your replacement,
> he"ll get it confirmed as fast or faster than your replacement in any
> case.

It actually doesn't really matter much.
Let's say I want to pay Alice and Bob (unrelated entities), so I send it to 
them (together) with a low-fee transaction of paying 50 sat/byte. After an hour 
it's obvious that it's not confirmed (maybe there was a big backlog, or no 
blocks mined), so I want to replace my small transaction with one that pays 70 
sat/byte.
But in the mean time, Alice has swept her wallet (or used a service that has 
done so) and generated 50KB of descendant transactions paying 40 sat/byte (i.e. 
total fees of 0.02 BTC or $50).
According to the BIP125 rules, I would need to pay for the cost of invalidating 
all the transactions (an absolute higher amount of fee) along with the replay 
cost of the descendant transactions.
So in this case, for me to fee bump the transaction I'm looking at throwing 
away $50 because of descendant transactions that were totally out of my 
control. If I don't fee bump, I violate my promise to Bob to pay in a timely 
manner (and also probably Alice, as it wasn't in her control she was using an 
exchange that did this).
If I guarantee to fee bump, the amount I risk is effectively unbounded. And 
even if the descendant transactions have a higher fee rate, and are assisting 
by CPFP boosting my transaction -- it very well might not be enough.
--
The idea of this proposal comes from the problems *in practice* of trying to 
low-ball fee estimation with scheduled continuous fee bumps until it confirms. 
At the moment it's not viable, but if this proposal was adopted then it would 
be.
Personally I think it's of critical piece of having a stable fee market. Fee 
estimation is a fools game, even the new and improved fee estimation in master 
today was suggesting x30 fees to what was required (and I successfully made 
transactions with). People (and especially services) being able to be able to 
dynamically increase their fees sanely when dealing with withdrawals (and 
especially batched ones) will go a long way to helping the overall ecosystem.

-Ryan

>  Original Message 
> Subject: Re: [bitcoin-dev] BIP proposal: No chaining off replaceable 
> transactions
> Local Time: July 2, 2017 9:28 PM
> UTC Time: July 3, 2017 2:28 AM
> From: g...@xiph.org
> To: Rhavar 
> bitcoin-dev@lists.linuxfoundation.org 
> On Sun, Jul 2, 2017 at 9:01 PM, Rhavar  wrote:
>> That"s not really realistic. In practice some receivers do big sweeps and
>> include unconfirmed inputs. Replacing the transaction means you need to pay
>> the cost of the sweep, which you probably don"t want to do (can be in the
>> order of $100s of dollars).
> Perhaps I am not following what you"re saying here.
> If the receiver is paying a higher feerate than your replacement,
> he"ll get it confirmed as fast or faster than your replacement in any
> case.___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


Re: [bitcoin-dev] BIP proposal: No chaining off replaceable transactions

2017-07-02 Thread Gregory Maxwell via bitcoin-dev
On Sun, Jul 2, 2017 at 9:01 PM, Rhavar  wrote:
> That's not really realistic. In practice some receivers do big sweeps and
> include unconfirmed inputs. Replacing the transaction means you need to pay
> the cost of the sweep, which you probably don't want to do (can be in the
> order of $100s of dollars).

Perhaps I am not following what you're saying here.

If the receiver is paying a higher feerate than your replacement,
he'll get it confirmed as fast or faster than your replacement in any
case.
___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


Re: [bitcoin-dev] BIP: OP_BRIBVERIFY - the op code needed for Blind Merge Mined drivechains

2017-07-02 Thread Paul Sztorc via bitcoin-dev
Hi,

Sorry for the delay, I overlooked this email until now. I see that Chris
and CryptAxe both answered but I will also answer, because the message
was addressed to me.

On 6/30/2017 12:00 AM, ZmnSCPxj wrote:
> >Your way is actually very similar to mine. Mine _forces_ the bribe to be
> >in the earliest txn (the coinbase) and to only occur once. Yours doesn"t
> >do anything to refund the briber, if the sidechain (but not the
> >mainchain) reorganizes (as it can easily do, if an older sidechain
> >parent is extended while the mainchain proceeds normally). This creates
> >additional risk.
>
> I don't understand this part.  In my scheme, a sidechain cannot
> reorganize unless the mainchain reorganizes, since the consensus loop
> only cares about matching the current block; it ignores splits and
> does not consider them valid.

If I've understood you correctly, you have said that each OP Return
links the (ex)-latest block to a brand new block, and that whichever
message of this kind comes first (in the mainchain) wins and the rest
are discarded.

So what if I had a sidechain represented by a jumble of capital letters,
discarded entries as lowercase letters.

Mainchain Block #21:  [0 --> Q], [0 -->v], [0 -->s], [0 -->b],
Mainchain Block #22:  [Q --> H], [Q --> z],
Mainchain Block #23:  [H --> F]
Mainchain Block #24:  [F --> J], [F -->w]
Mainchain Block #25:  [H --> P], [J -->x]
Mainchain Block #26:  [P --> D]

Isn't the chain {{ Q --> H --> F --> J  }} now starting to reorg, with a
competing chain {{ Q --> H --> P --> D  }} ?

> But I suppose you are considering something like the Ethereum
> mutability feature, which I do not think is something you would want
> in a sidechain.

What I do want to do, is retain the existing model to some extent.
Specifically, to the degree where sidechains could salvage some bad
situations (eg value overflow incident, or March 2013 incident).

> >I think mine is also much more space-efficient. Even if ours each had
> >exactly one h* per sidechain per block, it seems that I only require one
> >hash to be communicated (plus an indicator byte, and a ~2 byte counter
> >for the ratchet), whereas you require two. Since its overhead per
> >sidechain per block, it actually might really add up.
>
> Do you not provide a single sidechain's h* twice in the block?  Once
> in the coinbase and once in the briber's separate transaction?
That is a good point. Technically, we do include it twice, but the
second instance (briber-transaction) can be "shuffled" out if the
counterparties are part of the same Lightning Network (which I expect to
the be the case, in equilibrium).

>
> In my scheme at least there is no indicator byte -- the "previous
> block" hash is the indicator of which sidechain it is extending.  From
> your other emails on this list, it seems the ratchet is for
> withdrawals from sidechain to mainchain?  If so, should it not only
> appear in only some of the sidechains (the ones which are currently
> doing some withdrawal?)?

No, sorry. There are many tangled issues (Drivechain (total system);
side-to-main withdrawals (OP CountACKs); individual Drivechains
themselves; Blind Merged Mining (OP BribeVerify)). The ratchet is not
about withdrawals, it is exclusively about Blind Merged Mining, and
making a better OP BribeVerify that offers better guarantees to both sides.

Paul

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


Re: [bitcoin-dev] BIP proposal: No chaining off replaceable transactions

2017-07-02 Thread Luke Dashjr via bitcoin-dev
This isn't BIP material, as it merely describes a local policy.

(BIP125 itself is also local policy, but one that involves standardisation 
since it expresses how wallets interoperate with nodes with that policy.)

If you wish to suggest this policy change, you should just implement it and 
open a merge/pull request on the applicable project.

Luke


On Sunday 02 July 2017 8:35:22 PM Rhavar via bitcoin-dev wrote:
> ==Abstract==
> BIP125 allows transactions to opt into replaceability with a primary use
> case of allowing users to increase the fees of unconfirming transactions,
> helping create a more efficient fee market place.
> However this goal is hindered when the receiver of a transaction spends
> from the unconfirmed output, which exposes the sender to the awkward
> position of needing to pick between needing to pay an effectively
> unbounded amount of money as per the BIP125 rules, or not fee bump at all.
> This is especially problematic in the case of batched sends in which there
> are multiple independent receivers. In practice this means wallets and
> services can not effectively low ball the fee of transactions, with the
> intention of fee bumping due to the risk of the receiver spending or
> sweeping it before it confirms. In order to support a healthy fee
> marketplace, this proposal aims to increase the utility of bip125 by
> making transactions that spend an unconfirmed BIP125 output non-standard.
> ==Summary==
> This policy specifies a max chain depth of 1 for any BIP125 transactions.
> ==Impact==
> Receivers of BIP125 transactions will need to wait until the transaction
> has confirmed before spending from it. This will not be significantly
> different than it is currently as they receivers need to be monitoring for
> replacements. If senders want to make further transactions before the
> BIP125 transaction confirms, and need to utilize the change of the
> transaction: they will need to replace the transaction with a one that
> makes the other send in "pass through" style or first finalize the BIP125
> transaction and then chain from the spend normally.
> 
> -Ryan
___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


Re: [bitcoin-dev] BIP proposal: No chaining off replaceable transactions

2017-07-02 Thread Rhavar via bitcoin-dev
> I don"t really see how this is desirable: Just replace it-
That's not really realistic. In practice some receivers do big sweeps and 
include unconfirmed inputs. Replacing the transaction means you need to pay the 
cost of the sweep, which you probably don't want to do (can be in the order of 
$100s of dollars).
> Beyond being paternalistic the issue I see with your proposal is thatits 
> contrary to miner income
This applies to pretty much all non-standard transactions.

-Ryan

>  Original Message 
> Subject: Re: [bitcoin-dev] BIP proposal: No chaining off replaceable 
> transactions
> Local Time: July 2, 2017 3:56 PM
> UTC Time: July 2, 2017 8:56 PM
> From: g...@xiph.org
> To: Rhavar 
> bitcoin-dev@lists.linuxfoundation.org 
> On Sun, Jul 2, 2017 at 8:35 PM, Rhavar via bitcoin-dev
>  wrote:
>> ==Abstract==
>>
>> BIP125 allows transactions to opt into replaceability with a primary use
>> case
>> of allowing users to increase the fees of unconfirming transactions, helping
>> create
>> a more efficient fee market place.
> I don"t really see how this is desirable: Just replace it-- the
> receiver foolishly spent it at its own peril, spending a unconfirmed
> payment from a third party is something that Core never does, it"s
> reckless unless you"re doing something like CPFPing it to yourself,
> which is harmless (either it"ll work, or it"ll fail and you"ll be fine
> with that).
> Beyond being paternalistic the issue I see with your proposal is that
> its contrary to miner income-- you"re asking miners to ignore these
> spends that otherwise they could accept. This seems unstable-- some
> people would ignore your rule even if it were otherwise widely
> adopted, leading to the network behavior having higher volatility.
> Instead, perhaps a BIP that very strongly advises parties to not spend
> unconfirmed outputs from third parties while making a payment to third
> parties would achieve your end?___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


Re: [bitcoin-dev] BIP proposal: No chaining off replaceable transactions

2017-07-02 Thread Gregory Maxwell via bitcoin-dev
On Sun, Jul 2, 2017 at 8:35 PM, Rhavar via bitcoin-dev
 wrote:
> ==Abstract==
>
> BIP125 allows transactions to opt into replaceability with a primary use
> case
> of allowing users to increase the fees of unconfirming transactions, helping
> create
> a more efficient fee market place.

I don't really see how this is desirable:  Just replace it-- the
receiver foolishly spent it at its own peril, spending a unconfirmed
payment from a third party is something that Core never does, it's
reckless unless you're doing something like CPFPing it to yourself,
which is harmless (either it'll work, or it'll fail and you'll be fine
with that).

Beyond being paternalistic the issue I see with your proposal is that
its contrary to miner income-- you're asking miners to ignore these
spends that otherwise they could accept.  This seems unstable-- some
people would ignore your rule even if it were otherwise widely
adopted, leading to the network behavior having higher volatility.

Instead, perhaps a BIP that very strongly advises parties to not spend
unconfirmed outputs from third parties while making a payment to third
parties would achieve your end?
___
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev


[bitcoin-dev] BIP proposal: No chaining off replaceable transactions

2017-07-02 Thread Rhavar via bitcoin-dev
==Abstract==
BIP125 allows transactions to opt into replaceability with a primary use case
of allowing users to increase the fees of unconfirming transactions, helping 
create
a more efficient fee market place.
However this goal is hindered when the receiver of a transaction spends from the
unconfirmed output, which exposes the sender to the awkward position of needing
to pick between needing to pay an effectively unbounded amount of money as per 
the BIP125 rules, or not fee bump at all.
This is especially problematic in the case of batched sends in which there are
multiple independent receivers. In practice this means wallets and services can 
not effectively low ball the fee of transactions, with the intention of fee 
bumping due to the risk of the receiver spending or sweeping it before it 
confirms.
In order to support a healthy fee marketplace, this proposal aims to increase
the utility of bip125 by making transactions that spend an unconfirmed BIP125
output non-standard.
==Summary==
This policy specifies a max chain depth of 1 for any BIP125 transactions.
==Impact==
Receivers of BIP125 transactions will need to wait until the transaction
has confirmed before spending from it. This will not be significantly different
than it is currently as they receivers need to be monitoring for replacements.
If senders want to make further transactions before the BIP125 transaction 
confirms,
and need to utilize the change of the transaction: they will need to replace the
transaction with a one that makes the other send in "pass through" style or 
first
finalize the BIP125 transaction and then chain from the spend normally.

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