A Walkthrough of the Solution

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the newline's Introduction to Privacy on Ethereum course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to newline's Introduction to Privacy on Ethereum, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course newline's Introduction to Privacy on Ethereum
  • [00:00 - 00:35] Okay, so now I've updated it so that we have now replaced the choices Alice to Alice Choice and choices Bob to Bob choice and everything else remains the same. And as I mentioned previously, this is this is the level that we want to get to where we essentially assume that Alice and Bob will pick random random choices. And of course, when you build the application on top of this, you can ensure that the random ness is actually automatically generated. And you can ensure that it comes from a good source.

    [00:36 - 01:06] And you know, it's not easily knowable because imagine if they're playing, they're playing for a million dollars each or a million each, then it's very like every player has an incentive to actually find out what the randomness is and play a move which will which will eliminate this. You can expand upon this further. As I've said, you can add more functions, you can add time.

    [01:07 - 02:24] So you can add that it you get once a once a move has been played. The second move has to be played within a few hours or something. And you can of course expand this much, much further. But this is enough to demonstrate that just by using hash functions, it's just not enough. You also need in terms of a public blockchain, you also need to add randomness to make sure that just by looking at the choice itself, it does not reveal the actual choice. But at the same time, you also have to make sure that the commitment holds. If the commitment does not hold, then it's not very useful at all, because they can play anything. But if the commitment holds, then everything is fine. If the commitment doesn't hold, then we're in trouble. But I hope you've learned a lot in this. And if you think that there should be other things in there, feel free to message me or email me or just leave a comment in the course. And I'll pick it up. And that's all, that's all for this . And we're going to do a wrap up now.