Re: #fabric-questions #hyperledger-fabric #fabric-questions #hyperledger-fabric


Parthiban Selvaraj
 

Hi,

It can be done in many ways. A simple would be like this,

Create 2 functions in chaincode 
1st function will collect all bids from 4 orgs and then store the value along with hash ( can include the digital signature also for verification later). Create a custom endorsement policy like if org1 submits then endorsement policy would be get endorsement from ORG1.member only.(state based endorsement)

2nd function will submit bidding only if there is required no of bids are collected (4 in your case) and it checks the hash of bid value ( verify the signature also). For this you create endorsement policy of what you have mentioned (4 endorsements from 4 orgs)

Through this setup all 4 orgs can submit a bid with custom endorsement and bid processing happens only if all 4 orgs submitted their bids

Thanks and Regards
Parthiban Selvaraj

On Wed, 15 Jan, 2020, 4:40 PM , <yashukla47@...> wrote:

what will be the solution to this? is there an inbuilt logic for this kind of privacy?

Consider a bidding platform of 4 organizations where org1 publishes an item and org 2,3 and 4 bid for it(in dollars). 
and then there is a chaincode that checks the bids and compare them and declares the winner bidder (one with the highest bid) to make the platform decentralized we make all the three organizations as endorser peers so that each peer is able to see what others have bid.

the problem is that: in a particular scenario being an endorser peer org2 can see the bid of org3 and then increase it’s bid accordingly

what can I do to make the platform decentralized while avoiding this scenario and keeping the system realtime(<50ms)? something like: the organizations are only able to see each others bids only after the winner is 
declared

Join fabric@lists.hyperledger.org to automatically receive all group messages.