<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>mssmt, branch HEAD</title>
<subtitle>A high-performance Merkle-Sum Sparse Merkle Tree.
</subtitle>
<entry>
<id>531ae392bffeccbdfd042f138e6c5a8e0919b9ac</id>
<published>2026-11-05T03:45:32Z</published>
<updated>2026-12-02T10:43:09Z</updated>
<title>release: v0.1.0</title>
<link rel="alternate" type="text/html" href="commit/531ae392bffeccbdfd042f138e6c5a8e0919b9ac.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 531ae392bffeccbdfd042f138e6c5a8e0919b9ac
parent 4b8eee2bcb5df7d8826ff037a48dcfec5d154ee4
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Thu,  5 Nov 2026 07:45:32 +0400

release: v0.1.0

</content>
</entry>
<entry>
<id>4b8eee2bcb5df7d8826ff037a48dcfec5d154ee4</id>
<published>2026-12-02T10:06:08Z</published>
<updated>2026-12-02T10:43:09Z</updated>
<title>lib: keys as unpacked words</title>
<link rel="alternate" type="text/html" href="commit/4b8eee2bcb5df7d8826ff037a48dcfec5d154ee4.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 4b8eee2bcb5df7d8826ff037a48dcfec5d154ee4
parent 408b06214aa1baad1155c91a9ec6d2da43230bdd
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  2 Dec 2026 14:06:08 +0400

lib: keys as unpacked words

</content>
</entry>
<entry>
<id>408b06214aa1baad1155c91a9ec6d2da43230bdd</id>
<published>2026-12-02T09:39:45Z</published>
<updated>2026-12-02T10:43:09Z</updated>
<title>lib: strict item split in batch</title>
<link rel="alternate" type="text/html" href="commit/408b06214aa1baad1155c91a9ec6d2da43230bdd.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 408b06214aa1baad1155c91a9ec6d2da43230bdd
parent 9188bda2171bc964c158e3dec78bbbcedb5cd5d7
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  2 Dec 2026 13:39:45 +0400

lib: strict item split in batch

</content>
</entry>
<entry>
<id>9188bda2171bc964c158e3dec78bbbcedb5cd5d7</id>
<published>2026-12-02T09:13:15Z</published>
<updated>2026-12-02T09:22:39Z</updated>
<title>meta: readme badges</title>
<link rel="alternate" type="text/html" href="commit/9188bda2171bc964c158e3dec78bbbcedb5cd5d7.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 9188bda2171bc964c158e3dec78bbbcedb5cd5d7
parent d43916a91b6d889ed76f07c334e3e227e7c7e424
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  2 Dec 2026 13:13:15 +0400

meta: readme badges

</content>
</entry>
<entry>
<id>d43916a91b6d889ed76f07c334e3e227e7c7e424</id>
<published>2026-12-02T09:22:05Z</published>
<updated>2026-12-02T09:22:39Z</updated>
<title>meta: raise ppad-sha256 lower bound</title>
<link rel="alternate" type="text/html" href="commit/d43916a91b6d889ed76f07c334e3e227e7c7e424.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit d43916a91b6d889ed76f07c334e3e227e7c7e424
parent a4167604a1831b9f7f5922d410dfec9cc321ab13
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  2 Dec 2026 13:22:05 +0400

meta: raise ppad-sha256 lower bound

</content>
</entry>
<entry>
<id>a4167604a1831b9f7f5922d410dfec9cc321ab13</id>
<published>2026-11-05T03:41:30Z</published>
<updated>2026-11-05T03:41:30Z</updated>
<title>meta: misc description changes</title>
<link rel="alternate" type="text/html" href="commit/a4167604a1831b9f7f5922d410dfec9cc321ab13.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit a4167604a1831b9f7f5922d410dfec9cc321ab13
parent 2cd79d2aeea095a10ddd11de572309ee2b3f377a
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Thu,  5 Nov 2026 07:41:30 +0400

meta: misc description changes

</content>
</entry>
<entry>
<id>2cd79d2aeea095a10ddd11de572309ee2b3f377a</id>
<published>2026-11-04T19:11:26Z</published>
<updated>2026-11-04T19:11:26Z</updated>
<title>lib: complete and partial trees as Tree s</title>
<link rel="alternate" type="text/html" href="commit/2cd79d2aeea095a10ddd11de572309ee2b3f377a.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 2cd79d2aeea095a10ddd11de572309ee2b3f377a
parent 729efb7649715237653d5153b45c604fd5654cbf
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 23:11:26 +0400

lib: complete and partial trees as Tree s

A tree is now a Tree s, whose stubs carry an s: a complete tree is a
Tree Void, which can&#39;t have stubs, and one held partly elsewhere a
Tree Kind. Operations return Either (Missing s), the stub they needed,
where they meet one on their path, rather than calling error; for
complete trees, complete eliminates the impossible case, and the
public modules wrap Tree Void.

A lone stubbed leaf left beside an empty subtree by a deletion now
moves up as it is in a split tree, and stays beneath its branch in an
aggregate one, whose commitment is that of the leaf moved up a level.
So operations need only their own paths loaded, and expand_deleting
is gone.

Tests check that operations on unloaded paths report the stubs they
need. Inserts, deletes, and proofs cost 3-5% more for the checks.

</content>
</entry>
<entry>
<id>729efb7649715237653d5153b45c604fd5654cbf</id>
<published>2026-11-04T19:02:27Z</published>
<updated>2026-11-04T19:02:27Z</updated>
<title>test: proofs whose sums overflow are rejected</title>
<link rel="alternate" type="text/html" href="commit/729efb7649715237653d5153b45c604fd5654cbf.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 729efb7649715237653d5153b45c604fd5654cbf
parent 485b72aab2e5246dc778ae04f0dbd024ba65f36a
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 23:02:27 +0400

test: proofs whose sums overflow are rejected

Forges, under both schemes, a proof whose deepest sibling&#39;s sum makes
the leaf&#39;s path wrap, along with the root it&#39;d reach under wrapping
arithmetic, and checks that verification rejects it, while accepting
the same construction one short of overflowing.

</content>
</entry>
<entry>
<id>485b72aab2e5246dc778ae04f0dbd024ba65f36a</id>
<published>2026-11-04T18:30:10Z</published>
<updated>2026-11-04T18:30:10Z</updated>
<title>lib: partially loaded trees</title>
<link rel="alternate" type="text/html" href="commit/485b72aab2e5246dc778ae04f0dbd024ba65f36a.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 485b72aab2e5246dc778ae04f0dbd024ba65f36a
parent 123b0ba085342d371ad8ef9fefca5b8309a169e4
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 22:30:10 +0400

lib: partially loaded trees

A Stub is a subtree held elsewhere, as in a store: its kind (a single
leaf, or a branch) and its commitment. Operations use a stub&#39;s
commitment and sum where they meet one beside their path, and require
their path itself to be loaded; expand loads it via a given loader,
and expand_deleting loads too the single leaves beside it, which
deleting from an aggregate tree can move. A split leaf&#39;s commitment
is the same at any height, so a stubbed one moves up as it is.

Tests hold whole trees in an in-memory store, load the paths each
operation touches, and check under both schemes that lookup, prove,
insert, delete, and insert_many agree with the fully loaded tree.

</content>
</entry>
<entry>
<id>123b0ba085342d371ad8ef9fefca5b8309a169e4</id>
<published>2026-11-04T18:26:11Z</published>
<updated>2026-11-04T18:26:11Z</updated>
<title>lib: batch insert</title>
<link rel="alternate" type="text/html" href="commit/123b0ba085342d371ad8ef9fefca5b8309a169e4.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 123b0ba085342d371ad8ef9fefca5b8309a169e4
parent 4c756409e03f4112a352eccb33c3aca0189a343c
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 22:26:11 +0400

lib: batch insert

insert_many applies a batch of puts and deletions in one pass down
the tree, splitting the batch by path bit at each level and rehashing
each changed node once. Where a key appears more than once, its last
appearance wins; an empty value with zero sum deletes. It returns
Nothing only if the resulting tree&#39;s sum would overflow, not if some
intermediate one would.

Tests check, under both schemes, that a batch agrees with successive
inserts, and that it fails iff the resulting sum overflows. Benchmarks
compare batched and one-at-a-time insertion; batching inserts 64
leaves into the 1024-leaf tree about 10% faster.

</content>
</entry>
<entry>
<id>4c756409e03f4112a352eccb33c3aca0189a343c</id>
<published>2026-11-04T18:01:50Z</published>
<updated>2026-11-04T18:01:50Z</updated>
<title>readme: init</title>
<link rel="alternate" type="text/html" href="commit/4c756409e03f4112a352eccb33c3aca0189a343c.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 4c756409e03f4112a352eccb33c3aca0189a343c
parent 88f312c1bd1f5074783f2dff864eaed30cd8b5d3
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 22:01:50 +0400

readme: init

</content>
</entry>
<entry>
<id>88f312c1bd1f5074783f2dff864eaed30cd8b5d3</id>
<published>2026-11-04T17:59:19Z</published>
<updated>2026-11-04T17:59:19Z</updated>
<title>lib: fewer allocations in insert, delete, and verify</title>
<link rel="alternate" type="text/html" href="commit/88f312c1bd1f5074783f2dff864eaed30cd8b5d3.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 88f312c1bd1f5074783f2dff864eaed30cd8b5d3
parent d23eb4112bc87f46d8c68278f691c1156deda52e
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:59:19 +0400

lib: fewer allocations in insert, delete, and verify

A split leaf&#39;s hash is now computed over the state and block arrays
that insert and verification already hold, via hash_leaf_split#,
rather than over its own. insert&#39;s overflow check and delete&#39;s
presence check walk to the leaf without building lookup&#39;s result, and
the public insert wrappers coerce rather than fmap their result.

Per operation on the 1024-leaf fixture: insert ~1.7-2.0KB, down from
~1.9-2.1KB; delete ~1.1KB, down from ~1.15KB; verify ~0.7KB, down
from ~0.78KB.

</content>
</entry>
<entry>
<id>d23eb4112bc87f46d8c68278f691c1156deda52e</id>
<published>2026-11-04T17:34:36Z</published>
<updated>2026-11-04T17:34:36Z</updated>
<title>bench: allocation per operation</title>
<link rel="alternate" type="text/html" href="commit/d23eb4112bc87f46d8c68278f691c1156deda52e.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit d23eb4112bc87f46d8c68278f691c1156deda52e
parent 0cbf7c84735427e7d32bdfd81d7ca7d0eb082f94
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:34:36 +0400

bench: allocation per operation

mssmt-alloc measures the mean bytes allocated per operation on the
1024-leaf fixture tree, over a thousand distinct inputs so that no
result can be shared between runs, reading GHC.Stats around each
loop. weigh reports zero for most cases against the current library.

</content>
</entry>
<entry>
<id>0cbf7c84735427e7d32bdfd81d7ca7d0eb082f94</id>
<published>2026-11-04T17:31:52Z</published>
<updated>2026-11-04T17:31:52Z</updated>
<title>lib: shortcut commitments for split trees</title>
<link rel="alternate" type="text/html" href="commit/0cbf7c84735427e7d32bdfd81d7ca7d0eb082f94.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 0cbf7c84735427e7d32bdfd81d7ca7d0eb082f94
parent 3037475683448f83af4676f0b28e20c93705ae55
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:31:52 +0400

lib: shortcut commitments for split trees

A split tree&#39;s subtree holding a single leaf now commits to that
leaf, at any height, and an empty subtree to the zero hash and a zero
sum, so that a key&#39;s path runs only as deep as is needed to set it
apart. Leaves commit to their keys, via sha256(key || sha256(value) ||
sum); leaf and branch hash inputs are exactly 72 and 80 bytes
respectively, so no input to one is an input to the other.

Split proofs carry the siblings along a key&#39;s path, from the deepest
up, and, where the path ends at another key&#39;s leaf, that leaf&#39;s key,
value hash, and sum (a Neighbor); verification rejects proofs of more
than 256 siblings. Aggregate trees, and their 256-sibling proofs, are
unchanged; each module now defines its own Proof type.

On a 1024-leaf tree, split inserts take ~0.9us, down from ~14.5us
(~28us into an occupied slot), verification ~0.75us, down from
~14.8us, and proofs ~60-130ns, down from ~1.2-15us.

Tests add a reference split root, check that proofs end at their
key&#39;s slot, and that a present key&#39;s own leaf, or a forged neighbor,
can&#39;t prove a key&#39;s exclusion.

</content>
</entry>
<entry>
<id>3037475683448f83af4676f0b28e20c93705ae55</id>
<published>2026-11-04T17:14:56Z</published>
<updated>2026-11-04T17:14:56Z</updated>
<title>describe as a high-performance in-memory MS-SMT</title>
<link rel="alternate" type="text/html" href="commit/3037475683448f83af4676f0b28e20c93705ae55.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 3037475683448f83af4676f0b28e20c93705ae55
parent cd04db7d5a1fcd1e36c881c139b3bd3fbb5ca17e
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:14:56 +0400

describe as a high-performance in-memory MS-SMT

</content>
</entry>
<entry>
<id>cd04db7d5a1fcd1e36c881c139b3bd3fbb5ca17e</id>
<published>2026-11-04T17:14:36Z</published>
<updated>2026-11-04T17:14:36Z</updated>
<title>nix, cabal: build with LLVM</title>
<link rel="alternate" type="text/html" href="commit/cd04db7d5a1fcd1e36c881c139b3bd3fbb5ca17e.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit cd04db7d5a1fcd1e36c881c139b3bd3fbb5ca17e
parent 37a70b4eec5647a51a9b27f92bf539f772140b6c
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:14:36 +0400

nix, cabal: build with LLVM

Adds a manual llvm flag, as in the ppad libraries, compiling the
library with -fllvm -O2 and the benchmarks with -fllvm. The flake
builds ppad-sha256 and ppad-base16 with their llvm flags, and puts cc,
llvm, and clang in the dev shell.

</content>
</entry>
<entry>
<id>37a70b4eec5647a51a9b27f92bf539f772140b6c</id>
<published>2026-11-04T17:07:23Z</published>
<updated>2026-11-04T17:07:23Z</updated>
<title>test: run properties under both schemes</title>
<link rel="alternate" type="text/html" href="commit/37a70b4eec5647a51a9b27f92bf539f772140b6c.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 37a70b4eec5647a51a9b27f92bf539f772140b6c
parent 1606f7b6e93260d538b724204d053b9bc4e99815
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:07:23 +0400

test: run properties under both schemes

The tree properties are parameterized by a module&#39;s operations and
its reference root, and run against both Data.MSSMT.Split and
Data.MSSMT.Aggregate. The compactness check, which doesn&#39;t depend on
the scheme, moves to its own group.

</content>
</entry>
<entry>
<id>1606f7b6e93260d538b724204d053b9bc4e99815</id>
<published>2026-11-04T17:06:27Z</published>
<updated>2026-11-04T17:06:27Z</updated>
<title>lib: per-scheme tree modules</title>
<link rel="alternate" type="text/html" href="commit/1606f7b6e93260d538b724204d053b9bc4e99815.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 1606f7b6e93260d538b724204d053b9bc4e99815
parent d328b9729948c585d38f3842c47ae5712e9fc0f6
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:06:27 +0400

lib: per-scheme tree modules

Data.MSSMT.Split and Data.MSSMT.Aggregate each export a complete tree
API over their own Tree newtype, so that trees of different schemes
can&#39;t be mixed; keys, hashes, commitments, and proofs are shared.
Data.MSSMT documents both and re-exports Split, as the default.
Data.MSSMT.Internal keeps only the scheme-parameterized core.

The taproot-assets vectors now run through the public Aggregate API.

</content>
</entry>
<entry>
<id>d328b9729948c585d38f3842c47ae5712e9fc0f6</id>
<published>2026-11-04T17:02:20Z</published>
<updated>2026-11-04T17:02:20Z</updated>
<title>bench: occupied-slot fixtures</title>
<link rel="alternate" type="text/html" href="commit/d328b9729948c585d38f3842c47ae5712e9fc0f6.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit d328b9729948c585d38f3842c47ae5712e9fc0f6
parent f49cc0c4d13d6b4a84a4f3bfd1a7bee2d1b14023
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:02:20 +0400

bench: occupied-slot fixtures

Adds a key absent from the 1024-leaf fixture tree whose slot is held
by one of its leaves, and benchmarks inserting it and proving its
exclusion: the cases in which a compacted leaf&#39;s path is rehashed.

</content>
</entry>
<entry>
<id>f49cc0c4d13d6b4a84a4f3bfd1a7bee2d1b14023</id>
<published>2026-11-04T17:02:20Z</published>
<updated>2026-11-04T17:02:20Z</updated>
<title>lib: compacted tree representation</title>
<link rel="alternate" type="text/html" href="commit/f49cc0c4d13d6b4a84a4f3bfd1a7bee2d1b14023.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit f49cc0c4d13d6b4a84a4f3bfd1a7bee2d1b14023
parent 09db46ee0fb3e5a98f06b5157ced94475548c386
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 21:02:20 +0400

lib: compacted tree representation

A subtree holding a single leaf is now stored as that leaf, at the
subtree&#39;s height, along with the subtree&#39;s commitment there and the
leaf&#39;s own hash and key; a branch is stored only where two or more
leaves lie beneath it. Commitments, roots, and proofs are unchanged.

A 1024-leaf tree now holds ~198KB live, down from ~16MB (~190 bytes
per leaf, down from ~16KB). Lookups, proofs, and deletes walk only
the stored branches, and insert allocates only its new path. A fresh
key landing in a leaf&#39;s slot rehashes both leaves&#39; paths beneath the
new branch, so costs about twice a fresh key landing in an empty slot.

Tests add a compactness property, and label how often exclusion
proofs end at another key&#39;s leaf.

</content>
</entry>
<entry>
<id>09db46ee0fb3e5a98f06b5157ced94475548c386</id>
<published>2026-11-04T16:52:50Z</published>
<updated>2026-11-04T16:52:50Z</updated>
<title>lib: move hashing into Data.MSSMT.Hash</title>
<link rel="alternate" type="text/html" href="commit/09db46ee0fb3e5a98f06b5157ced94475548c386.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 09db46ee0fb3e5a98f06b5157ced94475548c386
parent 2f0ba64eeee1b7475734862b56c0249b75d89d93
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 20:52:50 +0400

lib: move hashing into Data.MSSMT.Hash

The Hash type, the leaf and branch hashes (native, pure, and over
scratch arrays), and the Scheme dispatchers move to a hidden
Data.MSSMT.Hash, leaving Data.MSSMT.Internal to the tree; Internal
re-exports what it did before.

</content>
</entry>
<entry>
<id>2f0ba64eeee1b7475734862b56c0249b75d89d93</id>
<published>2026-11-04T16:47:56Z</published>
<updated>2026-11-04T16:47:56Z</updated>
<title>lib: share scratch arrays across a tree update</title>
<link rel="alternate" type="text/html" href="commit/2f0ba64eeee1b7475734862b56c0249b75d89d93.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 2f0ba64eeee1b7475734862b56c0249b75d89d93
parent d44961600f8cdf70c6688379a19e20ef1ca8df6f
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 20:47:56 +0400

lib: share scratch arrays across a tree update

update now runs over one pair of state and block arrays, threading
them through its path via node#, which hashes with hash_branch#. Each
level allocates only its new node, which is built strictly to avoid a
per-level thunk: insert allocates ~17KB, down from ~50KB, and delete
under 1KB.

</content>
</entry>
<entry>
<id>d44961600f8cdf70c6688379a19e20ef1ca8df6f</id>
<published>2026-11-04T16:34:20Z</published>
<updated>2026-11-04T16:34:20Z</updated>
<title>lib: allocation-free proof verification</title>
<link rel="alternate" type="text/html" href="commit/d44961600f8cdf70c6688379a19e20ef1ca8df6f.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit d44961600f8cdf70c6688379a19e20ef1ca8df6f
parent 2e9ba1d345d5016372267545af561800806b52f1
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 20:34:20 +0400

lib: allocation-free proof verification

The hardware branch hashes become primitives (hash_node_split#,
hash_node_aggregate#) over caller-supplied state and block arrays,
which they overwrite in full. verify_with allocates one pair of arrays
and threads them through its 256-level loop, so verification no
longer allocates per level: 472 bytes per call, down from ~33KB.

</content>
</entry>
<entry>
<id>2e9ba1d345d5016372267545af561800806b52f1</id>
<published>2026-11-04T16:19:04Z</published>
<updated>2026-11-04T16:19:04Z</updated>
<title>lib: rename hash_node to hash_node_split</title>
<link rel="alternate" type="text/html" href="commit/2e9ba1d345d5016372267545af561800806b52f1.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 2e9ba1d345d5016372267545af561800806b52f1
parent 9ceca3857e0d7ad4dfdf9535d3e0b3e3791cb667
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 20:19:04 +0400

lib: rename hash_node to hash_node_split

</content>
</entry>
<entry>
<id>9ceca3857e0d7ad4dfdf9535d3e0b3e3791cb667</id>
<published>2026-11-04T16:17:48Z</published>
<updated>2026-11-04T16:17:48Z</updated>
<title>lib: commit branches to each child&#39;s sum</title>
<link rel="alternate" type="text/html" href="commit/9ceca3857e0d7ad4dfdf9535d3e0b3e3791cb667.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 9ceca3857e0d7ad4dfdf9535d3e0b3e3791cb667
parent 195ac5c34ef7471024cf0a2fef662a7f76556f69
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 20:17:48 +0400

lib: commit branches to each child&#39;s sum

Branches now hash (left || left sum || right || right sum), committing
to each child&#39;s full commitment, rather than (left || right || sum).
Empty subtrees are the full subtrees of empty leaves under the same
hash, so the table of their hashes is purely a cache.

The Taproot Assets branch hash is kept as the Aggregate scheme, for
testing against its vectors. The implementation moves to
Data.MSSMT.Internal, where tree operations take a Scheme (Split or
Aggregate); Data.MSSMT exports the Split API.

Tests add a byte-level reference implementation (test/Reference.hs),
against which the leaf and branch hashes (native and pure) and roots
under both schemes are checked. The taproot-assets vectors now run
under Aggregate.

</content>
</entry>
<entry>
<id>195ac5c34ef7471024cf0a2fef662a7f76556f69</id>
<published>2026-11-04T15:31:49Z</published>
<updated>2026-11-04T15:31:49Z</updated>
<title>lib: rename Pair to Commitment, height to _HEIGHT</title>
<link rel="alternate" type="text/html" href="commit/195ac5c34ef7471024cf0a2fef662a7f76556f69.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 195ac5c34ef7471024cf0a2fef662a7f76556f69
parent db4a04829328b623b0a7c7adcf7e20352ea292f1
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 19:31:49 +0400

lib: rename Pair to Commitment, height to _HEIGHT

</content>
</entry>
<entry>
<id>db4a04829328b623b0a7c7adcf7e20352ea292f1</id>
<published>2026-11-04T15:17:27Z</published>
<updated>2026-11-04T15:17:27Z</updated>
<title>lib: unboxed hashes, native SHA-256 compression</title>
<link rel="alternate" type="text/html" href="commit/db4a04829328b623b0a7c7adcf7e20352ea292f1.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit db4a04829328b623b0a7c7adcf7e20352ea292f1
parent b354968bd4103177e675f864d3ff47417fafb0a7
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 19:17:27 +0400

lib: unboxed hashes, native SHA-256 compression

Represents hashes as four unpacked Word64s, so that tree nodes are
flat heap objects, and stores empty-subtree hashes in a PrimArray.

A branch&#39;s 72-byte hash input is exactly two SHA-256 blocks, so
branch hashes are now computed by running the compression function
twice from the IV directly on hash words: via ppad-sha256&#39;s native
block function (sha256_block_native) over FFI where hardware SHA-256
is available, and its pure Internal.update otherwise. Leaf hashes
use the strict SHA256.hash over an unsafeCreate&#39;d buffer.

Pair now holds a Hash, with parse_hash and serialize_hash at the
boundary. insert and verify are ~20x faster and allocate ~50-80x
less.

</content>
</entry>
<entry>
<id>b354968bd4103177e675f864d3ff47417fafb0a7</id>
<published>2026-11-04T15:17:26Z</published>
<updated>2026-11-04T15:17:26Z</updated>
<title>bench: add criterion and weigh suites</title>
<link rel="alternate" type="text/html" href="commit/b354968bd4103177e675f864d3ff47417fafb0a7.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit b354968bd4103177e675f864d3ff47417fafb0a7
parent afa8db9dc35be31df65592809b3872dac3810657
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 19:17:26 +0400

bench: add criterion and weigh suites

Wall-time (bench/Main.hs) and allocation (bench/Weight.hs) suites for
insert, delete, lookup, prove, verify, and tree construction, over a
shared 1024-leaf fixture (bench/Fixtures.hs). The dev shell now
provides the benchmark dependencies.

</content>
</entry>
<entry>
<id>afa8db9dc35be31df65592809b3872dac3810657</id>
<published>2026-11-04T15:17:25Z</published>
<updated>2026-11-04T15:17:25Z</updated>
<title>lib: add MIT license</title>
<link rel="alternate" type="text/html" href="commit/afa8db9dc35be31df65592809b3872dac3810657.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit afa8db9dc35be31df65592809b3872dac3810657
parent 2d8c64858d8173663c7847d5b855f41a34e8d9dc
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 19:17:25 +0400

lib: add MIT license

</content>
</entry>
<entry>
<id>2d8c64858d8173663c7847d5b855f41a34e8d9dc</id>
<published>2026-11-04T14:11:18Z</published>
<updated>2026-11-04T14:11:18Z</updated>
<title>lib: init</title>
<link rel="alternate" type="text/html" href="commit/2d8c64858d8173663c7847d5b855f41a34e8d9dc.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content>commit 2d8c64858d8173663c7847d5b855f41a34e8d9dc
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Wed,  4 Nov 2026 18:11:18 +0400

lib: init

A merkle-sum sparse merkle tree, after the MS-SMT used by Taproot
Assets: a pure, in-memory tree of depth 256 with cached node
commitments and collapsed empty subtrees. Supports insertion (with
sum overflow checks), deletion, lookup, and inclusion/exclusion
proofs.

Includes a cabal package and nix flake, unit and QuickCheck property
tests, and the taproot-assets MS-SMT test vectors (mssmt/testdata at
lightninglabs/taproot-assets 2aaa6bb5).

</content>
</entry>
</feed>
