How does bitcoin / blockchain work – Part 2

All four Aditi, Bobby, Chetan and Deepa meet again.

Aditi: Did you guys got enough time to think about our discussion?

Chetan: Oh definitely, last time that was big. I mean we should have made some notes.

Bobby: Don’t worry, I met Hitesh later that week and told him about our discussion. He wrote a blog about it and covered it quite well.

Go to https://hiteshethos.wordpress.com/2021/07/31/how-does-a-bitcoin-blockchain-work/ for a recap.

Chetan: Thanks for that. I now remember we ended our discussion by creating a block chain. I also remember a concern I had after our meeting.

Deepa: Yeah shoot it.

Chetan: So we said that whenever a transaction is broadcasted, we will be choosing a gatekeeper. Who is choosing this gatekeeper? I mean the one choosing the gatekeeper becomes  way to powerful and should be trusted by all members.

Bobby: No, I am not in favor of giving one person the responsibility to choose the gatekeeper. We’ll need to have an algo based on which a gatekeeper will be allocated every time there is a transaction.

Deepa: I agree, having an unbiased algo should be in place.

Aditi: How about we select someone at random?

Bobby: That would be a good start. But I can think of one problem with random selection.

Aditi: Sure, go ahead.

Bobby: Let me explain it by an example. If I am selected as a gatekeeper for a block and I want to make a fraudulent transaction in it. What’s stopping me to do that? ‘I don’t know who the next gatekeeper will be’, right?

Aditi: I think yes, but please can you elaborate it a bit?

Bobby: So in order to have make a fraudulent transaction, as a gatekeeper I will send out the correct set of transactions to say Deepa and Chetan, but fraudulent set of transaction to Aditi. I wont be caught while doing this. But during next transaction when a new gatekeeper comes in they will broadcast new transaction but will also broadcast link to previous transaction (the one I broadcasted) and I will be in trouble. If the new gatekeeper is from Deepa or Chetan, the linked transaction will be the correct one and Aditi will raise the alarm, if the new gatekeeper is Aditi, the linked transaction will be the fraudulent one and both Deepa and Chetan will raise the alarm.

Aditi: Yes, I get it now. Because you don’t want alarm to be raised against you, so you wont try to make a fraudulent transaction.

Bobby: Exactly. Now what if I, Chetan and Deepa collude. While I am the gate keeper and send a fraudulent transaction to you, there are pretty good chances that next gate keeper will be from me, Chetan and Deepa and not Aditi. In terms of probability it we’ll have 75% chances of being the gatekeeper. So having the probability stacked with us, we will keep on broadcasting the fraudulent transaction to Aditi with a chance. Later after certain number of transactions even if Aditi gets to be a gatekeeper, it would be too late to raise the alarm.

Aditi: That means a probability of above 50% is dangerous.

Bobby: Yes, if the colluding parties have less than 50% chance of being the next gatekeeper the system should run fine.

Deepa: I get your point, but we wouldn’t collude in first place, right?.

Bobby: We won’t collude because we trust each other. But remember we want to remove the trust requirement from the system. If we open our system to all, what is stopping me to add five new accounts as new members and I’ll have 66% (6 out of 9) chance of being the gatekeeper every time.

Chetan: Ok I got your point. What if we do other way around. We’ll give everyone the opportunity to be a gatekeeper every time.

Aditi: But then who’ll select the gatekeeper?

Chetan: We will design an algorithm which will pose a quiz for all to solve, the one who solves the quiz fastest will be the gatekeeper for that block.

Deepa: A quiz? Like a GK quiz?

Chetan: We no, we have math to our rescue here again. We can use hash function, these functions are difficult to answer but very easy to verify the answer.

Deepa: So you mean to say the one solving these functions will take brain power or computational power but others can just verify the answer quickly and accept the transaction block.

Chetan: Yes.

Bobby: But again what’s stopping me to add new fake accounts?

Chetan: Even if you add multiple accounts, you’ll still have same computational power. Which means adding new account wont increase your chance of being the gatekeeper but adding more computational power would.

Bobby: And doing that means buying more laptops which is a costly affair.

Chetan: Exactly.

Deepa: I guess we can stop here I can’t think of a loop hole for now.

Bobby: Yup, neither can I.

Aditi: Wow! You mean to say we are ready to add Esha to the system?

Deepa: Yeah, seems like we are ready to open our doors to public.

Leave a Comment