Teach you how to initiate a fraud proof on Optimistic Ethereum testnet

0

 836 total views

Participate in the actual battle of the Ethereum Layer 2 project Optimistic Ethereum testnet, and learn to initiate fraud proof step by step.

Original title: “Notice | Optimistic Ethereum Testnet: Fraud Proof Practice Starts”
Written by: Ethereum Optimism
Translation & Proofreading: Min Min & A Jian

The Optimistic Ethereum testnet has entered the final stage! Please follow our guidelines to initiate a fraud proof; contribute to our Layer 2 security to get rewards! If you are still a newcomer, you can check our testnet announcement to understand the situation in the first few stages.

In the next few days, we will consciously initiate fraud on the testnet. You (yes, you are the one who read this article!) have the opportunity to join us to protect the security of the blockchain together. Don’t worry about your skill level-setting up a validator node is super easy. Please read our guide. The first person to complete the fraud proof process will win 3.2 ETH!

Ready to fight

Our agreement uses the Optimistic Rollup scheme, which means that anyone can participate in verifying the blockchain and submit a dispute when a fraud is discovered. Before entering the formal production phase, we need you to help us test the code of the protocol together.

Guide directory

  • Install dependencies
  • Download validator
  • Configuration code
  • Get testnet ETH
  • Run the validator
  • Generate fraud proof

If you want to watch the video tutorial, please click .

Install dependencies

Before running the testnet validator, you need git, Docker/Docker Compose and npm. If you don’t have these, you can click on the installation guide below to get:

👩🏻‍💻 Note: Although it doesn’t matter much, if you really want to win the jackpot, please make sure your validator is running continuously. You can consider using a computer you don’t use frequently to keep it on standby.

Download validator

Once the necessary dependencies are installed, download the validator code. The code will run two services: a validator and a fraud proof generator.

 $ git clone https://github.com/ethereum-optimism/verifier.git
$ cd verifier

🤓 The validator will download the rollup transactions published by the sequencer on Layer 1, and then execute these transactions locally to calculate the state root. The role of the fraud proof generator is to compare the state root calculated by the verifier with the state root issued by the sequencer. If the two are different, the fraud proof generator will automatically submit the dispute.

Configure node

For ease of use, we have provided default values ​​for the validator parameters. Non-advanced users can directly read the next section:

If you want to connect to another node, you can set up an Alchemy or Infura project. First, get the HTTP link:

Announcement | Optimistic Ethereum Testnet: Fraud Proof Practice begins

Next, set the following variables in docker-compose.env :

 L1_NODE_WEB3_URL = <Your HTTP URL>
ETH1_HTTP = <Your HTTP URL>

🤓 The first variable is for the fraud proof generator and the second variable is for the validator.

Ready to fight

We have configured the Layer 1 node. Now, validators can track the status of Layer 2 without trust. However, there is another step here: In order to prove fraud, we need to deposit some funds into the Layer 1 wallet to pay for the gas cost to submit the dispute.

 $ npm install$ npm run create-key

This command will generate and store the new private key of the authenticator in docker-compose.env . Because the test is online, we simplify this process, and therefore is not key management and security. 🚫Do not send real ETH! 🚫

💎 Our testnet runs on Kovan, so we need to get some Kovan test ETH! You can use Kovan faucet gitter or Kovan primary faucet to get test ETH (but the latter is not currently available). **

💸Check Etherscan to know if your address is successfully recharged.

Run the validator

Congratulations on reaching this point!

 $ npm run start

After you run the above command, your computer will start downloading the docker image, as shown below:

Announcement | Optimistic Ethereum Testnet: Fraud Proof Practice begins

Then you will get a huge log stream:

Announcement | Optimistic Ethereum Testnet: Fraud Proof Practice begins

🤓 What is going on? Haha, you are verifying the Layer 2 chain, that is, your node is downloading all Layer 2 transactions from Layer 1, put them in a local OVM, and calculate the Layer 2 state based on these transactions. Running a validator means that you don’t need to trust any third party to tell you the state of the chain, because you will calculate it yourself! In this process, you also need to verify the false status submitted by the sequencer. Soon, our team will submit a fraud turntable! When this happens, the validator will discover this and submit a fraud proof to delete the fraud status.

How to prove fraud

Announcement | Optimistic Ethereum Testnet: Fraud Proof Practice begins

Your validator will automatically submit a fraud proof when it detects fraud. The first verifier to generate a fraud proof can win the jackpot.

You just need to ensure that the validator is running and pay attention to its operation in the next few days. Please follow us on Twitter @optimismPBC, we will post the addresses of the winning validators on it!

Source link: medium.com

Disclaimer:

Blockcast.cc does not endorse any content or product on this page. While we aim at providing you all important information that we could obtain, readers should do their own research before taking any actions related to the company and carry full responsibility for their decisions, nor can this article be considered as investment advice or recommendations. Every investment and trading move involves risk, you should conduct your own research when making a decision.