No Transaction Occuring [SOLVED]

Hi, so I’m trying to issue certificates on the Ropsten chain and cert-issuer gives me no errors -

$ cert-issuer -c …/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 ethereum_ropsten chain
/usr/local/lib/python3.6/site-packages/merkletools/init.py:7: UserWarning: sha3 is not working!
warn(“sha3 is not working!”)
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Processing 4 certificates
INFO - Processing 4 certificates
INFO - Processing 4 certificates under work path=…/data/tmp
INFO - Processing 4 certificates under work path=…/data/tmp
INFO - Balance check succeeded: {‘status’: ‘1’, ‘message’: ‘OK’, ‘result’: ‘2000000000000000000’}
INFO - Balance check succeeded: {‘status’: ‘1’, ‘message’: ‘OK’, ‘result’: ‘2000000000000000000’}
INFO - Total cost will be 500000000000000 wei
INFO - Total cost will be 500000000000000 wei
INFO - Starting finalizable signer
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
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
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
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 - here is the op_return_code data: d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff79
INFO - here is the op_return_code data: d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff79
INFO - Nonce check went correct: {‘jsonrpc’: ‘2.0’, ‘result’: ‘0x0’, ‘id’: 1}
INFO - Nonce check went correct: {‘jsonrpc’: ‘2.0’, ‘result’: ‘0x0’, ‘id’: 1}
INFO - Starting finalizable signer
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
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
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
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 - signed Ethereum trx = f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a0d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff792aa05f00c4ce6510cd3e94d901f3b8e9176a92062c4e119d03a1cf07954ec94d42d6a05600d603dfcf187db6310affe16ddca57064b61894826d5f16126c98bfd27d7f
INFO - signed Ethereum trx = f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a0d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff792aa05f00c4ce6510cd3e94d901f3b8e9176a92062c4e119d03a1cf07954ec94d42d6a05600d603dfcf187db6310affe16ddca57064b61894826d5f16126c98bfd27d7f
INFO - verifying ethDataField value for transaction
INFO - verifying ethDataField value for transaction
INFO - verified ethDataField
INFO - verified ethDataField
INFO - Transaction ID obtained from broadcast through Etherscan: None
INFO - Transaction ID obtained from broadcast through Etherscan: None
INFO - Broadcast transaction with txid None
INFO - Broadcast transaction with txid None
INFO - Your Blockchain Certificates are in …/data/blockchain-certificates
INFO - Your Blockchain Certificates are in …/data/blockchain-certificates

However, the txid that is stored in sourceID is None probably because no transaction is retrieved from etherscan. This implies that the transaction never took place. Indeed, when I checked my wallet, I still had all of 2 rETHs. What am I doing wrong? Why would it not issue the certificate on Ropsten?

PS. I’m not running docker and I changed the setup.py default chain as ethereum.

Interesting. Is this a constant issue or did it just happen that one time?

constant. for some reason I am not able to deploy the certificates on the Ropsten chain. I tried reintalling the package as well but to the same result. :confused:

Gotcha, I ran it myself just to make sure nothing was absolutely broken with it, and it seemed to work.

If you don’t mind, we can check to see what cert-issuer is seeing by hitting the URL:

https://api-ropsten.etherscan.io/api?module=proxy&action=eth_sendRawTransaction&hex={YOURSIGNEDTX}&apikey=YourApiKeyToken

and replacing {YOURSIGNEDTX} with the hash that spits out after INFO - signed Ethereum trx for you. (leave YourApiKeyToken, it’s a valid api token for testing their API).

Now, if it’s successful, it will transmit the tx, but since it’s ropsten, not too much to worry about.

If you document the json that spits out, that could greatly help us handle this error/exception instead of having None get passed back.

Oh wow, actually, so I found your error in the logs:

/usr/local/lib/python3.6/site-packages/merkletools/init.py:7: UserWarning: sha3 is not working! warn(“sha3 is not working!”)

That could definitely cause the TX from being valid, thus having etherscan reject the transaction. Of course, it should still throw an exception instead of passing None.

Ok so after a little digging around, I found this as the error -

cannot import name ‘keccak_224’

the line in sha.py is

from _sha3 import keccak_224, keccak_256, keccak_384, keccak_512

I commented out that line and ran cert-issuer -c conf.ini again. This time, the warning disappeared but the txid is still None

$ cert-issuer -c 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 ethereum_ropsten chain
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Processing 4 certificates
INFO - Processing 4 certificates
INFO - Processing 4 certificates under work path=…/data/tmp
INFO - Processing 4 certificates under work path=…/data/tmp
INFO - Balance check succeeded: {‘status’: ‘1’, ‘message’: ‘OK’, ‘result’: ‘2000000000000000000’}
INFO - Balance check succeeded: {‘status’: ‘1’, ‘message’: ‘OK’, ‘result’: ‘2000000000000000000’}
INFO - Total cost will be 500000000000000 wei
INFO - Total cost will be 500000000000000 wei
INFO - Starting finalizable signer
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
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
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
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 - here is the op_return_code data: d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff79
INFO - here is the op_return_code data: d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff79
INFO - Nonce check went correct: {‘jsonrpc’: ‘2.0’, ‘result’: ‘0x0’, ‘id’: 1}
INFO - Nonce check went correct: {‘jsonrpc’: ‘2.0’, ‘result’: ‘0x0’, ‘id’: 1}
INFO - Starting finalizable signer
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
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
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
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 - signed Ethereum trx = f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a0d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff792aa05f00c4ce6510cd3e94d901f3b8e9176a92062c4e119d03a1cf07954ec94d42d6a05600d603dfcf187db6310affe16ddca57064b61894826d5f16126c98bfd27d7f
INFO - signed Ethereum trx = f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a0d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff792aa05f00c4ce6510cd3e94d901f3b8e9176a92062c4e119d03a1cf07954ec94d42d6a05600d603dfcf187db6310affe16ddca57064b61894826d5f16126c98bfd27d7f
INFO - verifying ethDataField value for transaction
INFO - verifying ethDataField value for transaction
INFO - verified ethDataField
INFO - verified ethDataField
INFO - Transaction ID obtained from broadcast through Etherscan: None
INFO - Transaction ID obtained from broadcast through Etherscan: None
INFO - Broadcast transaction with txid None
INFO - Broadcast transaction with txid None
INFO - Your Blockchain Certificates are in …/data/blockchain-certificates
INFO - Your Blockchain Certificates are in …/data/blockchain-certificates

Maybe keccak_224 is used by cert-issuer?

Also, I found this in the README for cert-issuer which could be the issue (unless not updated in README)

TransactionHandler deals with putting the data on the blockchain. Currently only a Bitcoin implementation exists

Lastly, I notice that the txid in the middle is always the same and equal to f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a0d26fc2dcc1147fa985323e8d2582a0a7aa7fbedf0b25ef3b5534d8bbd233ff792aa05f00c4ce6510cd3e94d901f3b8e9176a92062c4e119d03a1cf07954ec94d42d6a05600d603dfcf187db6310affe16ddca57064b61894826d5f16126c98bfd27d7f. Maybe there’s an error there?

PS. I’m sorry for all the maybes but I am not sure where my error is occurring :confused:

EDIT 1: I changed the gas_price and gas_limit in conf.ini and got different txids. Now I’m thinking there is something wrong with signing it. @aronning when you ran it, did you get a different txid?

You can not just comment a line in any code and expect it to work. Keccak is a hash algorithm, it can not work without it. I certified my first BlockCerts today on Ropsten, and I don’t have this warning. You should uncomment and fix the problem.

I guess Python 3.6 has issues with keccak_224, I’m on Python 3.5 and no problems. A quick search shows it could be this : https://www.google.com/search?client=ubuntu&channel=fs&q=python+3.6+keccak_224&ie=utf-8&oe=utf-8

I’m facing exactly the same issue.
Running on Docker and trying on ropsten.

I debugged it and saw the URL in this format.

https://api-ropsten.etherscan.io/api?module=proxy&action=eth_sendRawTransaction&hex={YOURSIGNEDTX}&apikey=YourApiKeyToken

(Tx hex is - f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a08c25ff2b66bb52fbaeef43389edc7fca959c23c7f8cf2abb5aed630c0bb043c32aa0456454562ccb1f706337c4b25e4ec13d6ef5385772a5716ad20351dad38a71d8a006aa74bfc0b427b27a716f0d7095f2275b9a3f77c5a9482f828fa017e0dfc882)

When I read the POST response, it fails with
{‘jsonrpc’: ‘2.0’, ‘error’: {‘code’: -32010, ‘message’: ‘Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 500000000000000 and got: 0.’}, ‘id’: 1}

(Which is pretty weird because, I checked the account balance using the ropsten api format (as shown below) and I got the balance of 1ETH. which is its correct balance)

response = requests.post(‘https://api-ropsten.etherscan.io/api?module=account&action=balance&address={MyWalletAddress}&tag=latest&apikey={MyAPIKEY}’)
And, the respose is,
{‘status’: ‘1’, ‘message’: ‘OK’, ‘result’: ‘1000000000000000000’}

@GuillaumeDuveau @Palash-A @aronning
{‘jsonrpc’: ‘2.0’, ‘error’: {‘code’: -32010, ‘message’: ‘Insufficient funds. The account you tried to send transaction from does not have enough funds. Required 500000000000000 and got: 0.’}, ‘id’: 1}

Does this mean its trying to broadcast to mainnet instead of ropsten?
But, I have debugged it and checked, it has netcode= 3 when executing…

@dev @Palash-A

Go here for some troubleshooting: https://npm.runkit.com/ether.js?q=etherjs

and input this:

var ethers = require('ethers');
var Wallet = ethers.Wallet;
  
raw = '0x{YOURSIGNEDTX}'

var transaction = Wallet.parseTransaction(raw); 

From the looks of it, when decoded, your transactions are on ropsten, but the FROM address shows addresses that do not show any funds. Verify whether or not the FROM address is correct. If it is, then you really don’t have funds. If it’s not, then there’s an issue signing the transaction, probably sha3 related.

@dev - so you’re running into this issue with the Docker image too? By chance, do you get the

INFO - This run will try to issue on the ethereum_ropsten chain
/usr/local/lib/python3.6/site-packages/merkletools/init.py:7: UserWarning: sha3 is not working!
warn(“sha3 is not working!”)

error like @Palash-A posted?

@aronning
Nopes. I don’t get the sha3 is not wokring error.

Here’s my console log while trying to issue certificates.

bash-4.3# python3 cert_issuer -c conf_ethtest.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 ethereum_ropsten chain
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Set cost constants to recommended_gas_price=20000000000.000000, recommended_gas_limit=25000.000000
INFO - Processing 2 certificates
INFO - Processing 2 certificates
INFO - Processing 2 certificates under work path=data/work
INFO - Processing 2 certificates under work path=data/work
INFO - Balance check succeeded: {‘status’: ‘1’, ‘message’: ‘OK’, ‘result’: ‘1000000000000000000’}
INFO - Balance check succeeded: {‘status’: ‘1’, ‘message’: ‘OK’, ‘result’: ‘1000000000000000000’}
INFO - Total cost will be 500000000000000 wei
INFO - Total cost will be 500000000000000 wei
INFO - Starting finalizable signer
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
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
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
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 - here is the op_return_code data: 8c25ff2b66bb52fbaeef43389edc7fca959c23c7f8cf2abb5aed630c0bb043c3
INFO - here is the op_return_code data: 8c25ff2b66bb52fbaeef43389edc7fca959c23c7f8cf2abb5aed630c0bb043c3
INFO - Nonce check went correct: {‘jsonrpc’: ‘2.0’, ‘result’: ‘0x0’, ‘id’: 1}
INFO - Nonce check went correct: {‘jsonrpc’: ‘2.0’, ‘result’: ‘0x0’, ‘id’: 1}
INFO - Starting finalizable signer
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
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
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
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 - signed Ethereum trx = f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a08c25ff2b66bb52fbaeef43389edc7fca959c23c7f8cf2abb5aed630c0bb043c32aa0456454562ccb1f706337c4b25e4ec13d6ef5385772a5716ad20351dad38a71d8a006aa74bfc0b427b27a716f0d7095f2275b9a3f77c5a9482f828fa017e0dfc882
INFO - signed Ethereum trx = f884808504a817c8008261a894deaddeaddeaddeaddeaddeaddeaddeaddeaddead80a08c25ff2b66bb52fbaeef43389edc7fca959c23c7f8cf2abb5aed630c0bb043c32aa0456454562ccb1f706337c4b25e4ec13d6ef5385772a5716ad20351dad38a71d8a006aa74bfc0b427b27a716f0d7095f2275b9a3f77c5a9482f828fa017e0dfc882
INFO - verifying ethDataField value for transaction
INFO - verifying ethDataField value for transaction
INFO - verified ethDataField
INFO - verified ethDataField
/usr/lib/python3.6/site-packages/cert_issuer/blockchain_handlers/ethereum/connectors.py(69)broadcast_tx()
→ broadcast_url = self.base_url + ‘?module=proxy&action=eth_sendRawTransaction’
(Pdb) c
INFO - Transaction ID obtained from broadcast through Etherscan: None
INFO - Transaction ID obtained from broadcast through Etherscan: None
INFO - Broadcast transaction with txid None
INFO - Broadcast transaction with txid None
INFO - Your Blockchain Certificates are in data/signed_certificates
INFO - Your Blockchain Certificates are in data/signed_certificates`

Based on your signed transaction, your FROM address is showing as 0xDC61C7F2Cb37Ec6aD537413eD3A9959de8C11a0d

Is that correct?

Meanwhile,
@aronning

Using the Node.js tool,
the from address in the signedTx is actually the recipient’s address. Not the issuer address!!

Explaining what I did, I have issuer address in conf file (this has 1 rETH) and generated unsigned certificate using cert-tools and a recipient address (which has 0 rETH).
But, the signedTx is trying to do a transaction from the recipient address to the burn address!!

Okay interesting. What that might imply to me is that the private key you’re using in the docker image might actually be that of the recipient’s address?

Hmm. Let me check on that.

Meanwhile,
Shouldn’t it just fail trying to verify because issuer address and private key don’t match?

You’re correct, the certificate won’t verify in the end. But this is the issuing step, and there’s no verification done at this step.

I tested out what would happen if I set an issuing address in the config, fund it, then stick a private key that does not match the issuing address, I get the same problem as you.

Ah Cool.
So, I put in the correct key now.
And tried to issue the certificates, It broadcasted and returned a successful transaction ID - 0xb26c7b576e56249021927c94eddc7acc032c7aca6d5c887e90923f02c9b5c6ab

Its still transferring to the burn address (0xdeaddeaddeaddeaddeaddeaddeaddeaddeaddead) that is hard-coded in the code though…

Correct, we do not send the transactions to the recipient addresses. We send the transaction to a burn address, with the data of that transaction corresponding to the hash of the certificate.

In our case, we care about the transaction ID and the data in that transaction. Not the address it goes to.

Oh…

From the main workflow, I got a notion that, once the issuer notifies the recipient, the recipient sends their public address, and then we use that to issue the certificate.

With this I assumed that the transaction will be sent to the recipient’s address.
But, we just use that recipient address to hash along with the certificate’s content?