From 23467cb475e7261f787c4bd4c6914d7601f7a379 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Thu, 9 Mar 2017 08:11:47 -0500 Subject: [PATCH] Add Bitcoin block hash to proof-of-freshness Rational as Joanna Rutkowska put it: 1. Simple 2. Doesn't trust external organizations 3. Doesn't require working RSS feeds to be verified Blockchain.info's API is used, with the 10th most-recent block hash used rather than the most recent to (drastically) reduce the risk of a re-org invalidating the hash used. That said, if that does happen (or blockchain.info screws up) it's not the end of the world: we still have the RSS feeds as backup. --- utils/proof_of_freshness_generator.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/proof_of_freshness_generator.sh b/utils/proof_of_freshness_generator.sh index 456933b..229f340 100755 --- a/utils/proof_of_freshness_generator.sh +++ b/utils/proof_of_freshness_generator.sh @@ -14,3 +14,4 @@ feedstail -1 -n5 -f {title} -u http://feeds.bbci.co.uk/news/world/rss.xml feedstail -1 -n5 -f {title} -u http://feeds.reuters.com/reuters/worldnews +curl -s http://blockchain.info/blocks/?format=json | python3 -c "import sys, json; print(json.load(sys.stdin)['blocks'][10]['hash'])"