I have a Quorum network running on Azure Blockchain service.
Sending private messages to a particular public key is failing. It was working till last week. No code or configuration changes have been made.
The exact same code works if we use the public key of another node on the network or even if we skip the privateFor parameter completely(as in a public transaction).
We get the same error message if we use any random public key. So it seems something is wrong with the public key. These nodes have been running fine for weeks now.
Code
const Web3 = require('web3')
const fs = require('fs')
const rpcURL = "https://<myNode1>.blockchain.azure.com:3200/<Accesskey>"
const web3 = new Web3(rpcURL)
const account = '<myAccount>'
const accountPassword = '<pwd>'
const contractByteCode = fs.readFileSync('myContractBytecodeFile.json','UTF-8');
(async() => {
await web3.eth.personal.unlockAccount(account, accountPassword, 10);
const txCount = await web3.eth.getTransactionCount(account);
console.log("txCount=",txCount);
const txObject = {
from: account,
nonce: web3.utils.toHex(txCount),
gas: web3.utils.toHex(3000000),
gasPrice: web3.utils.toHex(web3.utils.toWei('0', 'gWei')),
data: contractByteCode,
privateFor: ['<myNode2PublicKey>']
}
const tx = await web3.eth.sendTransaction(txObject);
console.log(tx);
})();
Error
(node:1184) UnhandledPromiseRejectionWarning: Error: Returned error: Non-200 status code: &{Status:500 Internal Server Error StatusCode:500 Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Content-Length:[39] Server:[Jetty(9.4.z-SNAPSHOT)] Date:[Mon, 24 Feb 2020 11:49:21 GMT] Content-Type:[text/plain]] Body:0xc423f8a640 ContentLength:39 TransferEncoding:[] Close:false Uncompressed:false Trailer:map[] Request:0xc42095f800 TLS:<nil>}
If i send the message to node2, privateFor node1, i get the below error :
(node:32100) UnhandledPromiseRejectionWarning: Error: Returned error: Post http+unix://c/sendraw: dial unix /working-dir/c/tm.ipc: connect: connection refused
But i can connect to the Quorum node. So nothing wrong with the node itself. Something wrong with Tessera?
I went through this post, but could not make any sense of it : https://github.com/jpmorganchase/quorum/issues/64#issuecomment-281126604