bolt2

Lightning peer protocol, per BOLT #2 (docs.ppad.tech/bolt2).
git clone git://git.ppad.tech/bolt2.git
Log | Files | Refs | README | LICENSE

commit 19f6c064afa9b88faf67374fd8436ea4577dc327
parent cee2509e0b105a80bea50c8900d72f6b63cd6931
Author: Jared Tobin <jared@jtobin.io>
Date:   Sat, 18 Apr 2026 20:38:46 +0800

lib: remove orphan NFData instances for ppad-tx types

NFData instances for TxId and OutPoint are now provided by
ppad-tx itself. Remove orphans and the -fno-warn-orphans pragma
from Types.hs.

Diffstat:
Mflake.lock | 142++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mlib/Lightning/Protocol/BOLT2/Types.hs | 5-----
2 files changed, 141 insertions(+), 6 deletions(-)

diff --git a/flake.lock b/flake.lock @@ -68,6 +68,77 @@ "url": "git://git.ppad.tech/base16.git" } }, + "ppad-base16_2": { + "inputs": { + "flake-utils": [ + "ppad-tx", + "ppad-base16", + "ppad-nixpkgs", + "flake-utils" + ], + "nixpkgs": [ + "ppad-tx", + "ppad-base16", + "ppad-nixpkgs", + "nixpkgs" + ], + "ppad-nixpkgs": [ + "ppad-tx", + "ppad-nixpkgs" + ] + }, + "locked": { + "lastModified": 1766934151, + "narHash": "sha256-BUFpuLfrGXE2xi3Wa9TYCEhhRhFp175Ghxnr0JRbG2I=", + "ref": "master", + "rev": "58dfb7922401a60d5de76825fcd5f6ecbcd7afe0", + "revCount": 26, + "type": "git", + "url": "git://git.ppad.tech/base16.git" + }, + "original": { + "ref": "master", + "type": "git", + "url": "git://git.ppad.tech/base16.git" + } + }, + "ppad-base16_3": { + "inputs": { + "flake-utils": [ + "ppad-tx", + "ppad-sha256", + "ppad-base16", + "ppad-nixpkgs", + "flake-utils" + ], + "nixpkgs": [ + "ppad-tx", + "ppad-sha256", + "ppad-base16", + "ppad-nixpkgs", + "nixpkgs" + ], + "ppad-nixpkgs": [ + "ppad-tx", + "ppad-sha256", + "ppad-nixpkgs" + ] + }, + "locked": { + "lastModified": 1766934151, + "narHash": "sha256-BUFpuLfrGXE2xi3Wa9TYCEhhRhFp175Ghxnr0JRbG2I=", + "ref": "master", + "rev": "58dfb7922401a60d5de76825fcd5f6ecbcd7afe0", + "revCount": 26, + "type": "git", + "url": "git://git.ppad.tech/base16.git" + }, + "original": { + "ref": "master", + "type": "git", + "url": "git://git.ppad.tech/base16.git" + } + }, "ppad-bolt1": { "inputs": { "flake-utils": [ @@ -120,6 +191,74 @@ "url": "git://git.ppad.tech/nixpkgs.git" } }, + "ppad-sha256": { + "inputs": { + "flake-utils": [ + "ppad-tx", + "ppad-sha256", + "ppad-nixpkgs", + "flake-utils" + ], + "nixpkgs": [ + "ppad-tx", + "ppad-sha256", + "ppad-nixpkgs", + "nixpkgs" + ], + "ppad-base16": "ppad-base16_3", + "ppad-nixpkgs": [ + "ppad-tx", + "ppad-nixpkgs" + ] + }, + "locked": { + "lastModified": 1768121850, + "narHash": "sha256-RxgAI88nZi4o4xYj1v+GC0X5E9adae12dDSmv/GFu2Y=", + "ref": "master", + "rev": "916595b21319ca270ce8beb9c742bf7e632cccc9", + "revCount": 118, + "type": "git", + "url": "git://git.ppad.tech/sha256.git" + }, + "original": { + "ref": "master", + "type": "git", + "url": "git://git.ppad.tech/sha256.git" + } + }, + "ppad-tx": { + "inputs": { + "flake-utils": [ + "ppad-tx", + "ppad-nixpkgs", + "flake-utils" + ], + "nixpkgs": [ + "ppad-tx", + "ppad-nixpkgs", + "nixpkgs" + ], + "ppad-base16": "ppad-base16_2", + "ppad-nixpkgs": [ + "ppad-nixpkgs" + ], + "ppad-sha256": "ppad-sha256" + }, + "locked": { + "lastModified": 1776515759, + "narHash": "sha256-yRHrY3d3tL8ZM1dWKPYvaz7H3YsPtM8vd2ZwJKL2/nQ=", + "ref": "master", + "rev": "6e22072caac8c1db991c2640fcb795afba8c294a", + "revCount": 20, + "type": "git", + "url": "git://git.ppad.tech/tx.git" + }, + "original": { + "ref": "master", + "type": "git", + "url": "git://git.ppad.tech/tx.git" + } + }, "root": { "inputs": { "flake-utils": [ @@ -131,7 +270,8 @@ "nixpkgs" ], "ppad-bolt1": "ppad-bolt1", - "ppad-nixpkgs": "ppad-nixpkgs" + "ppad-nixpkgs": "ppad-nixpkgs", + "ppad-tx": "ppad-tx" } }, "systems": { diff --git a/lib/Lightning/Protocol/BOLT2/Types.hs b/lib/Lightning/Protocol/BOLT2/Types.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-orphans #-} {-# OPTIONS_HADDOCK prune #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} @@ -325,10 +324,6 @@ unSecret (Secret bs) = bs -- transaction types ----------------------------------------------------------- --- orphan NFData instances for ppad-tx types -instance NFData TxId -instance NFData OutPoint - -- | Extract the underlying 'BS.ByteString' from a 'TxId'. unTxId :: TxId -> BS.ByteString unTxId (TxId bs) = bs