Not enough satoshis when issuing certificates in testnet mode

I have enough satoshis in given address
Stack Trace

WARNING - Your app is configured to skip the wifi check when the USB is plugged in. Read the documentation to ensure this is what you want, since this is less secure
INFO - This run will try to issue on the bitcoin_testnet chain
INFO - Set cost constants to recommended_tx_fee=0.000600,min_per_output=0.000028,satoshi_per_byte=250
INFO - Set cost constants to recommended_tx_fee=0.000600,min_per_output=0.000028,satoshi_per_byte=250
INFO - Processing 1 certificates
INFO - Processing 1 certificates
INFO - Processing 1 certificates under work path=/etc/cert-issuer/work
INFO - Processing 1 certificates under work path=/etc/cert-issuer/work
WARNING - address n386p4MeZeZp95JFvSEtuHTDxk5pg3jzqm has a balance of 0
WARNING - address n386p4MeZeZp95JFvSEtuHTDxk5pg3jzqm 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 n386p4MeZeZp95JFvSEtuHTDxk5pg3jzqm
ERROR - Please add 133500 satoshis to the address n386p4MeZeZp95JFvSEtuHTDxk5pg3jzqm
Traceback (most recent call last):
  File "/usr/bin/cert-issuer", line 11, in <module>
    load_entry_point('cert-issuer==2.0.15', 'console_scripts', 'cert-issuer')()
  File "/usr/lib/python3.6/site-packages/cert_issuer/__main__.py", line 17, in cert_issuer_main
    issue_certificates.main(parsed_config)
  File "/usr/lib/python3.6/site-packages/cert_issuer/issue_certificates.py", line 36, in main
    return issue(app_config, certificate_batch_handler, transaction_handler)
  File "/usr/lib/python3.6/site-packages/cert_issuer/issue_certificates.py", line 16, in issue
    transaction_handler.ensure_balance()
  File "/usr/lib/python3.6/site-packages/cert_issuer/blockchain_handlers/bitcoin/transaction_handlers.py", line 51, in ensure_balance
    raise InsufficientFundsError(error_message)
cert_issuer.errors.InsufficientFundsError: Please add 133500 satoshis to the address n386p4MeZeZp95JFvSEtuHTDxk5pg3jzqm

conf.ini

issuing_address=n386p4MeZeZp95JFvSEtuHTDxk5pg3jzqm
chain=bitcoin_testnet
usb_name=/etc/cert-issuer/
key_file=/etc/cert-issuer/pk
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

Tried rebuilding docker image too…

1 Like

Does anybody have workaround for this?
I have edited connectors.py and added bitcoind=False in last function, problem was resolved, but certificate generated was invalid due to some reason, so tried rebuilding new copy of docker image and this workaround was not working when i edited file again?

If you’re using bitcoind for testnet/mainnet, then you need to make sure that bitcoind is up to date with all of the blocks. Or else when it looks up your address locally, it won’t see your funding transactions.

bitcoind=false uses blockchain explorers for retrieving / posting transactions. Doesn’t look like you have that line in your config.

I am also facing the same problem. I thought, cert-issuer uses APIs hence it would perform lookup. Well, how do I make sure bitcoind is up to date? Any command to update, please?