0

How does one send public transactions using Web3j's quorum client?

Currently I am sending private transactions with this code, and even if my "privyFor" list is empty it is sent as a private transaction.

HttpService httpService = BuildHttpService(NODE);

Quorum quorum = Quorum.build(httpService);



ArrayList<String> privyFor = new ArrayList<>();



// note that privyFor is an empty list

ClientTransactionManager transactionManager = new ClientTransactionManager(quorum, ACCOUNT_ADDRESS, privyFor);
Breedly
  • 12,838
  • 13
  • 59
  • 83

1 Answers1

2

When we do not set the privateFor value, this transaction is deemed public, which means all nodes will receive this transaction and see the value inside the contract object.

I created a public transaction I have

return instance.set(65, {privateFor: ["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="]});

Remove it to

return instance.set(70, );

And the transaction will be public to all in network enter image description here

You can see my 70 value transaction is visible to all node peers .

Or you can see geth network coding too. I am attaching screenshot below .

enter image description here