# Blockcert on testnet

**URL:** <https://community.blockcerts.org/t/blockcert-on-testnet/501>\
**Category:** Support\
**Created:** [November 7, 2017, 7:40am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501 "2017-11-07T07:40:54Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [November 7, 2017, 7:40am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/1 "2017-11-07T07:40:54Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![kim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/kim/32/307_2.png) [@kim](https://community.blockcerts.org/u/kim)\
**Post date:** [November 7, 2017, 7:58pm UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/2 "2017-11-07T19:58:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [November 8, 2017, 4:39am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/3 "2017-11-08T04:39:11Z")

</div>

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  
[https://tbtc.blockr.io/api/v1](https://tbtc.blockr.io/api/v1)  
or  
[https://testnet.blockexplorer.com/api](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

---

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [November 8, 2017, 4:40am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/4 "2017-11-08T04:40:11Z")

</div>

https: // [tbtc.blockr.io/api/v1](http://tbtc.blockr.io/api/v1) is the one that redirect to coinbase

---

<div class="post-metadata">

**Author:** ![kim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/kim/32/307_2.png) [@kim](https://community.blockcerts.org/u/kim)\
**Post date:** [November 8, 2017, 5:12am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/5 "2017-11-08T05:12:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [November 8, 2017, 5:16am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/6 "2017-11-08T05:16:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/kim/32/307_2.png) [@kim](https://community.blockcerts.org/u/kim)\
**Post date:** [November 8, 2017, 5:18am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/7 "2017-11-08T05:18:26Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [November 8, 2017, 5:19am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/8 "2017-11-08T05:19:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [November 8, 2017, 6:21am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/9 "2017-11-08T06:21:42Z")

</div>

Dear @kim,

I have an update,

I placed below hard coded statement in  
bitcoind = False  
in [connectors.py](http://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

---

<div class="post-metadata">

**Author:** ![kim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/kim/32/307_2.png) [@kim](https://community.blockcerts.org/u/kim)\
**Post date:** [November 8, 2017, 7:46am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/10 "2017-11-08T07:46:22Z")

</div>

> [@d.hussain](#):
>
> bitcoind = False

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:

```auto
bitcoind

```

---

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [November 16, 2017, 7:36am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/11 "2017-11-16T07:36:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![itinawi](https://avatars.discourse-cdn.com/v4/letter/i/41988e/32.png) [@itinawi](https://community.blockcerts.org/u/itinawi)\
**Post date:** [April 6, 2018, 12:46am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/12 "2018-04-06T00:46:04Z")

</div>

Is there a way of doing this without bitcoind?

I’m facing a similar issue:

> [@Insufficient Funds due to SSL error](https://community.blockcerts.org/t/insufficient-funds-due-to-ssl-error/944):
>
> Hi, I am trying to issue certificates on bitcoin testnet. I got an error and narrowed it down to SSL certificates not working properly. I raised an issue on GitHub and have gotten no response for over a month now… Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Julian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/julian/32/446_2.png) [@Julian](https://community.blockcerts.org/u/Julian)\
**Post date:** [May 25, 2018, 10:07pm UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/13 "2018-05-25T22:07:22Z")

</div>

HI Hussain! And Kim!  
Im getting better at this, and still crashing but against new walls. I have as you did @d.hussain, and completed my conf.ini file with bitcoind=false, but I do not understand what you mean by this

> [@d.hussain](#):
>
> in [connectors.py](http://connectors.py) =\> get\_providers\_for\_chain function

Can you elaborate a little bit further??  
Thanks in advanced

---

<div class="post-metadata">

**Author:** ![d.hussain](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@d.hussain](https://community.blockcerts.org/u/d.hussain)\
**Post date:** [May 27, 2018, 6:50am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/14 "2018-05-27T06:50:29Z")

</div>

Dear @Julian,

bitcoind = False was not working for us. So as a workaround we modified the code to ignore the parameter. That was just a workaround to keep moving…

Now in our configuration we have completely removed this parameter and added another one as below  
no\_bitcoind

Above is working fine with us.

Regards,  
Danish

---

<div class="post-metadata">

**Author:** ![Julian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/julian/32/446_2.png) [@Julian](https://community.blockcerts.org/u/Julian)\
**Post date:** [May 27, 2018, 5:03pm UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/15 "2018-05-27T17:03:36Z")

</div>

Thanks for your response @d.hussain!  
Im a beginer/amateur programer, so everything requires a lot of hard work. I managed to ““publish”” on the regtest version of the cert-issuer ussing the docker version.

> [@d.hussain](#):
>
> bitcoind = False was not working for us. So as a workaround we modified the code to ignore the parameter. That was just a workaround to keep moving…

Im trying to do this workaround also but im having a hard time to implement. I tried to see your “connectors.py” but I get an error and can not acces, is it a downloadable version?  
I also tried to modify the Code, but I think I did not do it right, from the connectors.py from github lines 144 through 147:  
“def spendables\_for\_address(self, bitcoin\_address):  
for m in service\_provider\_methods(‘spendables\_for\_address’,  
get\_providers\_for\_chain(self.bitcoin\_chain, self.bitcoind)):”  
what I did was replace self.bitcoind for a bitcoind=False as I understood you did but the error persists. Will you show me exactly how you did that workaround to get it to publish? For a non progamer 🙂  
I will try to find a permanent solution later, once i get to issue my first certificate.  
Thanks in advance for all the help  
Julian

---

<div class="post-metadata">

**Author:** ![Taibah](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@Taibah](https://community.blockcerts.org/u/Taibah)\
**Post date:** [July 6, 2018, 8:59am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/16 "2018-07-06T08:59:50Z")

</div>

How did you guys fix this problem i still have this issue i tried almost everything and still getting the error.

cert\_issuer.errors.InsufficientFundsError: Please add 133500 satoshis to the address

if i change the settings i get this error also

AttributeError: ‘CertificateBatchHandler’ object has no attribute ‘certificates\_to\_issue’

i tried changing the chain to reg and still also with the bitcoind and without

issuing\_address = myaddress

chain=bitcoin\_testnet  
bitcoind=false

usb\_name=/etc/cert-issuer/  
key\_file=pk\_issuer.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

---

<div class="post-metadata">

**Author:** ![johnwick](https://sea2.discourse-cdn.com/flex016/user_avatar/community.blockcerts.org/johnwick/32/565_2.png) [@johnwick](https://community.blockcerts.org/u/johnwick)\
**Post date:** [April 16, 2019, 10:01pm UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/17 "2019-04-16T22:01:23Z")

</div>

> [@d.hussain](#):
>
> bitcoind = False was not working for us. So as a workaround we modified the code to ignore the parameter. That was just a workaround to keep moving…
> 
> Now in our configuration we have completely removed this parameter and added another one as below  
> no\_bitcoind
> 
> Above is working fine with us.

Can you please post the connectors.py script here so that learners like me can refer the changes to be made.

Thanks in advance!  
Gaurav

---

<div class="post-metadata">

**Author:** ![JustNET](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@JustNET](https://community.blockcerts.org/u/JustNET)\
**Post date:** [January 3, 2020, 8:55am UTC](https://community.blockcerts.org/t/blockcert-on-testnet/501/18 "2020-01-03T08:55:28Z")

</div>

Thanks d.hussain but I tried your approach however couldn’t solve the same problem.
