Difference between revisions of "Protocol"
Line 41: | Line 41: | ||
This means that miners must be aware of the actions being taken by the rest of the network lest they find themselves rejecting transactions or blocks that a majority of the network is accepting and become stuck on a non-productive chain-tip while the remainder of the network move forward. | This means that miners must be aware of the actions being taken by the rest of the network lest they find themselves rejecting transactions or blocks that a majority of the network is accepting and become stuck on a non-productive chain-tip while the remainder of the network move forward. | ||
− | ===Local | + | ===Local rules=== |
− | These | + | These rules are “local” by definition. They apply to the instance of software that is running, they do not apply to the validation of blocks, or the transactions within a block. A block accepted from another miner may contain transactions that do not conform to local rules. |
− | Local | + | Local rules include: |
*The “minimum fee” rule, which specifies that the node will only accept and/or relay unconfirmed transactions that pay above a certain fee | *The “minimum fee” rule, which specifies that the node will only accept and/or relay unconfirmed transactions that pay above a certain fee | ||
*Dust rules which specify the smallest value output a transaction can contain that the node will accept and/or relay | *Dust rules which specify the smallest value output a transaction can contain that the node will accept and/or relay |
Revision as of 10:36, 12 February 2020
Bitcoin Protocol Rules
The rules of the Bitcoin protocol are the rules that precisely define the Bitcoin system.
There are different classes of rule in the Bitcoin system including:
- Immutable rules
- Mutable rules
- Local Policies
- Standard Policies
- Communication rules
Immutable Rules
The immutable rules are codified into bitcoin node clients and must be strictly adhered to in order to implement the Bitcoin specification in software [1]. They are a set of rules that define the format and constraints that transactions and blocks must follow. Changes to these rules require a hard fork to the network which can result in a ledger duplication in cases where miners try to enforce changes that change the nature of Bitcoin.
These include:
- The sum of the value of the inputs of a transaction must be greater than or equal to the sum of the values of the outputs
- The block subsidy will drop by half at a scheduled rate of every 210,000 blocks, starting with a subsidy of 5,000,000,000 satoshis from the genesis block
- The network will adjust the target for the difficulty of the Proof of Work needed for a valid block to maintain an approximate 10 minute block discovery rate
- Only blocks that add to the block chain formed by building upon the Genesis block are valid
- The structure of the Bitcoin database as a timestamp server validating chains of digital signatures
- Transactions data formatting, including sizes of certain fields and their encoding schema
- Block structure and header information including sizes of certain fields and their encoding schema
- The Bitcoin scripting language and its specification including:
- Lists of opcodes that are usable in script and the exact outcome of their execution
Forced changes to these protocol rules in the past have resulted in network splits and duplication of the Bitcoin database which created BTC which removed the requirement for Bitcoin to be a chain of digital signatures, and BCH which modified the timestamping aspect of the system.
The Bitcoin SV philosophy is that where aspects of these rules have been changed in the past they should be returned to be as close to the original rules as possible and then “set in stone”, will no further changes allowed enforced through Nakamoto Consensus.
Mutable Rules
Mutable rules are consensus rules that mining clients implement but which are not hard coded into the BitcoinSV node client. Miners can change these at any time provided there is enough agreement among miners to do so under Nakamoto consensus. Miners who do not maintain these settings in-line with the rest of the network risk having their blocks invalidated. Examples of these include:
- The maximum transaction memory usage rule which governs how much memory a transaction can consume during the execution of its script
- The maximum block-size rule
- Transaction script rules such as the rule preventing the use of opcodes other than pushdata in ScriptSig
It is important to note that these rules can be violated in special cases by miners through a negotiation process that ends with a transaction or block that violates these rules being accepted and built upon. This can only be achieved through Nakamoto consensus. No examples of this happening have yet been encountered.
When modifying these rules, miners tend to act as a collective, changing a particular rule all at once (e.g. maximum transaction memory limits and maximum block size). Since the Genesis upgrade, these changes no longer require hard forks or scheduled network upgrades, and the settings that govern these changes available to miners through node client configuration tools. All that is required is a loose agreement between miners to change the settings across the network at a particular date and time.
This means that miners must be aware of the actions being taken by the rest of the network lest they find themselves rejecting transactions or blocks that a majority of the network is accepting and become stuck on a non-productive chain-tip while the remainder of the network move forward.
Local rules
These rules are “local” by definition. They apply to the instance of software that is running, they do not apply to the validation of blocks, or the transactions within a block. A block accepted from another miner may contain transactions that do not conform to local rules. Local rules include:
- The “minimum fee” rule, which specifies that the node will only accept and/or relay unconfirmed transactions that pay above a certain fee
- Dust rules which specify the smallest value output a transaction can contain that the node will accept and/or relay
- Rules relating to inbound and outbound connections on the network such as RPC responses, specific IP addresses to connect to and more.
Standard Policies
Common local policies that are used by a significant proportion of network nodes. They are defined as a "Standard" to facilitate common application across independent software implementations but it is important to note that it is not required that software implement or adhere to these policies. Generally these policies are common sets of local rules that have been set by a majority of miners.
Communication Rules
The communication rules govern how transaction and block data is propagates across the Bitcoin core network. Commonly referred to as the Bitcoin Peer-To-Peer (P2P) Protocol, this current version is well defined method and used by the majority of Bitcoin nodes in the core network to communicate. The P2P Protocol can be changes and there are plans among miners to modify the implementation in future. It is conceivable that at a certain point, several different inter-node communications protocols may be in-use to propagate block and transaction information between miners, and optimising this aspect of the network is strongly incentivised by the economics of Bitcoin mining. A large amount of the innovation that scales Bitcoin SV has been, and will in future be done by improving the P2P protocol.
See Also
References
[1] - https://github.com/bitcoin-sv-specs/protocol/blob/master/updates/genesis-spec.md