k-nuth / kth

High performance Bitcoin development platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement the Bitcoin-Core and Bitcoin-ABC testing batteries

fpelliccioni opened this issue · comments

Implement the Bitcoin-Core and Bitcoin-ABC testing batteries

GitHub Issue #10

Problem Description

There is a risk that blocks mined by miners could cause a chain split or be orphaned due to being incompatible between node implementations.

From a miner's perspective, even a small risk associated with these incompatibilities can have a large impact on profitability.
This incompatibility risk increases the incentive for miners and pools to all run the same implementation, which greatly reduces node-diversity between miners.

Incompatibilities in consensus, while generally very rare, are possible due to minute differences in the implementation details between nodes.
Generally, these differences are only challenged by uncommon edge-cases within the scripting and validation logic between the nodes.
Since the block template is only lacking the proper work before it is considered valid, nearly all of the possible incompatibilities between block candidates can be detected before any work is ever performed.

This block template validation service (TVS) proposal aims to reduce the risk of the miners creating an invalid block to near-zero by validating the template block against other implementations before any work is performed on the block template.

Value Proposition

This solution will provide the following benefits:

  • reduce the risk of unintentionally mining a block that would cause a network split
  • reduce the financial risk to miners of running different node implementations
  • increase miner confidence in node-diversity
  • alert developers of would-be incompatible blocks

Solution Overview

Implement the Bitcoin-Core, Bitcoin ABC and Bitcoin Unlimited testing batteries.
Adapt Knuth until the tests are run successfully.

Solution Milestones

  1. Analyze the testing batteries provided by Bitcoin Core (BTC), Bitcoin ABC (BCH) and Bitcoin Unlimited (BCH).

  2. Copy the testing scripts.

  3. Run them against Knuth node.

  4. Adapt Knuth to support the failing scripts.

Estimated Relative Complexity

Milestone 1 - 20 / 180 (11%)
Milestone 2 - 20 / 180 (11%)
Milestone 3 - 40 / 180 (22%)
Milestone 4 - 100 / 180 (56%)

Budget

This proposal does not have a minimum starting budget.

Completing this proposal will require approximately 180 hours.
At a rate of 0.5 BCH/hr, the total requested budget for this proposal is 90 BCH.

Funding Address

Funding this proposal may be sponsored by sending Bitcoin Cash to the following address:

1JYDQEjXRVGULbtFuLSqogQgiigT88xppJ
(bitcoincash:qrqxzcnejhel5ndsgukz5sckgr64catwzvw26gf4zc)

Authorization Signature:

The signature is signed with our primary donation address, bitcoincash:qrlgfg2qkj3na2x9k7frvcmv06ljx5xlnuuwx95zfn, which can be found on kth.cash.

The signature message consists of a Bitcoin Signed Message with the following format:

Issue-Number | Issue Title | Funding Address | Estimate Hours | Budget BCH

Notes:

The pre-image includes the concatenation symbol.
Pre-image:

10|Implement the Bitcoin-Core and Bitcoin-ABC testing batteries|1JYDQEjXRVGULbtFuLSqogQgiigT88xppJ|180|90

Signature:

II+bZg3oJ7RrECsWiVRJxjlw9H/jMEVMcW5ndbDEuQRAHpNAt2KJcJZqscwjV/+I7NDK8CJaRhl6HJzv7ryVuyE=