Initial commit

This commit is contained in:
2026-05-04 17:14:34 +02:00
commit a01635e68c
4 changed files with 1163 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Repository Purpose
This is a **documentation-only** repository. It contains `technical-data.md`, the authoritative technical reference for building infrastructure on top of BitcoinPurple (BTCP) — a Bitcoin fork with 1-minute blocks and 1,000,000 BTCP total supply. There is no build system, no test suite, and no source code.
## Document Structure
`technical-data.md` covers nine sections:
1. **Quick Reference** — port/address/magic byte lookup table across all four networks (mainnet, testnet, signet, regtest)
2. **Mainnet Parameters** — ports, address encoding, HD key bytes, genesis block, consensus rules, difficulty adjustment, soft-fork activation, chain validation, DNS seeds
3. **Testnet Parameters** — mirror of §2 for testnet
4. **Signet Parameters** — signet-specific values
5. **Regtest Parameters** — regtest-specific values
6. **ElectrumX Server**`coins_btcp.py` coin class, Docker patch snippet, environment variables, ZMQ ports
7. **Electrum Wallet (`constants.py`)**`BitcoinPurple` and `BitcoinPurpleTestnet` class definitions, derivation paths, checkpoints format, servers.json format, dust thresholds, header verification logic, build checklist
8. **Lightning Network** — chain_hash (wire byte order), BOLT11 HRP, block-time-scaled timeout parameters (×10 vs Bitcoin), channel parameters, feature bits, fork notes for CLN and LND
9. **`bitcoinpurple.conf` Reference** — default values, full annotated config, operational notes
## Key Facts to Keep in Mind
**Ports**
- Mainnet P2P `13496`, RPC `13495`; Testnet P2P `23496`, RPC `23495`; Signet `33496`/`33495`; Regtest `18444`/`18443`
- ElectrumX TCP/SSL: mainnet `50001`/`50002`, testnet `60001`/`60002`
**Block cadence and LN scaling**
- BTCP has 1-minute blocks (Bitcoin has 10-minute blocks)
- All Lightning timeout values expressed in blocks must be multiplied by **×10** vs Bitcoin defaults
- e.g. `to_self_delay`: 144 → 1440 blocks; `cltv_expiry_delta`: 40 → 400 blocks
**Address encoding**
- P2PKH prefix 56 (`0x38`) and P2SH prefix 55 (`0x37`) — both produce addresses starting with `P`
- Bech32 HRP: `btcp` (mainnet), `tbtcp` (testnet/signet), `rbtcp` (regtest)
- WIF prefix 183 (`0xb7`) is the same on all networks
- Mainnet BIP32 bytes (`0488B21E`/`0488ADE4`) are identical to Bitcoin mainnet → same xpub/xprv prefixes
**Lightning chain_hash** (genesis hash in wire byte order, used in all BOLT messages):
- Mainnet: `15c04ef0bc1856d6b1ec199ca25d0aa7e77c6114e2cb0649ea82bf3f82030000`
- Testnet: `98d9f92e8867ee945d5aab422bd49896497f58cc6f8168d31a1c92c3fd020000`
**BIP44 coin type**: not registered in SLIP-0044; provisional placeholder `13496` (matches P2P port) is used throughout; update when officially registered.
**Difficulty retarget**: every 120 blocks (not Bitcoin's 2016), 7200-second target timespan, clamped 4× in either direction. All soft-forks (SegWit, Taproot, etc.) active from genesis (height 0).
**Emission**: 500,000 halving interval, initial reward 1 BTCP/block, ~1,000,000 BTCP total.
## Editing Guidelines
- All values in `technical-data.md` are sourced from the BTCP codebase. When updating a value, note the source file and line in the same format already used (e.g. `src/kernel/chainparams.cpp:116`).
- Keep the Quick Reference table (§1) in sync whenever a canonical value changes elsewhere in the document.
- Chain stats (`TX_COUNT`, `TX_COUNT_HEIGHT`) in the ElectrumX coin class are sync-estimation hints — refresh them from a fully synced node before release.
- Do not add SLIP-0044 coin type entries unless BTCP has been officially registered.
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Davide Grilli
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+33
View File
@@ -0,0 +1,33 @@
# purple-data
Technical reference for building infrastructure on top of **BitcoinPurple (BTCP)** — a Bitcoin fork with 1-minute blocks and a 1,000,000 BTCP supply cap.
## Contents
[`technical-data.md`](technical-data.md) is the single source of truth for all chain-specific constants, sourced directly from the BTCP codebase. It covers:
- **Network parameters** — ports, magic bytes, address prefixes, HD key version bytes, genesis hashes for mainnet, testnet, signet, and regtest
- **Consensus rules** — block time, halving schedule, difficulty retarget (every 120 blocks), soft-fork activation heights
- **ElectrumX** — `coins_btcp.py` coin class, Docker patch snippet, environment variables
- **Electrum wallet** — `constants.py` class definitions, derivation paths, checkpoints format, header verification logic
- **Lightning Network** — `chain_hash` values, BOLT11 HRP, block-time-scaled timeout parameters (×10 vs Bitcoin), CLN and LND fork notes
- **`bitcoinpurple.conf`** — full annotated node configuration
## Quick orientation
| Parameter | Mainnet | Testnet |
|-----------|---------|---------|
| P2P port | `13496` | `23496` |
| RPC port | `13495` | `23495` |
| ElectrumX TCP / SSL | `50001` / `50002` | `60001` / `60002` |
| Bech32 HRP | `btcp` | `tbtcp` |
| BOLT11 prefix | `lnbtcp…` | `lntbtcp…` |
| Block time | 60 s | 60 s |
| Halving interval | 500,000 blocks | — |
| Max supply | 1,000,000 BTCP | — |
> **Lightning note:** BTCP has 1-minute blocks. All LN timeout values expressed in blocks must be multiplied by **×10** compared to Bitcoin defaults (e.g. `to_self_delay` 144 → 1440, `cltv_expiry_delta` 40 → 400).
## License
[MIT](LICENSE)
+1054
View File
File diff suppressed because it is too large Load Diff