Issue Blockcerts on Ethereum [under development]

Hello everyone,

Multiple times the forum has discussed whether it would be possible to issue blockcerts on Ethereum. Blockcerts have always said that this would be possible, and that they are pretty blockchain agnostic. However, it hasn’t been a priority.

I just want to give a little heads-up that time is changing as I’m currently in the development of adding onto the cert-issue repo to make it usable in issuing towards Ethereum.

On a file level I’m looking into the following updates:

  • config.py: Add ethereum arguments, update the get_config with enum to accomodate for ethereum_chain params
  • cert_schema.py: chain: Add ethereum networks
  • Issue_certificates.py: update Main with correct args.
  • Connectors.py: Abstract serviceproviderConnector to let it choose a blockchain first, and then do all the blockchain specific parts within new BitcoinserviceProvciderConnector and ethereumserviceprovider.
  • Connectors.py: Add connectors for ethereum services like etherscan-api / infura / myetherwallet
  • tx_utils.py: abstract the TransactionCostConstants class, rename current to BitcoinTransactionconstConstants, and create new EthereumTransactionConstConstants with gasprice calc’s, nonce, and new createtxs.
  • Signer.py: new class EthereumSigner, update initialize_signer with ethereum option, update verify_message with ethereum option
  • transaction_handler.py: Create new class EthereumTransactionHandler, and update the TransactionV2Creator to accomodate for ethereum transactions
  • merkle_tree_generator.py: update the get_proof_generator with new anchors
  • requirements.txt: Add ether requirements

Furthermore I propose for the first iteration a simplistic transaction format in the following form:
issuer controlled address -> issuer controlled address with merkle root in Ethereum transaction data field.

For later Ethereum related iterations options are open, for example issue by a transaction to an Issuer contract that updates a mapping or issue individual certificates to individual receiver’s contracts.
Discussions are open for other issuing forms that make use of the added features of the Ethereum blockchain.

This is my first (big) python project, so don’t expect a rocket science pull-request yet, just a simple ethereum port. :wink:

Big thanks to Kim for her help

4 Likes

Hi Brinkkemper,

Great work,

I am looking for ethereum version of blockcert. If possible could please share code repository of blockcert(etthereum version).

The issuing side to Ethereum is ready. It can be used by installing the current branch of the Cert-issuer repository: https://github.com/blockchain-certificates/cert-issuer

For the configuration options needed to issue on Ethereum, please check the prerequisites for Ehtereum issuance in the README. I advice to use the Ropsten testnet before trying to issue on the Ethereum mainnet and spending real Ether.

Currently the issuer posts the merkle root of the certificate batch in the data field of a transaction. You can manually verify the root on a service like Etherscan. Automatic verification is still todo for Ethereum.

If you have any trouble, feel free to ask more questions.

5 Likes

Hi Brinkkemper,

A quick question on using Ethereum.

I am trying to run the Ethereum version of cert-issuer.

I run python3 issue_certificates.py , however I get the below error?

ERROR - get_providers_for_chain() takes 1 positional argument but 2 were given

Any idea on how I can fix this? Is there something wrong with the conf file below?

Conf.ini File

issuing_address = 0x47de4099501......
chain = ethereum_ropsten

# <ethereum_testnet|ethereum_ropsten|ethereum_mainnet>

usb_name = /02_Blockchain/01_MIT_Cert/01_EthereumTest
key_file=pk.txt

unsigned_certificates_dir=/02_Blockchain/01_MIT_Cert/cert-issuer/data/unsigned_certificates/
blockchain_certificates_dir=/02_Blockchain/01_MIT_Cert/cert-issuer/data/blockchain_certificates/
work_dir=/02_Blockchain/01_MIT_Cert/cert-issuer/work/

no_safe_mode

Thanks,

Jake