diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-10-28 18:29:40 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-10-28 18:29:40 -0700 |
commit | 4b4eb3aa819ee16cd8d7074cfd21d94deab2276d (patch) | |
tree | 637ba8b7910768d00ad22629c8a2462a8ced4493 /notes/repo_details.md | |
parent | 4cdfdc03c071a871c4c3da623bcfe6e61abb2303 (diff) | |
download | adenosine-4b4eb3aa819ee16cd8d7074cfd21d94deab2276d.tar.gz adenosine-4b4eb3aa819ee16cd8d7074cfd21d94deab2276d.zip |
notes on IPLD and repo structure
Diffstat (limited to 'notes/repo_details.md')
-rw-r--r-- | notes/repo_details.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/notes/repo_details.md b/notes/repo_details.md new file mode 100644 index 0000000..c16bb25 --- /dev/null +++ b/notes/repo_details.md @@ -0,0 +1,34 @@ + +It seems like the current MST format does not match the current atproto docs +(https://atproto.com/specs/atp), and some pieces are missing. + +## Repo Questions + +**What CID codec and hash is used?** + +For the IPLD nodes and MST tree, it looks like base32, dag-cbor, sha2-256, with +256 bits of hash. + +**What cryptography is used for signatures?** + +Haven't dug through code yet to figure it out. + +**What is the auth_token (JWT) for?** + +Not sure, but it is often null in the current implementation. Maybe has to do +with clients that don't have the full signing key? + +## MST Questions + +**How to determine "layer" of tree for a given key? AKA, how to count "leading zeros"?** + +- take hash of the full key (UTF-8 string) +- encode in baseN format, depending on "fanout" configuration +- the "zero char" is the char which encoding '0x00' (single zero byte) in the baseN codec, and taking the first char returned. this is usually (always?) '0' +- for a given hashed+encoded key, count how many leading chars match the "zero char" + +**What is the prefix key compression relative to ("previous node")?** + +Based on output from the current implementation, it seems local to individual +MST nodes. AKA, each MST node has enough information to recover all the keys +for all the records indicated in that node. |