Sjors Provoost

sjors@sprovoost.nl

In reply to a note not in this archive

FYI, Inkan makes extensive use of OTS proofs. They are a central element of a key rotation system. Inkan timestamps a concatenation of event_id + signature. I do find it useful to publish the OTS info through Nostr events. If the OTS info is signed by a known pubkey (possibly by the same pubkey that signed the reference event or one's own pubkey), this can send trust signals which make it less necessary to independently audit the OTS info, absent anything suspicious. I also find it useful to include info about the reference event in the OTS event, in particular the reference event's pubkey, signature and created_at. Moreover, the lowest BTC block in which the proof is anchored and its timestamp should be included. I also think that OTS events should be addressable events -- each signing pubkey should get only one opinion regarding the lowest BTC timestamp that is available for a given reference event. I've included a sample OTS event from Inkan to illustrate the shape that I've found most useful in practice: { "kind": 31045, "id": "9b5e4b154cb30ece6edc94d87c14dad8dec47cacc958227d5b21d36abfa9f6af", "pubkey": "d1a61498f4b1dc26df0becd1a3e9e88f355fb614b771e8b5b277d0ff99a82a23", "created_at": 1777422076, "tags": [ [ "d", "6cf8a174c3e1bc6cb4eda11f5b93a04413776d044c5aed006fef080f336fdfb6" ], [ "p", "d1a61498f4b1dc26df0becd1a3e9e88f355fb614b771e8b5b277d0ff99a82a23" ], [ "s", "429eb4f965e5c2d14bbdb54370e0be63c2388e29d4077d3286349ae7fc7302b61a5e506a05834acb50053908e20ed6a36ae8c09f4fd3b0cef4d9f0a6cec308cf" ], [ "b", "947055" ], [ "t", "1777400959" ], [ "alt", "Complete Bitcoin Timestamp" ], [ "c", "1777391199" ] ], "content": "AE9wZW5UaW1lc3RhbXBzAABQcm9vZgC/ieLohOiSlAEIjqT9pJouNM2LV5xdUIHPi9Zu6ah3DlaMq9GqPd2+/FPwEBzbLgerPtDTFWt/rrsP8fsI8AjH08Luv0xfnQjwIOmb09izZmrXfwDHXH6vLsaVvma8oeREeiQOLbJImkdpCPEgACuUPZl913m7H4qWT/2YhxOVlbka0KiazVt7kzXV2akI8BCF7U/JXsqU0O9VE9DPXB7HCPEg07lLgYAMs6+D2+ORmzf9/d/71YMLY+uBFGVMy+eThgcI8Q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GYwgI8SBoOHnDQvSjamiihpyFRDSnrQ2bjIQqR3JIPjk/+3RWLwgI8SAMoPz2gaKaiCf5CMaYcnz2YRZUXnW/ZtNs0LUKEUcjoAgI8CCIn0U6v7sfmjXH42/9RTgcx7YCOrjS9KcBA6KzK51eBggI8CCDFzGJB3m8HFbI0gbGHAMP5awZJhaSujZ9ipyHD1ExDAgI8CCgoGzBbt5C6fWHxYgE3VbvywUE/slwVJjaoI0uYBJhQggI8CCtSTgUbBKvsVRpwvs0f7RpLiROko8EnX1eNZiVKVIrJggI8CBNZ2rcpTevhVy4Y5WrBXrmWfDB1QgllPr9J+Mmh/VvUwgI8SAqFoRrrr2B+iAuhkx2PrFC+6la03Z/wFOfYlu1aRCGoggIAAWIlg1z1xkBA+/mOQ==", "sig": "7a7a57afba9ec2417e07604e41f63e657472e82ffad66e4f632c6ca954b67dba184c5100faf207e7b36f5f61852409d79f8980006f557f208a89fee59a8b117e" }
Not verifying an OTS proof is honestly, extremely retarded. Ive played around with header syncing in the creation of all of this, and it is so damn trivial. The entire header set is less than 80mb at the moment, and for anything nostr related you can just throw away anything more than 4 years old anyway. If shipping 80mb with the app is too much, a header sync with a list of checkpoints is also a matter of seconds. The only issue is web-clients, because they cant really do the p2p thing connecting to bitcoin nodes, but plenty of alternatives there (ultimately getting the data is a trivial problem, and verifying it is trivial as well) Second, within this standard, you dont need to look for proofs, they are just right there in the event assuming the relay serves them as such (the policy event allows relays to signal this, as well as a bunch of other factors among which the delta between the events 'created_at' and the blockheight of the ots proof.) The only reason for publishing separate events for ots-proofs is indexing, which is kinda shitty because it absolutely does not matter who publishes these index events, or at what time etc. Better to just have a server you can ask if they happen to have a proof querying the target digest. Ive build a purpose build server for this and its super efficient. Ive thought about index events, they could still be done, ideally using blossom to store the proofs. Those index events can then just simply be re-optimized by relays or whoever, combining multiple such index events into one. Its just that I think what i have here currently should be enough I hope you take a good look at this. If you have any questions i'd love to answer them.
Thanks, I'll definitely have to take a look at this. I've been using these 31045 events with the thought that these might eventually get replaced by direct verification, but I have no idea how to go about verifying these proofs in real-time. I basically need every regular event (say k-1, k-6, k-7 etc) that comes into the web client to have a valid OTS proof, meaning that the OTS proof must have a BTC timestamp that falls within some user-set recency window after the created_at of the reference event (e.g 4 hours). Any event that doesn't have such a valid OTS proof must get filtered out and not displayed, as if it had never existed at all. I can't just throw away anything more than 4 years old. This needs to reach back into the past indefinitely. If there is anything I can use for this kind of OTS-based real-time filtering, I'd be very interested to hear about it.
I used not to do it. I was using a sort of scaffolded version of OTS for Inkan's key rotation system. Inkan now verifies all proofs. OTS is pretty essential for making Nostr keys revocable and replaceable.
As an extenuating circumstance, I might add that I was also the guy who pointed out that NIP-03 was broken since it did not include the target event's signature in the hash that got timestamped ... 😇 nevent1qvzqq…wwn5vc
You might be able to use the Bitcoin Core kernel (or even a header-only subset, cc @npub1ryfdh0p…79rg5z) to do the header sync properly (with the double pass). Either via real p2p (not included in kernel) or from a web server (trusted only to not hide a longer chain, but if people want to lie about an OTS proof through a deep reorg, go for it...)

← More from Sjors Provoost