public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev] Weak block thoughts...
@ 2015-09-23 15:43 Gavin Andresen
  2015-09-23 16:07 ` Bryan Bishop
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Gavin Andresen @ 2015-09-23 15:43 UTC (permalink / raw)
  To: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 2311 bytes --]

I've been thinking about 'weak blocks' and SPV mining, and it seems to me
weak blocks will make things better, not worse, if we improve the mining
code a little bit.

First:  the idea of 'weak blocks' (hat tip to Rusty for the term) is for
miners to pre-announce blocks that they're working on, before they've
solved the proof-of-work puzzle. To prevent DoS attacks, assume that some
amount of proof-of-work is done (hence the term 'weak block') to rate-limit
how many 'weak block' messages are relayed across the network.


Today, miners are incentivized to start mining an empty block as soon as
they see a block with valid proof-of-work, because they want to spend as
little time as possible mining a not-best chain.

Imagine miners always pre-announce the blocks they're working on to their
peers, and peers validate those 'weak blocks' as quickly as they are able.

Because weak blocks are pre-validated, when a full-difficulty block based
on a previously announced weak block is found, block propagation should be
insanely fast-- basically, as fast as a single packet can be relayed across
the network the whole network could be mining on the new block.

I don't see any barrier to making accepting the full-difficulty block and
CreateNewBlock() insanely fast, and if those operations take just a
microsecond or three, miners will have an incentive to create blocks with
fee-paying transactions that weren't in the last block, rather than mining
empty blocks.

.................

A miner could try to avoid validation work by just taking a weak block
announced by somebody else, replacing the coinbase and re-computing the
merkle root, and then mining. They will be at a slight disadvantage to
fully validating miners, though, because they WOULD have to mine empty
blocks between the time a full block is found and a fully-validating miner
announced their next weak block.

.................

Weak block announcements are great for the network; they give transaction
creators a pretty good idea of whether or not their transactions are likely
to be confirmed in the next block. And if we're smart about implementing
them, they shouldn't increase bandwidth or CPU usage significantly, because
all the weak blocks at a given point in time are likely to contain the same
transactions.

-- 
--
Gavin Andresen

[-- Attachment #2: Type: text/html, Size: 2746 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-09-28 13:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-23 15:43 [bitcoin-dev] Weak block thoughts Gavin Andresen
2015-09-23 16:07 ` Bryan Bishop
2015-09-23 19:24   ` Gregory Maxwell
2015-09-23 21:37     ` Gavin Andresen
2015-09-23 22:16       ` Jonathan Toomim (Toomim Bros)
2015-09-24  1:11       ` Rusty Russell
2015-09-27  1:39       ` Gregory Maxwell
2015-09-27  9:42         ` Tier Nolan
2015-09-27 15:10           ` Kalle Rosenbaum
2015-09-27 19:50             ` Gregory Maxwell
2015-09-28  8:30               ` Kalle Rosenbaum
2015-09-28 13:30                 ` Jonathan Toomim (Toomim Bros)
2015-09-23 16:07 ` Btc Drak
2015-09-23 16:28 ` Peter R
2015-09-23 17:40   ` Gavin
2015-09-23 17:49     ` Peter R
2015-09-23 18:48 ` Tier Nolan
2015-09-24  1:32 ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox