Giter VIP home page Giter VIP logo

Comments (8)

lemoustachiste avatar lemoustachiste commented on July 21, 2024

I can't really help there, I don't have enough details. It could be something with your issuing address? It could be your private key file too. I have found that it prefers the WIF format of the key.

from cert-issuer.

KhoiUna avatar KhoiUna commented on July 21, 2024

I use bitcoin-cli getnewaddress to get the issuing address. How do I get that in the WIF format?

from cert-issuer.

lemoustachiste avatar lemoustachiste commented on July 21, 2024

hm it looks like it might already be what you did from the readme:

https://chainquery.com/bitcoin-cli/dumpprivkey

Can you make sure that this private key looks valid? This tool might help you: https://learnmeabitcoin.com/technical/wif

from cert-issuer.

KhoiUna avatar KhoiUna commented on July 21, 2024

I have made sure the key is valid. Here're more details of the error:

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_regtest chain
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 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
INFO - here is the op_return_code data: f4906de7db4f9a826b5998472f51eaac762d429b29b6c2496f38870a477929d9
INFO - Unsigned hextx=0100000001723b97c3f21222d4c3c152ed195e222c32371a6992d18c4248990710ceb303570100000000ffffffff02a07acc1d0000000016001469a84665f30277fc4a75571d3413ac24d83c0aba0000000000000000226a20f4906de7db4f9a826b5998472f51eaac762d429b29b6c2496f38870a477929d900000000
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
ERROR - Unable to sign transaction. hextx=01000000000101723b97c3f21222d4c3c152ed195e222c32371a6992d18c4248990710ceb303570100000000ffffffff02a07acc1d0000000016001469a84665f30277fc4a75571d3413ac24d83c0aba0000000000000000226a20f4906de7db4f9a826b5998472f51eaac762d429b29b6c2496f38870a477929d902473044022056ec60cf16bb916385d334cbaef6c139c3cefd3d2300c81997379dc79618b10502202521c3b02ee69ba44ba339f1185da1727461287933ae8550546399942364bcbc012102833db6109cb447aa10c8ca46ce43d3e663fd2b5333914756230c002db7e3e3fd00000000
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
Traceback (most recent call last):
  File "/usr/bin/cert-issuer", line 8, in <module>
    sys.exit(cert_issuer_main())
  File "/usr/lib/python3.8/site-packages/cert_issuer/__main__.py", line 17, in cert_issuer_main
    issue_certificates.main(parsed_config)
  File "/usr/lib/python3.8/site-packages/cert_issuer/issue_certificates.py", line 36, in main
    return issue(app_config, certificate_batch_handler, transaction_handler)
  File "/usr/lib/python3.8/site-packages/cert_issuer/issue_certificates.py", line 22, in issue
    tx_id = issuer.issue(app_config.chain)
  File "/usr/lib/python3.8/site-packages/cert_issuer/issuer.py", line 27, in issue
    txid = self.transaction_handler.issue_transaction(blockchain_bytes)
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/transaction_handlers.py", line 56, in issue_transaction
    signed_tx = self.sign_transaction(prepared_tx)
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/transaction_handlers.py", line 92, in sign_transaction
    signed_tx = signer.sign_transaction(prepared_tx)
  File "/usr/lib/python3.8/site-packages/cert_issuer/models.py", line 233, in sign_transaction
    return self.signer.sign_transaction(self.wif, transaction_to_sign)
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/signer.py", line 35, in sign_transaction
    raise UnableToSignTxError('Unable to sign transaction')
cert_issuer.errors.UnableToSignTxError: Unable to sign transaction

Also I had to comment the rpcport=8332 in the bitcoin.conf file because when I ran bitcoind -regtest -daemon it said:

Error: Config setting for -rpcport only applied on regtest network when in [regtest] section.

from cert-issuer.

KhoiUna avatar KhoiUna commented on July 21, 2024

So I commented bitcoind in /etc/cert-issuer/conf.ini .

issuing_address=bcrt1qdx5yve0nqfmlcjn42uwngyavynvrcz46wg83dh

verification_method=did:ion:EiA_Z6LQILbB2zj_eVrqfQ2xDm4HNqeJUw5Kj2Z7bFOOeQ

chain=bitcoin_regtest

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

#bitcoind

Then run cert-issuer -c /etc/cert-issuer/conf.ini and got a different error:

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_regtest chain
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 under work path=/etc/cert-issuer/work
Traceback (most recent call last):
  File "/usr/bin/cert-issuer", line 8, in <module>
    sys.exit(cert_issuer_main())
  File "/usr/lib/python3.8/site-packages/cert_issuer/__main__.py", line 17, in cert_issuer_main
    issue_certificates.main(parsed_config)
  File "/usr/lib/python3.8/site-packages/cert_issuer/issue_certificates.py", line 36, in main
    return issue(app_config, certificate_batch_handler, transaction_handler)
  File "/usr/lib/python3.8/site-packages/cert_issuer/issue_certificates.py", line 16, in issue
    transaction_handler.ensure_balance()
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/transaction_handlers.py", line 42, in ensure_balance
    balance = self.connector.get_balance(self.issuing_address)
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/connectors.py", line 181, in get_balance
    spendables = self.get_unspent_outputs(address)
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/connectors.py", line 170, in get_unspent_outputs
    spendables = self.spendables_for_address(bitcoin_address=address)
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/connectors.py", line 153, in spendables_for_address
    get_providers_for_chain(self.bitcoin_chain, self.bitcoind)):
  File "/usr/lib/python3.8/site-packages/cert_issuer/blockchain_handlers/bitcoin/connectors.py", line 273, in get_providers_for_chain
    return connectors[chain]
KeyError: <Chain.bitcoin_regtest: 2>

from cert-issuer.

lemoustachiste avatar lemoustachiste commented on July 21, 2024

I don't know about this error. Can you try with bitcoin testnet instead? Make sure your address is valid for that network.

from cert-issuer.

pranayperiwal avatar pranayperiwal commented on July 21, 2024

Hi did you find a solution to this?

from cert-issuer.

KhoiUna avatar KhoiUna commented on July 21, 2024

Hi did you find a solution to this?

No, I haven't

from cert-issuer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.