Conclusion and wrapping up rock paper scissors game
Get the project source code below, and follow along with the lesson material.
Download Project Source CodeTo 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.
Get unlimited access to newline's Introduction to Privacy on Ethereum, plus 70+ \newline books, guides and courses with the \newline Pro subscription.
[00:00 - 01:01] Okay, so welcome to the end of module two and congratulations on playing rock paper scissors on the public blockchain and having to implement that in Soldity. So let's take a look at what we've learned so far. So we've implemented rock paper scissors in Soldity. We 've played it in our browser. Of course, you can deploy it to a testnet and deploy it onto the public blockchain and play it for real Ethereum and improve the code as much as you like. What we 've learned is using hash functions first-hand. So you now have an idea of how to use hash functions, what they mean, how the arguments are important. So you can play around with hash functions more and see the changes that are made. And what we also learned is that using hash functions alone is not enough. It's an obfuscation, but it breaks down very, very easily and is not enough to guarantee privacy.
[01:02 - 02:15] And this is why we need to understand privacy in public blockchains and the fact that everyone can see what anyone is doing. And because they can see what they're doing, it must be hidden. And the public verifiability is very, very important because the smart contract can verify alone without needing a third party. It does not need an oracle to tell it. It doesn't need anyone to tell it anything and it can verify it. And in your applications, if you can do that, always, always, always do that. Do not rely on oracle. Do not have any more trust assumptions that you need. And in a lot of cases, you are going to use randomness and true randomness is very, very hard to achieve. And the best we've found so far is probably just asking random people, X amount of random people for X randomness and hoping that at least one of them will do it properly or honestly, such that the whole system will be entirely random. So you can read about it more.
[02:16 - 02:48] It's a big topic of randomness in cryptography and in cryptocurrency as well. And we learn how to use that in our applications. We also learned the attack vectors of a specific application such as rock paper scissors. And this is very important because every application that you develop has different attack vectors and different attack models and different threat models. So the privacy depends on the application that you 're building.
[02:49 - 03:24] But the assumptions should always be the same that everyone can see the public blockchain. Everyone is able to see this. And what happens if people find out certain information that they should not. So in our case, if the player could see at the start that the first player was playing rock and the other was playing scissors. So the second player always had the advantage. And they could always be the first player. So these are some of the things that we've learned.
[03:25 - 03:54] And in the next modules, we are going to deep dive into more sophisticated topics. We are going to be looking at commitment schemes, miracle trees, ring signatures and many, many more like zero knowledge proofs. And we are also going to do some amazing projects like this one. If you have a project that you would like, you can also suggest this and we will try to do that as well. So that's all I have for you now.
[03:55 - 04:01] And I hope you've enjoyed implementing rock paper scissors and playing with it.