From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1V1akM-0007S7-FJ for bitcoin-development@lists.sourceforge.net; Tue, 23 Jul 2013 11:27:14 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.160.49 as permitted sender) client-ip=209.85.160.49; envelope-from=tier.nolan@gmail.com; helo=mail-pb0-f49.google.com; Received: from mail-pb0-f49.google.com ([209.85.160.49]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1V1akH-0003UP-FR for bitcoin-development@lists.sourceforge.net; Tue, 23 Jul 2013 11:27:14 +0000 Received: by mail-pb0-f49.google.com with SMTP id jt11so8221477pbb.8 for ; Tue, 23 Jul 2013 04:27:03 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.66.159.105 with SMTP id xb9mr36438315pab.146.1374578823510; Tue, 23 Jul 2013 04:27:03 -0700 (PDT) Received: by 10.70.78.232 with HTTP; Tue, 23 Jul 2013 04:27:03 -0700 (PDT) Date: Tue, 23 Jul 2013 12:27:03 +0100 Message-ID: From: Tier Nolan To: bitcoin-development@lists.sourceforge.net Content-Type: multipart/alternative; boundary=047d7b6d80267dbeca04e22c127f X-Spam-Score: -0.6 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tier.nolan[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1V1akH-0003UP-FR Subject: [Bitcoin-development] Distributing low POW headers X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 11:27:14 -0000 --047d7b6d80267dbeca04e22c127f Content-Type: text/plain; charset=ISO-8859-1 I was thinking about a change to the rules for distinguishing between forks and maybe a BIP.. *Summary* - Low POW headers should be broadcast by the network If a header has more than 1/64 of the POW of a block, it should be broadcast. This provides information on which fork is getting most of the hashing power. - Miners should use the header information to decide on longest chain The fork selection rule for miners should be biased towards staying on the fork that has the most hashing power. This means that they might keep hashing on a fork that is 1-2 blocks shorter. If most miners follow the rule, then it is the best strategy for other miners to also follow this rule. - Advantages This lowers the probability of natural and malicious reversals. *Distributing low POW headers* First block header messages that have more than 1/64 of the standard POW requirements would be forwarded. This means the client needs to maintain a short term view of the entire header tree. if (header extends header tree) { if (header meets full POW) { add to header tree; forward to peers; check if any blocks in storage now extend the header tree } else { if (header meets POW / 64) { forward to peers; } } else { if (header meets POW) { add to orphan header storage } } The storage could be limited and headers could be discarded after a while. This has the extra advantage that it informs clients of forks that are receiving hashing power. This could be linked to a protocol version to prevent disconnects due to invalid header messages. *Determining the longest chain* Each link would get extra credit for headers received. Assume there are 2 forks starting at block A as the fork point. A(63) <- B(72) <- C(37) <- D(58) and A(63) <- B'(6) <- C'(9) <- D'(4) <- E(7) <- F(6) The numbers in brackets are the number of low POW headers received that have those blocks as parent. The new rule is that the POW for a block is equal to POW * (1 + (headers / 16)) Only headers within of the end of the (shorter) chain count. However, in most cases, that doesn't matter since the fork point will act as the start point. As long as miners keep headers for 30-40 blocks, they will likely have all headers back to any reasonable fork point. This means that the top fork is considered longer, since it has much more headers, even though it has 2 less blocks. If 75% of the miners follow this rule, then the top fork will eventually catch up and win, so it is in the interests of the other 25% to follow the rule too. Even if there isn't complete agreement on headers received, the fork that is getting the most hashing will naturally gain most of the headers, so ties will be broken quickly. --047d7b6d80267dbeca04e22c127f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I was thinking about a change to = the rules for distinguishing between forks and maybe a BIP..

<= div>Summary

- Low POW headers should be broa= dcast by the network

If a header has more than 1/64 of the POW of a block, it sho= uld be broadcast.=A0 This provides information on which fork is getting mos= t of the hashing power.

- Miners should use the header in= formation to decide on longest chain

The fork selection rule for miners should be biased towards stayi= ng on the fork that has the most hashing power.

This mean= s that they might keep hashing on a fork that is 1-2 blocks shorter.

If most miners follow the rule, then it is the best strategy for other = miners to also follow this rule.

- Advantages

This= lowers the probability of natural and malicious reversals.

Distributing low POW headers

First = block header messages that have more than 1/64 of the standard POW requirem= ents would be forwarded.

This means the client needs to maintain a short term view of= the entire header tree.

if (header extends header tree) = {
=A0 if (header meets full POW) {
=A0=A0=A0 ad= d to header tree;
=A0=A0=A0 forward to peers;
=A0=A0=A0 check if any= blocks in storage now extend the header tree
=A0 } else {
=A0=A0=A0 if (header meets POW / 64) {
=A0=A0=A0= =A0=A0 forward to peers;
=A0=A0=A0 }
} else {
=A0 if (header = meets POW) {
=A0=A0=A0 add to orphan header storage
=
=A0 }
}

The storage could be limited and headers = could be discarded after a while.

This has the extra advantage that it informs clients of fork= s that are receiving hashing power.

This could be linked = to a protocol version to prevent disconnects due to invalid header messages= .

Determining the longest chain

Each link would get extra credit for headers received.
=
Assume there are 2 forks starting at block A as the fork point.

A(63) <- B(72) <- C(37) <- D(58)

and
A(63) <- B'(6) <- C'(9) <- D'(4) <- E(7) <- F(6= )

The numbers in brackets are the number of low POW heade= rs received that have those blocks as parent.

The new rule is that the POW for a block is equal to

=
POW * (1 + (headers / 16))

Only headers within= <some threshold> of the end of the (shorter) chain count.=A0 However= , in most cases, that doesn't matter since the fork point will act as t= he start point.=A0 As long as miners keep headers for 30-40 blocks, they wi= ll likely have all headers back to any reasonable fork point.

This means that the top fork is considered longer, since it = has much more headers, even though it has 2 less blocks.

= If 75% of the miners follow this rule, then the top fork will eventually=20 catch up and win, so it is in the interests of the other 25% to follow=20 the rule too.

Even if there isn't complete agreement on headers=20 received, the fork that is getting the most hashing will naturally gain=20 most of the headers, so ties will be broken quickly.
--047d7b6d80267dbeca04e22c127f--