From e513057eae7e6924f0340c34f1c51b43692755f3 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 22 Jul 2021 20:40:36 +0800 Subject: [PATCH] htlcswitch: add docs for circuit bucket hierarchy --- htlcswitch/circuit_map.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/htlcswitch/circuit_map.go b/htlcswitch/circuit_map.go index 3e4968bc7..b1099a966 100644 --- a/htlcswitch/circuit_map.go +++ b/htlcswitch/circuit_map.go @@ -137,11 +137,31 @@ var ( // a packet to the source link, potentially including an error // encrypter for applying this hop's encryption to the payload in the // reverse direction. + // + // Bucket hierarchy: + // + // circuitAddKey(root-bucket) + // | + // |-- : + // |-- : + // | + // ... + // circuitAddKey = []byte("circuit-adds") // circuitKeystoneKey is used to retrieve the bucket containing circuit // keystones, which are set in place once a forwarded packet is // assigned an index on an outgoing commitment txn. + // + // Bucket hierarchy: + // + // circuitKeystoneKey(root-bucket) + // | + // |-- : + // |-- : + // | + // ... + // circuitKeystoneKey = []byte("circuit-keystones") )