CHIP-2024-08-01: Creating a Subnet on Bitcoin Cash (BCH) Network Using GHOSTDAG Protocol

Status:

Draft

Type:

Standards Track

Layer:

Peer Services

Created:

[Date]


Summary

This proposal introduces a subnet on the Bitcoin Cash (BCH) network leveraging the GHOSTDAG protocol to enhance transaction speeds while maintaining the SHA-256 hashing algorithm. This subnet aims to provide a secure and efficient alternative to Zero-Confirmation Escrows (ZCEs).

Background & Motivation

Bitcoin Cash (BCH) currently employs Zero-Confirmation Escrows (ZCEs) to enable instant payments. While ZCEs are effective, they pose risks such as double-spending. The GHOSTDAG protocol, pioneered by Kaspa, addresses these issues by allowing parallel block creation and processing, significantly enhancing transaction throughput and reducing confirmation times without sacrificing security oai_citation:1,Kaspa Achieves 10 BPS in Testnet, Sets a New Benchmark in Cryptocurrency - Kaspa oai_citation:2,What is GHOSTDAG and DAGKNIGHT? - Kaspa oai_citation:3,Introducing Kaspa and Its GhostDAG Protocol.

Deployment

Deployment of this specification does not require network coordination. Sufficient deployment, as per the payee's risk profile, is required before GHOSTDAG-secured transactions can be safely accepted as final.

Specification

  1. Integration of GHOSTDAG Protocol:

    • Implement the GHOSTDAG protocol to support high transaction throughput in a Directed Acyclic Graph (DAG) structure.
    • Optimize for low latency, achieving transaction confirmation times within seconds.
  2. Retain SHA-256 Hashing Algorithm:

    • Maintain the use of SHA-256 for compatibility with existing BCH mining hardware and to ensure network security.
  3. Subnet Development:

    • Develop a dedicated subnet within the BCH network for running GHOSTDAG.
    • Implement interoperability mechanisms for smooth transaction transfers between the BCH mainnet and the GHOSTDAG subnet.
  4. Testing and Deployment:

    • Utilize a simulation framework to test the GHOSTDAG implementation under various conditions.
    • Conduct extensive testing followed by a phased rollout to the BCH community.

Benefits

  1. Faster Transactions: Near-instant transaction confirmation times.
  2. Enhanced Security: Reduced risk of double-spending compared to current ZCEs.
  3. Compatibility: Continued use of SHA-256 ensures compatibility with existing BCH infrastructure.

Costs & Risk Mitigation

  1. Increased Transaction Sizes: Slight increase in transaction size due to additional GHOSTDAG data.
  2. Modification to Transaction Acceptance/Relay: Changes to transaction relay policies might affect existing zero-confirmation transaction users.
  3. Node Implementation Complexity: Specialized transaction relay and mining policies might increase the cost and complexity of node implementations.

Reference Implementation

Source Code

```python

GHOSTDAG Network Simulation

import networkx as nx import matplotlib.pyplot as plt

Create a directed graph

G = nx.DiGraph()

Add nodes

G.add_nodes_from([1, 2, 3, 4, 5])

Add edges

G.add_edges_from([(1, 2), (2, 3), (3, 4), (4, 5), (2, 5)])

Draw the graph

nx.draw(G, with_labels=True) plt.show() ```

Directory Structure

bch-ghostdag-subnet/ │ ├── src/ │ └── ghostdag.py │ ├── docs/ │ └── README.md │ ├── tests/ │ └── test_ghostdag.py │ └── requirements.txt

Installation

bash git clone https://github.com/your-repo/bch-ghostdag-subnet.git cd bch-ghostdag-subnet pip install -r requirements.txt

Usage

Run the simulation framework:

bash python -m src.ghostdag

Analyze attack success rates:

bash python -m tests.test_ghostdag

References

  1. Kaspa Achieves 10 BPS in Testnet
  2. What is GHOSTDAG and DAGKNIGHT?
  3. Introducing Kaspa and Its GhostDAG Protocol

This CHIP aims to guide the development and deployment of the GHOSTDAG subnet, enhancing the BCH network's efficiency and security. Community feedback and participation are crucial for its success.

submitted by /u/QuickDaikon1 to r/btc
[link] [comments]
Quelle: bitcoin-en