1

 I am currently learning quorum. I was able to build two node environment by referring to "Creating a network from scratch" in the following quorum official link, and successed to attach node1 using geth.ipc.

quorum

But I don't know how to create private-transactions between two nodes as a flow after this. Does it have any other setting files and script files its need?

static-nodes.json file is below.

[
    "enode://cbe04627713bfdc6f416a8ed97fc12f602ff85c4f775412100cf69e77bf1de20b54b84c6e799e05ea0e921ad84a8b3d0dfc80ad8b868af29a89b2f0613d3cb15@127.0.0.1:21001?discport=0&raftport=50001",
    "enode://f1956696a0dbdfc90befcc1030be83cdb5926e2f5193c6c2e069dd9ba42b9fd5f0d81cfa27cb26b01c959bcd4130bedb182bf9dc3e771b8385e94fab07738b33@127.0.0.1:21002?discport=0&raftport=50002"
]

genesis.json file is below.

{
    "alloc": {
      "0x4045b87bfb1fb46177b09284d0d9845d29e82bb5":{
        "balance": "1000000000000000000000000000"
      },
      "0x48c0b6c52ca9cd1f2380213e82ddeb4c5a7de0d3":{
        "balance": "2000000000000000000000000000"
      }
    },
   "coinbase": "0x0000000000000000000000000000000000000000",
   "config": {
     "homesteadBlock": 0,
     "byzantiumBlock": 0,
     "chainId": 10,
     "eip150Block": 0,
     "eip155Block": 0,
     "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
     "eip158Block": 0,
     "isQuorum": true
    },
   "difficulty": "0x0",
   "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
   "gasLimit": "0xE0000000",
   "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578",
   "nonce": "0x0",
   "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
   "timestamp": "0x00"
  }
2

As per the response from Florian - follow the instructions in the docs for Creating Private Transactions/Contracts.

Make sure you have a transaction manager running for each node (e.g. Tessera).

Essentially you just need to add a 'privateFor' field to the transaction; this must contain the public key of the private transaction participant (i.e. the public key for the transaction manager on the other node).

BTW Assuming you're using a recent version of Quorum, I'd suggest also adding the following to your genesis:

"constantinopleBlock": 0,

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.