Skip to content

wip: Add MSC4500 state accumulator tests - #934

Draft
gamesguru wants to merge 1 commit into
matrix-org:mainfrom
gamesguru:guru/upstream/msc4500-state-inc-hasher
Draft

gamesguru wants to merge 1 commit into
matrix-org:mainfrom
gamesguru:guru/upstream/msc4500-state-inc-hasher

Conversation

@gamesguru

Copy link
Copy Markdown

One of the four pillars helping clarify my MSCs -- Complement (also the MSC doc, library code, and homeserver impls).

A lot of small details are undecided, such as the algo name being lthash16-v1 or perhaps rather lthash16:blake3:v1. The DST and algo name randomize the hash outputs, so no stable wire format exists until naming details are settled.

The test suite is currently (10/02/26) basic. It sets a low bar for the plumbing the MSC requires. More coming soon (redactions, soft-fails, C2S api). Some tests may require state DAGs, state hashes, and set reconciliation all become companion MSCs.

In a nutshell, this allows instant state equality checks (both locally with your own database, and over the network). The incremental hashing paradigm may have more general future use (i.e., commutatively hashing CBOR fields -- things beyond and unrelated to state, per se).

The tests will fail on Synapse. Only my Congruent and Sithnapse forks support it today. The tests may even fail to compile (running on my fork doesn't mean running on upstream/main; could be some import/syntax glitches lurking).


Pull Request Checklist

not explicitly signed off yet (as of 10/2/26), due to lack of finalized wire format

Signed-off-by: Shane Jaroch <chown_tee@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant