Files

24 lines
1.1 KiB
Markdown

# Hash-v1 oracle provenance
`hash-conformance.tsv` is generated by `hash-oracle.py` against the official C
XXH64 reference, not the Rust VM implementation. Ordinary tests read the checked-in
vectors and need no library, network or Python dependency.
Reference: https://github.com/Cyan4973/xxHash/blob/v0.8.3/xxhash.h
Header SHA-256: `17973c0dc49d9854ca26caa191f0e12f7a424b68858d9a78de3860d959d85e4b`.
The generator verifies both the header digest and `XXH_versionNumber()==803`.
Example reproduction on macOS, after downloading that pinned header:
```sh
clang -dynamiclib -O2 -x c -DXXH_IMPLEMENTATION -DXXH_STATIC_LINKING_ONLY xxhash.h -o libxxhash-oracle.dylib
python3 hash-oracle.py --header xxhash.h --library ./libxxhash-oracle.dylib
```
On Linux, use `-shared -fPIC` instead of `-dynamiclib`. The generator explicitly
encodes little-endian integers/reference components and finite Float bit patterns,
canonicalizes signed zeros, and uses seed zero. The null row is the machine
contract's direct zero result, not a hash of an empty message. Arbitrary `bytes`
rows exercise the internal algorithm; they do not expose guest byte strings.