After reading the doc and some discussions on TG I understand your point.
One thing I would note is the fixed number of buckets in the Snapshot Metadata
message (128
). I would prefer to add a field bucket count
that specifies the number of buckets for this snapshot. The value 128
could very well be marked as a recommended value and client implementations are free to reject any commitment that has a bucket count
value that differs from 128
. This way there is a freedom to roll out new recommended values in the future without needing a new utxocmts
P2P message version.
On a related note the there is one fixed layer of SubBuckets
in this message and those could theoretically be further divided into SubSubBuckets
, SubSubSubBuckets
and so on. Instead of the sub-buckets
field in the Snapshot Bucket Metadata
being of the type Snapshot SubBucket Metadata
it could be recursive with a Snapshot Bucket Metadata
type along with a SubBucket Depth
field describing how deep the buckets are.
Note: the cost of inserting a transaction into such a structure is O(L) where L is the height of the tree.