To verify a certificate

Hi,

I followed the README instructions step by step on Cert-Tools, Cert-Issuer and Cert-Viewer. I got to a point where I can see a certificate I created with my own roster.csv in my explorer with Cert-Viewer running.

But, I’m getting an error in the certificate screen when pressing the button “Verify certificate”. On the webpage nothing happens. On the cert-viewer terminal window I get the following error:

2017-06-29 17:57:24,975 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): www.blockcerts.org
2017-06-29 17:57:25,282 - urllib3.connectionpool - DEBUG - https://www.blockcerts.org:443 "GET /samples/2.0-alpha/revocationList.json HTTP/1.1" 200 289
2017-06-29 17:57:25,288 - root - DEBUG - Found results at url=https://www.blockcerts.org/samples/2.0-alpha/revocationList.json
2017-06-29 17:57:25,292 - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): api.blockcypher.com
2017-06-29 17:57:25,546 - urllib3.connectionpool - DEBUG - http://api.blockcypher.com:80 "GET /v1/btc/test3/txs/57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9?limit=100 HTTP/1.1" 404 100
2017-06-29 17:57:25,548 - root - ERROR - Error looking up transaction_id with url=http://api.blockcypher.com/v1/btc/test3/txs/57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9?limit=100, status_code=404
2017-06-29 17:57:25,548 - root - WARNING - Error looking up transaction, trying more connectors
2017-06-29 17:57:25,552 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): tbtc.blockr.io
2017-06-29 17:57:31,725 - urllib3.connectionpool - DEBUG - https://tbtc.blockr.io:443 "GET /api/v1/tx/info/57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9 HTTP/1.1" 404 None
2017-06-29 17:57:31,732 - root - ERROR - Error looking up transaction_id with url=https://tbtc.blockr.io/api/v1/tx/info/57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9, status_code=404
2017-06-29 17:57:31,733 - root - WARNING - Error looking up transaction, trying more connectors
2017-06-29 17:57:31,733 - root - ERROR - Unhandled Exception: [InvalidTransactionError(u'error looking up transaction_id=57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9',), InvalidTransactionError(u'error looking up transaction_id=57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9',)]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "/home/gab/proyecto/cert-viewer/cert_viewer/views/verify_view.py", line 11, in dispatch_request
    view_model = self.view(*args, **kwargs)
  File "/home/gab/proyecto/cert-viewer/cert_viewer/verifier_bridge.py", line 8, in verify
    verify_response = verifier.verify_certificate(certificate)
  File "/usr/local/lib/python2.7/dist-packages/cert_verifier/verifier.py", line 28, in verify_certificate
    transaction_info = connector.lookup_tx(certificate_model.txid)
  File "/usr/local/lib/python2.7/dist-packages/cert_verifier/connectors.py", line 71, in lookup_tx
    raise InvalidTransactionError(exceptions)
InvalidTransactionError: [InvalidTransactionError(u'error looking up transaction_id=57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9',), InvalidTransactionError(u'error looking up transaction_id=57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9',)]

Now, if I try to access that link by myself (https://tbtc.blockr.io/api/v1/tx/info/57d4e8e7b1807656f30908e1d8406e702f79def274fb15dc0237087a74cbcfa9) I get the following error:

{“status”:“fail”,“data”:null,“code”:404,“message”:“No records found”}

Seems like my certificate wasn’t ‘uploaded’ or something?
Hope you can clarify this to me.

Thanks!
Gabriel

Hi Gabriel,
I’m wondering – did you use the docker image of cert-issuer to issue the certificates? The docs may have been unclear. The default mode of the docker image is regtest, which is a test mode that doesn’t issue to a blockchain. You need to issue either in testnet or mainnet mode to be able to use the verifier.

If this is the case (if you used regtest mode), then you will only be able to view the certificate. So you probably did this correctly. I will find a way to clarify the docs, because I think this is unclear right now.

Thanks,
Kim

Thank you for your answer Kim.

Indeed I was using the docker image. I found some documents about the issuing options for Testnet mode. They clarify some more, I’ll try to run on Testnet mode following the instructions there.

https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/bitcoin_options.md
https://github.com/blockchain-certificates/cert-issuer/blob/master/docs/issuing.md

I have a question though. At some point the second document mentions a transaction fee of 60,000 satoshis (~$1.50 USD, 7/3/2017). Is this fee always needed, even when working on Testnet mode?

Regards,
Gabriel

A fee is always recommended, even in testnet mode, to ensure faster mining of the transaction. There are many testnet faucets you can use to get some funds.