0
votes

In the 7nodes example (https://github.com/jpmorganchase/quorum-examples/tree/master/examples/7nodes ) for quorum, the smart contract that is deployed is a private contract between node1 and node7. To make it private the script file author used public key passed by private key."sending of a private transaction to generate a (private) smart contract (SimpleStorage) sent from node 1 "for" node 7 (denoted by the public key passed via privateFor: ["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="] in the sendTransaction call)."

How exactly the key value "ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc=" was generated i could not understand?

Also, after the completion of the JS file script1.js, it gave me the Contract transaction send: TransactionHash", and i never got the contract address. When will the contract address come after the mining is completed ? How do i recognise that this address is my smart contract address ?

4
In order to make a Transaction/Smart Contract private to a subset of participants on a Quorum network, send a standard Ethereum Transaction but set the privateFor parameter on the message to be the public key(s) of the participant(s) that should be able to view and execute the Transaction or Contract code. source: github.com/jpmorganchase/quorum/wiki/Using-QuorumThogerar

4 Answers

0
votes

The keys are already generated for the nodes. When you spin up the environment, each node is assigned a predefined dummy public keys. this can be found at location : \quorum-examples\examples\7nodes\keys

0
votes

In 7Nodes example you can see the 256bit private key in raft/nodekey* files and the corresponding 512bit public key in nodename (enode) text in static-nodes.json. Use bootnode to create private and public key pairs. And use constellation-node to generate .pub and .key files.

0
votes

To answer the second part of your question, to get the contract address you can use eth.getTransactionReceipt(__); and copy the txHash you get (quoted) into the blank. Then the contract address should come up in one of the fields returned.

Check out this page for more info/details.

0
votes

The key used here is the public key of transaction manager which is respobsible for sending and receiving private transactions in addition to encrypting communications. You can find this key in file named tm.pub inside data folder of the node alongside its associated private key in file tm.key.