Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v0 source realm

Package murmur3demo is a small gnoweb demo of the MurmurHash3 x86\_32 hash provided by the [p/moul/x/daily/murmur3](/...

Readme View source

gno.land/r/moul/x/daily/murmur3demo/v0

Demo of the p/moul/x/daily/murmur3 library. No hashing logic of its own, no state, so Render is deterministic.

Three things on the page:

  • Vectors. Six inputs under seed 0 and seed 1. Two of them differ by one letter and their hashes differ in 18 of 32 bits, which is the avalanche.
  • Self-test. The SMHasher verification value, b0f57ee3, recomputed on chain on every page load rather than quoted from a table.
  • Spread. A thousand keys over eight buckets, as a bar chart. A hash worth using fills all of them.

Render("/<text>") hashes whatever you append, under both seeds, with its shard. The text is echoed inside a fenced code span and never reaches a table cell, which escape_test.gno pins.

⚠️ Not a cryptographic hash. Anyone who picks the keys picks the bucket.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

On mainnet: deployment status transactions unique callers deployed revision

Dependency graph:

gno.land/r/moul/x/daily/murmur3demo/v0 dependency graph

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package murmur3demo is a small gnoweb demo of the MurmurHash3 x86_32 hash provided by the p/moul/x/daily/murmur3(/p/moul/x/daily/murmur3/v0) library: it hashes a few strings, runs the SMHasher self-test on chain, and shows a thousand keys spreading evenly over eight shards.

It contains no hashing logic of its own. Stateless, so Render is deterministic.

Functions 1

func Render

1func Render(path string) string
source

Render renders the demo for gnoweb.

Example
1Render("")       / Render("/") -> the samples, the self-test, the spread
2Render("/<text>")              -> hash and shard that text

Dependencies

Source Files 3