WORM MINER Tutorial @EIP7503 Confirm the environment: Make sure you are rooted, on an Ubuntu system, and have 16GB of RAM. Sepolia ETH: Make sure you have at least 1.0 Sepolia ETH in your account (via Obtain). 1. Install dependencies Run the following command to install all necessary system dependencies: bash sudo apt update && sudo apt upgrade -y sudo apt install -y build-essential cmake libgmp-dev libsodium-dev nasm curl m4 git wget unzip nlohmann-json3-dev pkg-config libssl-dev Note: pkg-config and libssl-dev have been included to avoid previous OpenSSL errors. 2. Install Rust Install the Rust toolchain and activate the environment: bash curl --proto '=https' --tlsv1.2 -sSf | sh -s -- -y source $HOME/.cargo/env Verify: bash rustc --version cargo --version 3. Clone the warehouse Empty the old directory and re-clone worm-privacy/miner: bash cd ~ rm -rf proof-of-burn # delete the old directory to avoid confusion git clone cd miner Verify: bash git remote -v # should show origin 4. Download the data file Download the required parameter files for ZK-SNARK proofs: bash make download_params Examine: bash ls -R | grep zkey # to confirm that the .zkey file was downloaded 5. Install the worm-miner Compile and install worm-miner: bash cargo install --path . Verify: bash worm-miner --version # should show worm-miner 0.1.2 6. Set up a private key Store the private key with the environment variable (replace with yours): bash export PRIVATE_KEY="your private key" Safe Cleanup: bash history -c echo "" > ~/.bash_history 7. Verify the Sepolia ETH balance Make sure you have at least 1.0 Sepolia ETH in your account: bash worm-miner info --network sepolia --private-key $PRIVATE_KEY If the balance is insufficient, visit Get More ETH. Record your Ethereum address (if needed): bashpip install web3python3 -c "from web3 import Web3; w3 = Web3(); print(w3.eth.account.from_key('$PRIVATE_KEY').address)" 8. Burn ETH and mint BETH Burn 1 ETH, mint 0.999 BETH (0.001 ETH as a fee): bash worm-miner burn --network sepolia --private-key $PRIVATE_KEY --amount 1 --spend 0.999 --fee 0.001 Check the output: The transaction hash (Tx-hash) and the generated file (input.json, witness.wtns) should be displayed. Verify the file: bashls input.json witness.wtns Verify BETH Balance: bash worm-miner info --network sepolia --private-key $PRIVATE_KEY Expected BETH balance: 0.99900000000000000000. 9. Participate in mining Stake 0.002 BETH each for the next 3 epochs: bash worm-miner participate --amount-per-epoch 0.002 --num-epochs 3 --private-key $PRIVATE_KEY --network sepolia 10. Claim WORM rewards After the end of the epoch (30 minutes per epoch), claim your rewards: bash worm-miner claim --from-epoch 7 --network sepolia --num-epochs 1 --private-key $PRIVATE_KEY Adjust --from-epoch to the current epoch of worm-miner info (e.g. try --from-epoch 8 if it's currently epoch 8). BETH balance remains 0: Check transaction status (replace with your transaction hash): bashcurl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xYOUR_TX_HASH"],"id":1}' Make sure the Sepolia network connection is working: bashcurl ETH balance and rerun burn. Parameter file download failed: Check the make download_params log: bashmake download_params Confirm the network: bashping Command failed: Provides a full error log (e.g. output from worm-miner burn). Check the worm-miner version: bashworm-miner --version Safety tips Private Key Protection: Continue to use $PRIVATE_KEY to avoid plaintext input. Backup: Record the burn_key and transaction hash of worm-miner burn, and the output (id and burnKey) of worm-miner ls. Testnet risks: Although it is a testnet, the private keys are still protected.
Show original
9.97K
4
The content on this page is provided by third parties. Unless otherwise stated, OKX is not the author of the cited article(s) and does not claim any copyright in the materials. The content is provided for informational purposes only and does not represent the views of OKX. It is not intended to be an endorsement of any kind and should not be considered investment advice or a solicitation to buy or sell digital assets. To the extent generative AI is utilized to provide summaries or other information, such AI generated content may be inaccurate or inconsistent. Please read the linked article for more details and information. OKX is not responsible for content hosted on third party sites. Digital asset holdings, including stablecoins and NFTs, involve a high degree of risk and can fluctuate greatly. You should carefully consider whether trading or holding digital assets is suitable for you in light of your financial condition.