quorum icon indicating copy to clipboard operation
quorum copied to clipboard

Allow sending a private transaction for (just) yourself

Open rsarres opened this issue 9 years ago • 4 comments

The function call will fail if privateFor is “” and does not work if privateFor is absent because I think it creates a public transaction calling a private contract.

rsarres avatar Mar 28 '17 15:03 rsarres

It isn't currently possible to leave it empty (because the contents are encrypted with a senderPrivate-receiverPublic key combination, and the sender and receiver pairs can't be the same.)

Potentially, we could get around this.

Out of curiosity, how were you planning to use this private transaction? Keeping track of something?

patrickmn avatar Mar 28 '17 16:03 patrickmn

I am developing a payment system using Quorum as a proof of concept. In this project I deploy one private smart contract for each participant on every node and keep track of the balances privately using private transactions. There is a regulator node that sets initial balance and must participate on every transaction, so it has all the updated balances and it can decide if the sender has enough money to honor any transaction. As the same smart contract is deployed on multiple nodes and they are on different states, the regulator sets some control variables privately for each contract instance on different nodes. One of these instances is on the regulators own node, so the regulator must call a function privately to set only its contract instance variable. This call is private and must not be sent to any other node.

rsarres avatar Mar 28 '17 17:03 rsarres

It probably makes sense to support this in some way. You'd have to spin up another constellation node with a "throwaway" key pair right now to get around it.

patrickmn avatar Mar 28 '17 18:03 patrickmn

Yes, that´s what I was doing before asking the question. I started a dummy node as a target to self transactions.

rsarres avatar Mar 28 '17 18:03 rsarres