Difference between revisions of "MinerID"

Line 14: Line 14:
 
===Definitions===
 
===Definitions===
  
*  MinerId: An ECDSA public key used to by the miner to identify themselves
+
'''MinerId''' - An ECDSA public key used to by the miner to identify themselves
*  VcTx (validity check transaction): A transaction that determines the validity of the minerId based on whether it is unspent (valid) or spent (invalid/revoked)
+
'''VcTx''' - (Validity check transaction) A transaction that determines the validity of the minerId based on whether it is unspent (valid) or spent (invalid/revoked). The VcTx is a feature that allows a miner to instantly revoke their minerId (if the private key is compromised for example). Naively, the miner could add a field in the coinbase document specifying if the minerId is still valid or not. However, by doing that, the miner would have to wait until they mine a block to revoke their minerId key. Using the VcTx, the miner can at any time revoke the validity of their minerId key without needing to generate [[Proof of Work|proof of work]].
 
*  Coinbase document: A formatted data packet in the OP_RETURN (provably unspendable)output in the miner’s [[Coinbase| coinbase transaction]] that includes all of the minerId info
 
*  Coinbase document: A formatted data packet in the OP_RETURN (provably unspendable)output in the miner’s [[Coinbase| coinbase transaction]] that includes all of the minerId info
  

Revision as of 14:30, 7 February 2020

MinerId is a protocol that allows a miner to embed information inside the coinbase transaction of each block won by a particular node to allow all blocks it wins to be associated with an identity.

Description

Currently, Bitcoin miners can embed identity data in the blockchain by using space in the malleable input fields of the coinbase transaction in the blocks that they mine. However, this data is not always accurate and can be forged/spoofed.


The MinerId protocol provides a way of cryptographically identifying miners. A minerId is simply a public key from an ECDSA keypair. These keys are used to sign minerID metadata contained in the OP_RETURN output of the coinbase transaction in a block.

Use of ECDSA cryptography to sign minerId metadata (as opposed to generating unsigned arbitrary data) provides data non-repudiation, linking miner identity to mined blocks in a reliable way.

Whilst the minerId protocol is a useful infrastructure tool for the Bitcoin SV network, minerId is is in no way mandatory. Instead it is a voluntary protocol built on Bitcoin (BSV) and provides a public key infrastructure that miners can use to create additional blockchain-based services.

Definitions

  • MinerId - An ECDSA public key used to by the miner to identify themselves
  • VcTx - (Validity check transaction) A transaction that determines the validity of the minerId based on whether it is unspent (valid) or spent (invalid/revoked). The VcTx is a feature that allows a miner to instantly revoke their minerId (if the private key is compromised for example). Naively, the miner could add a field in the coinbase document specifying if the minerId is still valid or not. However, by doing that, the miner would have to wait until they mine a block to revoke their minerId key. Using the VcTx, the miner can at any time revoke the validity of their minerId key without needing to generate proof of work.
  • Coinbase document: A formatted data packet in the OP_RETURN (provably unspendable)output in the miner’s coinbase transaction that includes all of the minerId info

Security Hardening (Optional)

Ideally, the minerId (by extension the coinbase transaction) should be specific to the block it is in. However, if this were enforced it would create a causality dilemma (chicken/egg scenario) since the header cannot be finalised and signed by the minerId key without the hash of the coinbase transaction which, in turn, cannot be created until the minerId key is finalised.

By making the minerId specific to the block it’s mined in, we effectively bind the signature to the block it’s contained in. Without this binding, a malicious miner could take your entire coinbase document and put it in another block, potentially in a block that damages reputation e.g. by including well known double spends. Because the block height is included in the coinbase document, the malicious miner would effectively have to orphan the block containing the signature they want to reuse (after it is mined) which is of course very expensive. This cost should be enough to make this edge case secure in most cases. However, as miner reputations become more valuable there could possibly be cases where the increased market share that comes from knocking a major miner out of the trusted network and causing them lose access to semi-trusted services has enough upside to justify the cost.

An easy countermeasure to mitigate this is similar to double spend transactions with the “first seen rule”. An attack like this should be fairly easy to detect, especially if there are two competing blocks signed by the same minerId where one includes double spends and the other doesn’t.

If a miner is still not satisfied with the security described above, they can optionally implement either of the following two extension techniques to harden security:

To get around the chicken/egg scenario described above we recalculate the Merkle tree but replace the coinbase hash with the hash of the public key thus ensuring that the header hash will be unique to the miner. Then we include that block header in the minerId extension fields. Recalculating a Merkle tree with a different 1st element is an inexpensive operation. The nonce field is also set to zero.

To more accurately and securely represent who is involved in the mining process, two messages and two signatures may be for the coinbase document. One belonging to the worker machine (hasher), while the other belonging to the block builder/operator (pool master):

Examples

The minerid protocol has been supported by TAAL mining ltd. since 20th December 2019.

See Also

References