Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block explorer verification #127

Open
icedevml opened this issue Feb 21, 2022 · 3 comments
Open

Block explorer verification #127

icedevml opened this issue Feb 21, 2022 · 3 comments

Comments

@icedevml
Copy link

Dear Maintainers,

currently it is required to have an access to a Bitcoin node in order to be able to use ots verify command.

I think it would be pretty straightforward to implement alternative verification method with the support of block explorer API. For instance blockstream.info has a public API with an open access.

Would you accept a pull request if I would contribute block explorer verification support to the ots client? I think it could make this project much more user friendly. It would be possible to use ots verify with a very little effort to setup everything.

@petertodd
Copy link
Member

I can't seem to find it right now. But on the ots-dev mailing list (or maybe bitcoin-dev?) there should be discussion of a proposed block header validation scheme specific to timestamps. tl;dr: by checking that a timestamp is committed to by a bunch of Bitcoin block headers, we can prove the total $ value that would have needed to be spent to fake the timestamp. That's not as secure as Bitcoin. But in conjunction with a semi-trusted block header source I think that'd be ok.

Due to security I'm dubious about just trusting third parties like blockstream.info blindly.

@petertodd
Copy link
Member

CC: @RCasatta

@RCasatta
Copy link
Member

RCasatta commented May 4, 2022

It would work roughly work like this:

ots verify proof.ots

  • if bitcoin is running use it
  • if it's not running do light verification

light verification

proof.ots attestation attests block is number X

  • query block explorer for block header X, X+1,... X+Y
  • verify X+Y previous block hash = hash(X+Y-1), repeat up to X
  • verify difficulty rules are respected
  • tell the user the attestation is committed by Y blocks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants