Search code examples
ubuntu-16.04hyperledgerhyperledger-sawtooth

How to add Transaction Processors for Hyperledger Sawtooth on Ubuntu 16.04?


Question: I want to develop a custom application using the rest-api and transaction processor from sawtooth-supply-chain as describe here: https://sawtooth.hyperledger.org/docs/core/nightly/0-8/examples/supplychain/overview.html

But I don't know how to add this transaction processor to my Ubuntu vms and use it. The Sawtooth-supply-chain example only comes within docker. But I don't wan't to use docker and run it directly on ubuntu.

Does anyone know how to add transaction-processors and run them on Ubunutu 16.04?

What I have done so far: I created two Ubuntu 16.04 VMs and installed hyperledger sawtooth on both VMs following those tutorials:

https://sawtooth.hyperledger.org/docs/core/releases/1.0/app_developers_guide/ubuntu.html

https://sawtooth.hyperledger.org/docs/core/nightly/1-1/app_developers_guide/creating_sawtooth_network.html#ubuntu-add-a-node-to-the-single-node-environment

I succesfully established a connection between the validators. I was able to use the IntKey Transaction Processor.


Solution

  • To add a transaction processor, you start the TP program. The Docker file shows the command line to start the TP. When the TP starts it registers with the validator. For example, looking at https://github.com/hyperledger/sawtooth-supply-chain/blob/master/docker-compose.yaml for the Sawtooth Supply Chain app, I see:

    cargo build
    supply-chain-tp -v -C tcp://validator:4004
    

    The cargo build only needs to be done the first time to build the TP.