Blockcert on testnet


#1

I am trying to execute cert issuer however getting insufficient balance error.

however I have verified that the address has balance
https://testnet.blockexplorer.com/address/mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs

INFO - Processing 2 certificates under work path=/etc/cert-issuer/work
INFO - Processing 2 certificates under work path=/etc/cert-issuer/work
WARNING - address mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs has a balance of 0
WARNING - address mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs has a balance of 0
INFO - Total cost will be 133500 satoshis
INFO - Total cost will be 133500 satoshis
ERROR - Please add 133500 satoshis to the address mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs
ERROR - Please add 133500 satoshis to the address mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs
Traceback (most recent call last):
File “/usr/bin/cert-issuer”, line 11, in
load_entry_point(‘cert-issuer==2.0.9’, ‘console_scripts’, ‘cert-issuer’)()
File “/usr/lib/python3.5/site-packages/cert_issuer/main.py”, line 17, in cert_issuer_main
issue_certificates.main(parsed_config)
File “/usr/lib/python3.5/site-packages/cert_issuer/issue_certificates.py”, line 68, in main
return issue(app_config, certificate_batch_handler, transaction_handler)
File “/usr/lib/python3.5/site-packages/cert_issuer/issue_certificates.py”, line 35, in issue
transaction_handler.ensure_balance()
File “/usr/lib/python3.5/site-packages/cert_issuer/transaction_handler.py”, line 94, in ensure_balance
raise InsufficientFundsError(error_message)
cert_issuer.errors.InsufficientFundsError: Please add 133500 satoshis to the address mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs


#2

Please see https://github.com/blockchain-certificates/cert-issuer#obtaining-testnet-coins


#3

Dear @kim,

Thanks for your response.

I have balance in testnet for the address : mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs

But still I am getting zero balance issue.

Based on below statement I am assuming that docker will not be looking at the local node.
By default, cert-issuer does not assume you have a bitcoin/ethereum node running locally, and it uses APIs to look up and broadcast transactions. There is API support for both testnet and mainnet chains.

Although I dont understand python but looking at code I noticed that api that are used are


or
https://testnet.blockexplorer.com/api

when I open first url it redirects me to coinbase,com
I there any way I can directly call the api to check if its returning wrong data?

Regards,
Danish


#4

https: // tbtc.blockr.io/api/v1 is the one that redirect to coinbase


#5

one possibility: what are the contents of your conf.ini? I am wondering which blockchain this is issuing to, so I’d like you check the config.


#6

below are the configuration settings

issuing_address = mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs

chain=bitcoin_testnet
bitcoind

usb_name=/etc/cert-issuer/
key_file=pk_issuer_testnet.txt

unsigned_certificates_dir=/etc/cert-issuer/data/unsigned_certificates
blockchain_certificates_dir=/etc/cert-issuer/data/blockchain_certificates
work_dir=/etc/cert-issuer/work

no_safe_mo


#7

I’m wondering if there is a regression with one of the endpoints we are using. I will debug into this. I should have an answer/fix by tomorrow morning (PST)


#8

Also I have highlight one configuration “bitcoind”… does this setting means that it will look for local node?

issuing_address = mmsyB5TbdphHD2gGAfRq3osLbdSmceERYs

chain=bitcoin_testnet
bitcoind

usb_name=/etc/cert-issuer/
key_file=pk_issuer_testnet.txt

unsigned_certificates_dir=/etc/cert-issuer/data/unsigned_certificates
blockchain_certificates_dir=/etc/cert-issuer/data/blockchain_certificates
work_dir=/etc/cert-issuer/work

no_safe_mode


#9

Dear @kim,

I have an update,

I placed below hard coded statement in
bitcoind = False
in connectors.py => get_providers_for_chain function
and the issue get resolved.

This mean that it is for sure related to configuration, btw before applying this temporary fix I tried
removing bitcoind and also tried setting bitcoind=False in configration and both of them didnt worked for me.

So, for time being I will be using this hardcoded fix.

Regards,
Danish


#10

I see; bitcoind is a flag, so if you omit the line, it will have the same behavior. But if you have the following, it will set bitcoind to true:

bitcoind

Cert issuer error not enough satoshis
Cert issuer error not enough satoshis with Bitcoin Core wallet - URGENT!
#11

Dear Kim,

I tried removing "bitcoind " from configuration and still it is not working. so I guess there is some problem.
I have a workaround but looks like this is an issue.

Thanks,
Danish