ERROR of "cert-issuer -c /etc/cert-issuer/conf.ini"

#1

I generate two unsigned certificates, commands used are below:
step 1 sudo python create_v2_certificate_template.py -c conf.ini(generate template)

step 2 generate two testnet address starting with char ‘n’,and configure the rosters/roster_testnet.csv with the two address.

step 3 sudo python instantiate_v2_certificate_batch.py -c conf.in(generate unsigned cert)
note:conf.ini is default file from git website.

step 4 copy the two unsigned cert files to /etc/data/unsigned_certificates.
cp /data/unsigned_certificates/.json /etc/cert-issuer/data/unsigned_certificates/

then I start docker by “docker run -it bc/cert-issuer:1.0 bash”
step 1 create issuing address by bitcoin-cli command and update two files as below:

issuer=`bitcoin-cli getnewaddress`
sed -i.bak "s/<issuing-address>/$issuer/g" /etc/cert-issuer/conf.ini
bitcoin-cli dumpprivkey $issuer > /etc/cert-issuer/pk_issuer.txt

step 2 get bitcoin for regtest mode(at this step i change chain parameter in conf.ini to bitcoin_testnet)

step3 Issue the certificates on the blockchain by cert-issuer -c /etc/cert-issuer/conf.ini, here i got an error as follows,please help find out the bug(i also tried to use the unsigned certificates under dir /cert-issuer/examples/,the same error occured):

sh-4.3# cert-issuer -c /etc/cert-issuer/conf.ini
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 - Processing 2 certificates
INFO - Processing 2 certificates under work path=/etc/cert-issuer/work
INFO - Total cost will be 133500 satoshis
INFO - Starting finalizable signer
WARNING - 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 - Stopping finalizable signer
WARNING - 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
/etc/cert-issuer/work/unsigned_certificates/8fb3b356-47ee-454a-bc90-01920cd7a2fd.json
/etc/cert-issuer/work/unsigned_certificates/983c9c7b-c221-4cc6-9b59-afd376e03f9b.json
INFO - here is the op_return_code data: 1f51adc7b04f01ceaec4df7a77938afa003a5930f4bbc3dbc3e517e0df71e234
INFO - Unsigned hextx=01000000018288bf53c912f7af2e70bb0b6528cfd00f40f57e53b8dc15f0e88bae9634b2d80000000000ffffffff0260fcc61d000000001976a914740b8da784a5130bf65f4e26e26cd27d6b97cdea88ac0000000000000000226a201f51adc7b04f01ceaec4df7a77938afa003a5930f4bbc3dbc3e517e0df71e23400000000
INFO - Preparing tx for signing
INFO - Starting finalizable signer
WARNING - 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 - Stopping finalizable signer
WARNING - 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 - The actual transaction size is 235 bytes
INFO - Signed hextx=01000000018288bf53c912f7af2e70bb0b6528cfd00f40f57e53b8dc15f0e88bae9634b2d8000000006b48304502210095bcb0df01ba8d83c78ea6ea9355998209eb70daa93b39cc69ff343a74b072a602200dc7286dea97012ddd21a7410250d94041adcd858d78316b5af91ca47d68c935012102f952af0885dd0b0ad65ec9ea4b09dafad9cc91115dba8df8a247418e9cc612b0ffffffff0260fcc61d000000001976a914740b8da784a5130bf65f4e26e26cd27d6b97cdea88ac0000000000000000226a201f51adc7b04f01ceaec4df7a77938afa003a5930f4bbc3dbc3e517e0df71e23400000000
INFO - Signed hextx=01000000018288bf53c912f7af2e70bb0b6528cfd00f40f57e53b8dc15f0e88bae9634b2d8000000006b48304502210095bcb0df01ba8d83c78ea6ea9355998209eb70daa93b39cc69ff343a74b072a602200dc7286dea97012ddd21a7410250d94041adcd858d78316b5af91ca47d68c935012102f952af0885dd0b0ad65ec9ea4b09dafad9cc91115dba8df8a247418e9cc612b0ffffffff0260fcc61d000000001976a914740b8da784a5130bf65f4e26e26cd27d6b97cdea88ac0000000000000000226a201f51adc7b04f01ceaec4df7a77938afa003a5930f4bbc3dbc3e517e0df71e23400000000
INFO - verifying op_return value for transaction
INFO - verified OP_RETURN
INFO - Broadcasting succeeded with method_provider=<bound method BitcoindConnector.broadcast_tx of <cert_issuer.blockchain_handlers.bitcoin.connectors.BitcoindConnector object at 0x7f6655738e48>>, txid=02c50df4617b7b0a77d186f5551d7cb32020b32d6fac4ca2b58f8422ed4c09f9
Traceback (most recent call last):
File “/usr/bin/cert-issuer”, line 11, in
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 22, in issue
tx_id = issuer.issue(app_config.chain)
File “/usr/lib/python3.6/site-packages/cert_issuer/issuer.py”, line 28, in issue
self.certificate_batch_handler.finish_batch(txid, chain)
File “/usr/lib/python3.6/site-packages/cert_issuer/certificate_handlers.py”, line 127, in finish_batch
self.certificate_handler.add_proof(metadata, proof)
File “/usr/lib/python3.6/site-packages/cert_issuer/certificate_handlers.py”, line 24, in add_proof
certificate_json = self._get_certificate_to_issue(certificate_metadata)
File “/usr/lib/python3.6/site-packages/cert_issuer/certificate_handlers.py”, line 31, in _get_certificate_to_issue
print(certificate_metadata.unsigned_cert_file_name)
AttributeError: ‘tuple’ object has no attribute ‘unsigned_cert_file_name’

Thanks!

0 Likes

Ethereum Cert-issuer installation error
#2

Could you share what you have for the cert-issuer conf.ini file?

0 Likes

#3

Just use default conf.ini file:
issuing_address = $my_issuing_address
chain=bitcoin_testnet
bitcoind
usb_name=/etc/cert-issuer/(Q:what usb_name?)
key_file=pk_issuer.txt(should it be absolute path?)
unsigned_certificates_dir=/etc/cert-issuer/data/unsigned_certificates(note: i put the files generated by cert-tools into this folder)
blockchain_certificates_dir=/etc/cert-issuer/data/blockchain_certificates
work_dir=/etc/cert-issuer/work
no_safe_mode

0 Likes

#4

There are some questions for certificate generation and verification:
I want to issue a certificate on testnet and verify it. I found the cert-issuer demo is for regtest network.therefore the questions are:
1, after the docker run with command(docker run -it bc/cert-issuer:1.0 bash), need I to reconfigure /root/.bitcoin/bitcoin.conf like below, kill bitcoind process and then restart it in docker using command " bitcoind -daemon -conf=/root/.bitcoin.conf" ?
The bitcoin.confi file for testnet:
rpcuser=/***/ (Q:how to create rpcuser/rpcpassword?what is the purpose of it?)
rpcpassword=/***/
testnet=1
server=1 (Q: does it mean the machine will serve as a blockchain node of testnet? what if server=0?)
rpctimeout=30
rpcport=8332

2, In the example for cert-issuer demo, use bitcoin-cli to generate bitcoin, is it only for regtest mode? for testnet mode, can I get test bitcoins with the same command?

3, I transfered some amount of testnet bitcoin, the amount can be checked in website(like https://live.blockcypher.com), but the amount is always zero when checking the testnet address using command “bitcoin-cli getbalance $testnet addr”. I have no idea what happen,could you have some advice how to fix this problem?

4, if all the operations are correct, can the generated certificate be verified at web site:
www.blockcerts.org by dragging the blockchain certificate json file into it?

1 Like

#5

Hi @ntydrm, did you find any solution/crack to the problem, I am still stuck with this problem.
I am using testnet and thus edited my conf.ini file with bitcoind=False.
Any lead in this direction?
Thanks in advance.
-Gaurav

0 Likes