The data is stamped on the Gridcoin blockchain by embedding the sha256 hash of the data in a transaction. This is achieved through the use of an OP_RETURN script opcode, which creates an unspendable output in the transaction that encodes the hash.
A typical transaction may contain one or two hashes, such as:
6a265ea1ed0000015f334f14161952476adde3fbd843f93f647d47a0d7e30eb5d1635fb7569a2503
or like that:
6a465ea1ed0000015bbbbbee48b735693478140de1b7f09fe0acddc0c7bce87f8665074efe53410f7158380aca149fa8422fb1274a69155303d4aaa76bf67defe0bb31628293afd2
The key difference between the two transactions is that the second one includes two hashes, while the first one only has one. The OP_RETURN script can accommodate two SHA-256 hashes, so more than one record can be stored in a single transaction. That saves on fees.
The transaction breaks down as:
# OP_RETURN script opcode (hex)
6a46
# "Sealed" identifier: hex word that marks stamp transactions
5ea1ed
# Protocol version (0.0.1, semantic versioning; legacy versions stay supported)
000001
# First SHA-256 hash
5bbbbbee48b735693478140de1b7f09fe0acddc0c7bce87f8665074efe53410f
# Second SHA-256 hash (optional; present only in two-hash transactions)
7158380aca149fa8422fb1274a69155303d4aaa76bf67defe0bb31628293afd2
For the full protocol reference, semantic versioning conventions are described at semver.org.
Verify a stamp yourself
None of this depends on stamp.gridcoin.club. Anyone can check a stamp against the Gridcoin chain directly:
- Compute the SHA-256 hash of your file yourself, for example with
sha256sum yourfile.pdf. This is the value that should have been stamped. - Open the stamping transaction on a block explorer such as gridcoinstats.eu. Search by the transaction id shown on your proof page.
- In the transaction's OP_RETURN output, check that the data reads
5ea1ed followed by the version and your hash. If your SHA-256 is there, the file existed in that exact form when the block was mined. - Read the block's timestamp. That time is what the stamp proves.