bevel icon indicating copy to clipboard operation
bevel copied to clipboard

Spike: Integrating support for private transactions in Express App

Open kaverikhaneja opened this issue 4 years ago • 1 comments

Description

As a developer I want the express app developed in issue #1562 to communicate with the deployed smart contract in a HL-Besu network and be able to do private transactions via the endpoints exposed with this express application.

Proposed Solution

Follow the documentation Interact with private contracts to modify the existing express code.

Acceptance Criteria

If deploying the supply-chain smart contract:

  1. Register some products in the network via the endpoint exposed for that in particular.
  2. Get the products via the express API and check if they were registered correctly in the blockchain.

kaverikhaneja avatar Nov 11 '21 18:11 kaverikhaneja

Please assign it to me.

vishaalreddy avatar Aug 17 '22 10:08 vishaalreddy

I'll take this issue

mgCepeda avatar Jan 16 '23 08:01 mgCepeda

@suvajit-sarkar @jagpreetsinghsasan For this issue, a private transaction has been managed manually. To carry out said transaction, the following process has been followed. First, following, the abi and bin files have been created using the comple.js and SimpleStorage.sol files from the documentation. https://besu.hyperledger.org/en/stable/private-networks/tutorials/contracts/#use-eth_sendsignedtransaction. Then we proceed to execute the node private_tx.js. I attach the necessary files here. (Change the extension to .js) private_tx.txt keys.txt The directory structure that you must have to execute the contract is the following: image It has been done successfully for the IBFT and QBFT consensus with version 21.10.6 and for the QBFT consensus version 22.10.2 Besu-IBFT-21.10.6 image Besu-QBFT-21.10.6  image Besu-QBFT-22.10.2 image And the setup for the tests carried out has been the following: image

mgCepeda avatar Jan 30 '23 09:01 mgCepeda