I created custom table in corda using QueryableState. e.g. IOUStates table. I can able to see the custom information getting stored in this kind of table. but i observed that if party A and Party B is doing the transaction then this custom information gets stored at both the places , e.g. IOUStates table getting created at nodeA ledger as well as nodeB's ledger. and custom information is stored in partyA's and PartyB's ledger.
My Question is :-
If some Transaction is getting processed from PartyA's node , then I want to store part of the transaction's data i.e. custom data ONLY at partyA's Ledger.* level . i.e. off-Ledger of partA only.
It should not be shared with partyB.
In simple case , how to store Only node specific off ledger custom data ?
Awaiting for some reply...
Thanks.
There's a number of ways to achieve this:
jdbcSession()
functionality of theServiceHub
to create a custom table in the node's database. This table can easily be accessed from within your flows.ContractState
object that only has one participant: the node that wants to store the data. I call this a "unilateral" state, i.e. a state that only one party ever stores.Most importantly, if you don't want to share some data with a counter-party then it should never be disclosed inside a corda state object or attachment that another party might see. Instead: