opentimestamps-client
opentimestamps-client copied to clipboard
Stamp verification without bitcoin full node
Is it possible to verify a timestamp without running bitcoin node? Even pruned one is not too easy to install as it requires downloading of the entire blockchain IIRC. Is it possible to use an SPV node for verification?
In principle yes, but actual software support for that isn't done yet.
Note that you can verify manually: the client will tell you what block height the timestamp was for, and what the expected merkleroot of that block was supposed to be.
You could get the block hash from several online block explorers that provide an API. This might be an OK compromise for your scenario depending on your trust/security requirements.
You could get the block hash from several online block explorers that provide an API. This might be an OK compromise for your scenario depending on your trust/security requirements.
The javascript and java lib are actually doing this, javascript in particular to support in-browser verification. By our experience is a real mess, block explorers have different interfaces so we decided to support insight because there was a bunch of different domains serving with insight. This bunch of different domains frequently go down/disappear causing problems.
To precise @petertodd answer:
ots --no-bitcoin verify test.txt.ots
Assuming target filename is 'test.txt'
Got 3 attestation(s) from cache
Not checking Bitcoin attestation; Bitcoin disabled
To verify manually, check that Bitcoin block 785795 has merkleroot a6fb5252d2c107d6bdf7860f0832eab37f74cb2bec289f39f3997effb61090b6
Not checking Bitcoin attestation; Bitcoin disabled
To verify manually, check that Bitcoin block 785806 has merkleroot 43847a9dbe422f90379c93736e706d4dc018ed6f502eff468a38ea9c8330a7ac
Not checking Bitcoin attestation; Bitcoin disabled
To verify manually, check that Bitcoin block 785873 has merkleroot 7bfbb4fa713584ccb9f42f5c1ba53a025c805a86f7c3f2c99f95c3d1ca3e5b0b
As:
bitcoin-cli getblockhash 785795
error code: -8
error message:
Block height out of range
Get the block hash from elsewhere:
curl https://bitcoinexplorer.org/api/block/785795 | jq .hash
"000000000000000000015d965f5ac86619b2e279f28d116c984dcee714a444bb"
Verify both the block height (as we relied on a third-party service to get the block hash) and the merkle root:
bitcoin-cli getblockheader 000000000000000000015d965f5ac86619b2e279f28d116c984dcee714a444bb | jq '.merkleroot,.height'
"a6fb5252d2c107d6bdf7860f0832eab37f74cb2bec289f39f3997effb61090b6"
785795