Discussion:
[bitcoin-dev] Introducing a POW through a soft-fork
Devrandom via bitcoin-dev
2017-11-01 05:48:27 UTC
Permalink
Hi all,

Feedback is welcome on the draft below. In particular, I want to see if
there is interest in further development of the idea and also interested in
any attack vectors or undesirable dynamics.

(Formatted version available here:
https://github.com/devrandom/btc-papers/blob/master/aux-pow.md )

# Soft-fork Introduction of a New POW

## Motivation:

- Mitigate mining centralization pressures by introducing a POW that does
not have economies of scale
- Introduce an intermediary confirmation point, reducing the impact of
mining power fluctuations

Note however that choice of a suitable POW will require deep analysis.
Some pitfalls include: botnet mining, POWs that seem ASIC resistant but are
not, unexpected/covert optimization.

In particular, unexpected/covert optimizations, such as ASCIBOOST, present
a potential centralizing and destabilizing force.

## Design

### Aux POW intermediate block

Auxiliary POW blocks are introduced between normal blocks - i.e. the chain
alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains
transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain all
transactions from the aux-POW block.
Block space is not increased.

The new intermediate block and the pointers are introduced via a soft-fork
restriction.

### Reward for aux POW miners

The reward for the aux POW smoothly increases from zero to a target value
(e.g. 1/2 of the total reward) over time.
The reward is transferred via a soft-fork restriction requiring a coinbase
output to an address published in the
aux-POW block.

### Aux POW difficulty adjustment

Difficulty adjustments remain independent for the two POWs.

The difficulty of the aux POW is adjusted based on the average time between
normal block found
to aux block found.

Further details are dependent on the specific POW.

### Heaviest chain rule change

This is a semi-hard change, because non-upgraded nodes can get on the wrong
chain in case of attack. However,
it might be possible to construct an alert system that notifies
non-upgraded nodes of an upcoming rule change.
All blocks are still valid, so this is not a hardforking change.

The heaviest chain definition changes from sum of `difficulty` to sum of:

mainDifficulty ^ x * auxDifficulty ^ y

where we start at:

x = 1; y = 0

and end at values of x and y that are related to the target relative
rewards. For example, if the target rewards
are equally distributed, we will want ot end up at:

x = 1/2; y = 1/2

so that both POWs have equal weight. If the aux POW is to become dominant,
x should end small relative to y.


## Questions and Answers

- What should be the parameters if we want the aux POW to have equal
weight? A: 1/2 of the reward should be transferred
to aux miners and x = 1/2, y = 1/2.

- What should be the parameters if we want to deprecate the main POW? A:
most of the reward should be transferred to
aux miners and x = 0, y = 1. The main difficulty will tend to zero, and
aux miners will just trivially generate the
main block immediately after finding an aux block, with identical content.

- Wasted bandwidth to transfer transactions twice? A: this can be
optimized by skipping transactions already
transferred.

- Why would miners agree to soft-fork away some of their reward? A: they
would agree if they believe that
the coins will increase in value due to improved security properties.

## Open Questions

- After a block of one type is found, we can naively assume that POW will
become idle while a block of the other type is being mined. In practice,
the spare capacity can be used to find alternative ("attacking") blocks or
mine other coins. Is that a problem?
- Is selfish mining amplified by this scheme for miners that have both
types of hardware?

## POW candidates

- SHA256 (i.e. use same POW, but introduce an intermediate block for faster
confirmation)
- Proof of Space and Time (Bram Cohen)
- Equihash
- Ethash

## Next Steps

- evaluate POW candidates
- evaluate difficulty adjustment rules
- simulate miner behavior to identify if there are incentives for
detrimental behavior patterns (e.g. block withholding / selfish mining)
- Protocol details

## Credits

Bram Cohen came up with a similar idea back in March:
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-March/013744.html
Tao Effect via bitcoin-dev
2017-11-02 23:55:55 UTC
Permalink
Just going to throw in my support for a POW change, not any particular implementation, but the idea.

Bitcoin is technically owned by China now. That's not acceptable.

- Greg

--
Please do not email me anything that you are not comfortable also sharing with the NSA.
Post by Devrandom via bitcoin-dev
Hi all,
Feedback is welcome on the draft below. In particular, I want to see if there is interest in further development of the idea and also interested in any attack vectors or undesirable dynamics.
(Formatted version available here: https://github.com/devrandom/btc-papers/blob/master/aux-pow.md <https://github.com/devrandom/btc-papers/blob/master/aux-pow.md> )
# Soft-fork Introduction of a New POW
- Mitigate mining centralization pressures by introducing a POW that does not have economies of scale
- Introduce an intermediary confirmation point, reducing the impact of mining power fluctuations
Note however that choice of a suitable POW will require deep analysis. Some pitfalls include: botnet mining, POWs that seem ASIC resistant but are not, unexpected/covert optimization.
In particular, unexpected/covert optimizations, such as ASCIBOOST, present a potential centralizing and destabilizing force.
## Design
### Aux POW intermediate block
Auxiliary POW blocks are introduced between normal blocks - i.e. the chain alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain all transactions from the aux-POW block.
Block space is not increased.
The new intermediate block and the pointers are introduced via a soft-fork restriction.
### Reward for aux POW miners
The reward for the aux POW smoothly increases from zero to a target value (e.g. 1/2 of the total reward) over time.
The reward is transferred via a soft-fork restriction requiring a coinbase output to an address published in the
aux-POW block.
### Aux POW difficulty adjustment
Difficulty adjustments remain independent for the two POWs.
The difficulty of the aux POW is adjusted based on the average time between normal block found
to aux block found.
Further details are dependent on the specific POW.
### Heaviest chain rule change
This is a semi-hard change, because non-upgraded nodes can get on the wrong chain in case of attack. However,
it might be possible to construct an alert system that notifies non-upgraded nodes of an upcoming rule change.
All blocks are still valid, so this is not a hardforking change.
mainDifficulty ^ x * auxDifficulty ^ y
x = 1; y = 0
and end at values of x and y that are related to the target relative rewards. For example, if the target rewards
x = 1/2; y = 1/2
so that both POWs have equal weight. If the aux POW is to become dominant, x should end small relative to y.
## Questions and Answers
- What should be the parameters if we want the aux POW to have equal weight? A: 1/2 of the reward should be transferred
to aux miners and x = 1/2, y = 1/2.
- What should be the parameters if we want to deprecate the main POW? A: most of the reward should be transferred to
aux miners and x = 0, y = 1. The main difficulty will tend to zero, and aux miners will just trivially generate the
main block immediately after finding an aux block, with identical content.
- Wasted bandwidth to transfer transactions twice? A: this can be optimized by skipping transactions already
transferred.
- Why would miners agree to soft-fork away some of their reward? A: they would agree if they believe that
the coins will increase in value due to improved security properties.
## Open Questions
- After a block of one type is found, we can naively assume that POW will become idle while a block of the other type is being mined. In practice, the spare capacity can be used to find alternative ("attacking") blocks or mine other coins. Is that a problem?
- Is selfish mining amplified by this scheme for miners that have both types of hardware?
## POW candidates
- SHA256 (i.e. use same POW, but introduce an intermediate block for faster confirmation)
- Proof of Space and Time (Bram Cohen)
- Equihash
- Ethash
## Next Steps
- evaluate POW candidates
- evaluate difficulty adjustment rules
- simulate miner behavior to identify if there are incentives for detrimental behavior patterns (e.g. block withholding / selfish mining)
- Protocol details
## Credits
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-March/013744.html <https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-March/013744.html>_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Devrandom via bitcoin-dev
2017-11-03 01:02:25 UTC
Permalink
I am also concerned. However, this proposal allows two POWs to coexist and
allows for gradual transitions. This is hopefully a less disruptive
approach since it allows cooperative miners to migrate over time. And of
course, as a soft-fork it keeps backwards compatibility with existing
software.
Post by Tao Effect via bitcoin-dev
Just going to throw in my support for a POW change, not any particular
implementation, but the idea.
Bitcoin is technically owned by China now. That's not acceptable.
- Greg
--
Please do not email me anything that you are not comfortable also sharing with the NSA.
On Oct 31, 2017, at 10:48 PM, Devrandom via bitcoin-dev <
Hi all,
Feedback is welcome on the draft below. In particular, I want to see if
there is interest in further development of the idea and also interested in
any attack vectors or undesirable dynamics.
https://github.com/devrandom/btc-papers/blob/master/aux-pow.md )
# Soft-fork Introduction of a New POW
- Mitigate mining centralization pressures by introducing a POW that does
not have economies of scale
- Introduce an intermediary confirmation point, reducing the impact of
mining power fluctuations
Note however that choice of a suitable POW will require deep analysis.
Some pitfalls include: botnet mining, POWs that seem ASIC resistant but are
not, unexpected/covert optimization.
In particular, unexpected/covert optimizations, such as ASCIBOOST, present
a potential centralizing and destabilizing force.
## Design
### Aux POW intermediate block
Auxiliary POW blocks are introduced between normal blocks - i.e. the chain
alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains
transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain
all transactions from the aux-POW block.
Block space is not increased.
The new intermediate block and the pointers are introduced via a soft-fork restriction.
### Reward for aux POW miners
The reward for the aux POW smoothly increases from zero to a target value
(e.g. 1/2 of the total reward) over time.
The reward is transferred via a soft-fork restriction requiring a coinbase
output to an address published in the
aux-POW block.
### Aux POW difficulty adjustment
Difficulty adjustments remain independent for the two POWs.
The difficulty of the aux POW is adjusted based on the average time
between normal block found
to aux block found.
Further details are dependent on the specific POW.
### Heaviest chain rule change
This is a semi-hard change, because non-upgraded nodes can get on the
wrong chain in case of attack. However,
it might be possible to construct an alert system that notifies
non-upgraded nodes of an upcoming rule change.
All blocks are still valid, so this is not a hardforking change.
mainDifficulty ^ x * auxDifficulty ^ y
x = 1; y = 0
and end at values of x and y that are related to the target relative
rewards. For example, if the target rewards
x = 1/2; y = 1/2
so that both POWs have equal weight. If the aux POW is to become
dominant, x should end small relative to y.
## Questions and Answers
- What should be the parameters if we want the aux POW to have equal
weight? A: 1/2 of the reward should be transferred
to aux miners and x = 1/2, y = 1/2.
most of the reward should be transferred to
aux miners and x = 0, y = 1. The main difficulty will tend to zero, and
aux miners will just trivially generate the
main block immediately after finding an aux block, with identical content.
- Wasted bandwidth to transfer transactions twice? A: this can be
optimized by skipping transactions already
transferred.
- Why would miners agree to soft-fork away some of their reward? A: they
would agree if they believe that
the coins will increase in value due to improved security properties.
## Open Questions
- After a block of one type is found, we can naively assume that POW will
become idle while a block of the other type is being mined. In practice,
the spare capacity can be used to find alternative ("attacking") blocks or
mine other coins. Is that a problem?
- Is selfish mining amplified by this scheme for miners that have both types of hardware?
## POW candidates
- SHA256 (i.e. use same POW, but introduce an intermediate block for faster confirmation)
- Proof of Space and Time (Bram Cohen)
- Equihash
- Ethash
## Next Steps
- evaluate POW candidates
- evaluate difficulty adjustment rules
- simulate miner behavior to identify if there are incentives for
detrimental behavior patterns (e.g. block withholding / selfish mining)
- Protocol details
## Credits
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-March/013744.html
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Peter Todd via bitcoin-dev
2017-11-06 19:50:00 UTC
Permalink
On Wed, Nov 01, 2017 at 05:48:27AM +0000, Devrandom via bitcoin-dev wrote:

Some quick thoughts...
Post by Devrandom via bitcoin-dev
Hi all,
Feedback is welcome on the draft below. In particular, I want to see if
there is interest in further development of the idea and also interested in
any attack vectors or undesirable dynamics.
https://github.com/devrandom/btc-papers/blob/master/aux-pow.md )
# Soft-fork Introduction of a New POW
First of all, I don't think you can really call this a soft-fork; I'd call it a
"pseudo-soft-fork"

My reasoning being that after implementation, a chain with less total work than
the main chain - but more total SHA256^2 work than the main chain - might be
followed by non-supporting clients. It's got some properties of a soft-fork,
but it's security model is definitely different.
Post by Devrandom via bitcoin-dev
### Aux POW intermediate block
Auxiliary POW blocks are introduced between normal blocks - i.e. the chain
alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains
transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain all
transactions from the aux-POW block.
Note how you're basically proposing for the block interval to be decreased,
which has security implications due to increased orphan rates.
Post by Devrandom via bitcoin-dev
### Heaviest chain rule change
This is a semi-hard change, because non-upgraded nodes can get on the wrong
chain in case of attack. However,
Exactly! Not really a soft-fork.
--
https://petertodd.org 'peter'[:-1]@petertodd.org
Paul Sztorc via bitcoin-dev
2017-11-06 20:30:30 UTC
Permalink
+1 to all of Peter Todd's comments

On Nov 6, 2017 11:50 AM, "Peter Todd via bitcoin-dev" <
Post by Peter Todd via bitcoin-dev
Some quick thoughts...
Post by Devrandom via bitcoin-dev
Hi all,
Feedback is welcome on the draft below. In particular, I want to see if
there is interest in further development of the idea and also interested
in
Post by Devrandom via bitcoin-dev
any attack vectors or undesirable dynamics.
https://github.com/devrandom/btc-papers/blob/master/aux-pow.md )
# Soft-fork Introduction of a New POW
First of all, I don't think you can really call this a soft-fork; I'd call it a
"pseudo-soft-fork"
My reasoning being that after implementation, a chain with less total work than
the main chain - but more total SHA256^2 work than the main chain - might be
followed by non-supporting clients. It's got some properties of a soft-fork,
but it's security model is definitely different.
Post by Devrandom via bitcoin-dev
### Aux POW intermediate block
Auxiliary POW blocks are introduced between normal blocks - i.e. the
chain
Post by Devrandom via bitcoin-dev
alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains
transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain
all
Post by Devrandom via bitcoin-dev
transactions from the aux-POW block.
Note how you're basically proposing for the block interval to be decreased,
which has security implications due to increased orphan rates.
Post by Devrandom via bitcoin-dev
### Heaviest chain rule change
This is a semi-hard change, because non-upgraded nodes can get on the
wrong
Post by Devrandom via bitcoin-dev
chain in case of attack. However,
Exactly! Not really a soft-fork.
--
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Eric Voskuil via bitcoin-dev
2017-11-06 20:55:29 UTC
Permalink
If a block that would be discarded under previous rules becomes accepted after a rule addition, there is no reason to not simply call the new rule a hard fork. IOW it's perfectly rational to consider a weaker block as "invalid" relative to the strong chain. As such I don't see any reason to qualify the term, it's a hard fork. But Peter's observation (the specific behavior) is ultimately what matters.

e
Post by Paul Sztorc via bitcoin-dev
+1 to all of Peter Todd's comments
Post by Peter Todd via bitcoin-dev
Some quick thoughts...
Post by Devrandom via bitcoin-dev
Hi all,
Feedback is welcome on the draft below. In particular, I want to see if
there is interest in further development of the idea and also interested in
any attack vectors or undesirable dynamics.
https://github.com/devrandom/btc-papers/blob/master/aux-pow.md )
# Soft-fork Introduction of a New POW
First of all, I don't think you can really call this a soft-fork; I'd call it a
"pseudo-soft-fork"
My reasoning being that after implementation, a chain with less total work than
the main chain - but more total SHA256^2 work than the main chain - might be
followed by non-supporting clients. It's got some properties of a soft-fork,
but it's security model is definitely different.
Post by Devrandom via bitcoin-dev
### Aux POW intermediate block
Auxiliary POW blocks are introduced between normal blocks - i.e. the chain
alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains
transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain all
transactions from the aux-POW block.
Note how you're basically proposing for the block interval to be decreased,
which has security implications due to increased orphan rates.
Post by Devrandom via bitcoin-dev
### Heaviest chain rule change
This is a semi-hard change, because non-upgraded nodes can get on the wrong
chain in case of attack. However,
Exactly! Not really a soft-fork.
--
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Devrandom via bitcoin-dev
2017-11-07 04:38:51 UTC
Permalink
A hard-fork is a situation where non-upgraded nodes reject a block mined
and relayed by upgraded nodes. This creates a fork that cannot heal
regardless of what follows.

This proposal is not a hard-fork, because the non-upgraded node *will heal*
if the attack has less than 1/2 of the original-POW power in the long term.

The cost of such an attack is the cost of a normal "51%" attack, multiplied
by the fractional weight of the original POW (e.g. 0.75 or 0.5).

So rather than saying this is a hard-fork, I would say that this is a
soft-fork with reduced security for non-upgraded nodes. I would also say
that the reduction in security is proportional to the reduction in weight
of the original POW at the time of attack.

As mentioned before, the original-POW weight starts at 1.0 and is reduced
over a long period of time. I would set up the transition curve so that
all nodes upgrade by the time the weight is, say, 0.75. In reality, nodes
protecting high economic value would upgrade early.

On Mon, Nov 6, 2017 at 3:55 PM Eric Voskuil via bitcoin-dev <
Post by Eric Voskuil via bitcoin-dev
If a block that would be discarded under previous rules becomes accepted
after a rule addition, there is no reason to not simply call the new rule a
hard fork. IOW it's perfectly rational to consider a weaker block as
"invalid" relative to the strong chain. As such I don't see any reason to
qualify the term, it's a hard fork. But Peter's observation (the specific
behavior) is ultimately what matters.
e
On Nov 6, 2017, at 12:30, Paul Sztorc via bitcoin-dev <
+1 to all of Peter Todd's comments
On Nov 6, 2017 11:50 AM, "Peter Todd via bitcoin-dev" <
Post by Peter Todd via bitcoin-dev
Some quick thoughts...
Post by Devrandom via bitcoin-dev
Hi all,
Feedback is welcome on the draft below. In particular, I want to see if
there is interest in further development of the idea and also
interested in
Post by Devrandom via bitcoin-dev
any attack vectors or undesirable dynamics.
https://github.com/devrandom/btc-papers/blob/master/aux-pow.md )
# Soft-fork Introduction of a New POW
First of all, I don't think you can really call this a soft-fork; I'd call it a
"pseudo-soft-fork"
My reasoning being that after implementation, a chain with less total work than
the main chain - but more total SHA256^2 work than the main chain - might be
followed by non-supporting clients. It's got some properties of a soft-fork,
but it's security model is definitely different.
Post by Devrandom via bitcoin-dev
### Aux POW intermediate block
Auxiliary POW blocks are introduced between normal blocks - i.e. the
chain
Post by Devrandom via bitcoin-dev
alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains
transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain
all
Post by Devrandom via bitcoin-dev
transactions from the aux-POW block.
Note how you're basically proposing for the block interval to be decreased,
which has security implications due to increased orphan rates.
Post by Devrandom via bitcoin-dev
### Heaviest chain rule change
This is a semi-hard change, because non-upgraded nodes can get on the
wrong
Post by Devrandom via bitcoin-dev
chain in case of attack. However,
Exactly! Not really a soft-fork.
--
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Devrandom via bitcoin-dev
2017-11-06 22:39:02 UTC
Permalink
Hi Peter, thank you for the review. See below
Post by Peter Todd via bitcoin-dev
Some quick thoughts...
Post by Devrandom via bitcoin-dev
Hi all,
Feedback is welcome on the draft below. In particular, I want to see if
there is interest in further development of the idea and also interested
in
Post by Devrandom via bitcoin-dev
any attack vectors or undesirable dynamics.
https://github.com/devrandom/btc-papers/blob/master/aux-pow.md )
# Soft-fork Introduction of a New POW
First of all, I don't think you can really call this a soft-fork; I'd call it a
"pseudo-soft-fork"
My reasoning being that after implementation, a chain with less total work than
the main chain - but more total SHA256^2 work than the main chain - might be
followed by non-supporting clients. It's got some properties of a soft-fork,
but it's security model is definitely different.
The interesting thing is that the cost of attack varies smoothly as you
vary the POW weights.
To attack non-upgraded nodes, you still have to "51%" the original POW.
The reward going to that POW will vary smoothly between 1.0 * block_reward
and whatever
target value (e.g. 0.5 * block_reward) and the difficulty of attack will
tend to be proportional to that.

In a real hard-fork, your software just breaks at the fork point. In this
case, it's just the non-upgraded
node security level declining from 100% to 50% over a long period of time.

I envision the transition of POW weights will be over 1-3 years, which
leaves plenty of time to
upgrade after the fork activates.
Post by Peter Todd via bitcoin-dev
Post by Devrandom via bitcoin-dev
### Aux POW intermediate block
Auxiliary POW blocks are introduced between normal blocks - i.e. the
chain
Post by Devrandom via bitcoin-dev
alternates between the two POWs.
Each aux-POW block points to the previous normal block and contains
transactions just like a normal block.
Each normal block points to the previous aux-POW block and must contain
all
Post by Devrandom via bitcoin-dev
transactions from the aux-POW block.
Note how you're basically proposing for the block interval to be decreased,
which has security implications due to increased orphan rates.
Note that the total transaction rate and block size don't materially
change, so I don't
see why the orphan rate will change. Normal blocks are constrained to have
all of the txs of the aux blocks, so propagation time should stay the
same. Am I missing
something?
Post by Peter Todd via bitcoin-dev
Post by Devrandom via bitcoin-dev
### Heaviest chain rule change
This is a semi-hard change, because non-upgraded nodes can get on the
wrong
Post by Devrandom via bitcoin-dev
chain in case of attack. However,
Exactly! Not really a soft-fork.
"smooth-fork" perhaps? :)
Post by Peter Todd via bitcoin-dev
--
Devrandom via bitcoin-dev
2017-11-06 23:38:20 UTC
Permalink
Post by Peter Todd via bitcoin-dev
Note how you're basically proposing for the block interval to be decreased,
Post by Peter Todd via bitcoin-dev
which has security implications due to increased orphan rates.
Note that the total transaction rate and block size don't materially
change, so I don't
see why the orphan rate will change. Normal blocks are constrained to have
all of the txs of the aux blocks, so propagation time should stay the
same. Am I missing
something?
Ah, yes, I'm missing that the expected time to find each type of block is
halved, so the orphan rate doubles.
Loading...