Gavin: Head first mining will prevent DoS attacks

Gavin: Head first mining will prevent DoS attacks

Implement " head first mining first mining": propagate the new 80-byte block header across the network as quickly as possible, giving miners the opportunity to start mining an empty block once they know the block header.

Only valid, proof-of-work block headers connected to the longest chain will be relayed, so denial-of-service attacks will not be feasible.

Once the entire block is accepted and verified, miners will switch to mining regular blocks as quickly as possible.

There is a hard-coded 30 second timeout period; if it takes longer than 30 seconds for the entire block to be verified and propagated to the network, or if it is not sent at all, miners will switch back to the last fully verified block to mine a non-empty block.

detail:

New getblocktemplate behavior: getblocktemplate returns an empty (coinbase transaction only) block template between receiving a new block's 'blockheader' message and receiving and validating this 'block' message. Long getblocktemplate connections are terminated when a new best-header is received and when the block is fully validated.

New command line option, -blockheadernotify . Similar to -blocknotify , except that notification is only done when a new most-work-header is accepted.

New P2P message, 'invalidblock'. Similar to the 'block' message, except that when a valid proof-of-work is accepted for an invalid block, these messages are sent to peers, telling them that they should stop mining on this block header.

Only peers that follow the BIP130 'sendheaders' protocol will relay the block headers immediately, and only they will receive the 'invalid block' message. Light clients (SPV) will not have 'sendheaders', so they should not be affected. Older clients that cannot understand these 'invalid block' messages will just ignore it.

Please review the code and discuss test results on github. Debate whether header-first mining is beneficial to the Bitcoin network and should be implemented in the bitcoin-classic software on the slack channel or the #bitcoin-dev IRC channel.

Original: https://github.com/bitcoinclassic/bitcoinclassic/pull/152
By: Gavin Andresen
Translator: Satuoxi
Source (translation): Babbitt Information (http://www.8btc.com/head-first-mining)


<<:  U.S. Congress and Senate push for blockchain technology training

>>:  ICAP, the world's largest trader and broker, announces the use of blockchain technology

Recommend

How to tell the facial features of a man who is lucky for his wife

Although most people are discussing the appearanc...

What are the Yin Xi lines? Do they affect Yin De?

Although most of the wrinkles on the face are bad...

Is it good for a woman to have a mole on the palm of her hand?

For each of us, having moles is a very normal thi...

LCoin: The first Litecoin full node tool written in Node.JS

BCoin Development Team Releases LCoin, Paving the...

The truth behind the process of “decentralization”

Author: HedyBi Generally speaking, the developmen...

What is a truncated nose in face reading?

The nose is the representation of the face. It is...

A tech expert cracked the M1 MacBook Air for mining, and Apple was beaten badly

Author: Liu Yan, Shi Yao Apple M1 MacBook Air can...

How to tell the fortune of children from a woman's face

A woman’s luck with having children can be seen f...

The family fortune is very bad and the family often quarrels with the face

It is not worth quarreling with family members, b...

Tic-tac-toe pattern appears on the palm

Palmistry with Tic Tac Toe Pattern Tic-tac-toe pa...

Six types of palm lines that are destined to be rich

1. With official seal In palmistry, women with th...

What does a beauty mole mean? Where is the best place for a beauty mole to grow?

The concept of beauty mole has been passed down f...

Bai Baihe cheated on her husband. The face of a woman who is prone to cheating

According to the revelations of Zhuo Wei, China&#...