HackMD
    • Sharing Link copied
    • /edit
    • View mode
      • Edit mode
      • View mode
      • Book mode
      • Slide mode
      Edit mode View mode Book mode Slide mode
    • Note Permission
    • Read
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • Write
      • Only me
      • Signed-in users
      • Everyone
      Only me Signed-in users Everyone
    • More (Comment, Invitee)
    • Publishing
    • Commenting Enable
      Disabled Forbidden Owners Signed-in users Everyone
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Invitee
    • No invitee
    • Options
    • Versions and GitHub Sync
    • Transfer ownership
    • Delete this note
    • Template
    • Save as template
    • Insert from template
    • Export
    • Google Drive Export to Google Drive
    • Gist
    • Import
    • Google Drive Import from Google Drive
    • Gist
    • Clipboard
    • Download
    • Markdown
    • HTML
    • Raw HTML
Menu Sharing Help
Menu
Options
Versions and GitHub Sync Transfer ownership Delete this note
Export
Google Drive Export to Google Drive Gist
Import
Google Drive Import from Google Drive Gist Clipboard
Download
Markdown HTML Raw HTML
Back
Sharing
Sharing Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
More (Comment, Invitee)
Publishing
More (Comment, Invitee)
Commenting Enable
Disabled Forbidden Owners Signed-in users Everyone
Permission
Owners
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Invitee
No invitee
   owned this note    owned this note      
Published Linked with GitHub
Like BookmarkBookmarked
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Sepolia beacon chain docs ## Introduction The sepolia beacon chain is a permissioned beacon chain. We achieve this permissioned-ness by using [this](https://github.com/protolambda/testnet-dep-contract/) deposit contract that accepts just a specific token as the deposit. The token is currently controlled purely by EF DevOps, it will be used to onboard new validators as and when needed. The token can be tracked on the page [here](https://sepolia.etherscan.io/token/0x7f02c3e3c98b133055b8b348b2ac625669ed295d). ## How do I become a validator? The sepolia beacon chain will not be a place for home stakers to test their setups. The aim is to have a small validator set that can provide a great UI/UX for dapps to test things on. So the only reason to be a sepolia beacon chain is if you are a node operator or large scale staker and want to partake in the health of a testnet. We expect the following of every validator on Sepolia: - Long term commitment to run validators - High uptime - Quick response for updates as well as TTD co-ordination If the above is acceptible to you and you can prove that you currently run a considerable amount of stake on Ethereum Mainnet, then please do comment in this [Github issue](https://github.com/eth-clients/merge-testnets/issues/20) expressing your interest, reasons for wanting to be one and contact information(with ethereum address, ideally ENS). #### Process: 1. Comment on github issue with required information 2. Allow for existing validators to vet/approve the decision 3. If approved, Request tokens for the deposit contract (ensure the Ethereum address(or ENS) provided is valid) 4. Setup Sepolia EL + CL nodes 5. Perform deposits as described in later sections 6. Wait for deposit processing delays to finish 7. Start validator keys on your machines 8. Monitor validators for performance! 9. If needed! Exit your own validators after discussion with the other validators ## Performing deposits We do not have a launchpad for the Sepolia beacon chain. Since its a small, permissioned chain, we will use CLI tools to perform them. pre-requisites: - eth2-val-tools: https://github.com/protolambda/eth2-val-tools - ethereal: https://github.com/wealdtech/ethereal - Ethereum account with a min. 40 sepolia testnet ether + the tokens needed for deposits (for gas + other requirements of testnet deposit contract) 1. Create a new folder and a file inside that folder called `secrets.env`. The `secrets.env` file will contain our secrets to avoid having to store them in our script directly. You should add this file to your `.gitignore` to avoid committing it by mistake. 2. Fill the `secrets.env` file with the following variables: We can generate the validator and withdrawal mnemonic using `eth2-val-tools`. In your terminal, type out: ``` eth2-val-tools mnemonic ``` The output should contain a list of 24 words. Copy those words into the `secrets.env` file under the variable `VALIDATORS_MNEMONIC`. Don’t forget to wrapthe 24 words inside “”! Repeat the process for `WITHDRAWALS_MNEMONIC`. :::warning Please backup these mnemonics safely! ::: Decide on how many deposits you would like to perform. Generally this would be (amount of testnet tokens you possess). Set the `ACC_START_INDEX` and `ACC_END_INDEX` in `secrets.env` accordingly. Now we can finally add our private key and address from which the deposits will be made. This will be the in metamask, go to the account with the tokens > click on the three dots > click on Account details > click on export private key. We will need the private key in the script to access the funds and perform the deposits, so save this somewhere safely. Fill out `ETH1_FROM_ADDR` and `ETH1_FROM_PRIV` in `secrets.env` accordingly. Don’t forget to wrap both inside “” and they should start with `0x`. We will store the deposit data temporarily to allow us to manually inspect it,enter the full path of where the file should be stored as the variable `DEPOSIT_DATAS_FILE_LOCATION` in `secrets.env` In the end, your `secrets.env` file should look somewhat like this: ``` ACC_START_INDEX=<Start index, usually 0> ACC_END_INDEX=<End index or number of validators wanted> DEPOSIT_AMOUNT=32000000000 FORK_VERSION="0x90000069" VALIDATORS_MNEMONIC=<Enter mnemonic here> WITHDRAWALS_MNEMONIC=<Enter mnemonic here> DEPOSIT_DATAS_FILE_LOCATION=<Enter temp file location> DEPOSIT_CONTRACT_ADDRESS="0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D" ETH1_FROM_ADDR="<Enter Eth address containing tokens>" ETH1_FROM_PRIV="<Enter private key of Eth address containing tokens>" ETH1_NETWORK=https://<Sepolia node RPC endpoint> ``` 3. The scripts are divided into two parts. One part generates the deposit data and the second part performs the deposit. The idea is to split it in two to allow for manual checking of the data. Create a file called `build_deposits.sh` in the same folder as `secrets.env` with the following contents: ``` #!/bin/bash echo "USE AT YOUR OWN RISK" read -p "Are you sure? " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]] then [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 fi source secrets.env eth2-val-tools deposit-data \ --source-min=$ACC_START_INDEX \ --source-max=$ACC_END_INDEX \ --amount=$DEPOSIT_AMOUNT \ --fork-version=$FORK_VERSION \ --withdrawals-mnemonic="$WITHDRAWALS_MNEMONIC" \ --validators-mnemonic="$VALIDATORS_MNEMONIC" > $DEPOSIT_DATAS_FILE_LOCATION.txt ``` The script will read the variables inside secrets.env and build the deposit data for you in a text file stored at `$DEPOSIT_DATAS_FILE_LOCATION`. Run the script using `./build_deposits.sh`. 4. The deposit data will be a bunch of json with the following format: ``` { "account": "m/12381/3600/1/0/0", "deposit_data_root": "", "pubkey": "", "signature": "", "value": 32000000000, "version": 1, "withdrawal_credentials": "" } ``` Manually check if it looks okay to begin with. The account format would be `m/12381/3600/key_number/0/0`. The `key_number` should co-relate to the `ACC_START_INDEX` and `ACC_END_INDEX` entered earlier. 5. Create a file called `exec_deposits.sh` in the same folder as `secrets.env` with the following contents: ``` #!/bin/bash echo "USE AT YOUR OWN RISK" read -p "Are you sure? " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]] then [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 fi source secrets.env if [[ -z "${DEPOSIT_CONTRACT_ADDRESS}" ]]; then echo "need DEPOSIT_CONTRACT_ADDRESS environment var" exit 1 || return 1 fi if [[ -z "${ETH1_FROM_ADDR}" ]]; then echo "need ETH1_FROM_ADDR environment var" exit 1 || return 1 fi if [[ -z "${ETH1_FROM_PRIV}" ]]; then echo "need ETH1_FROM_PRIV environment var" exit 1 || return 1 fi # Iterate through lines, each is a json of the deposit data and some metadata while read x; do account_name="$(echo "$x" | jq '.account')" pubkey="$(echo "$x" | jq '.pubkey')" echo "Sending deposit for validator $account_name $pubkey" ethereal beacon deposit \ --allow-unknown-contract \ --address="$DEPOSIT_CONTRACT_ADDRESS" \ --connection=$ETH1_NETWORK \ --data="$x" \ --value="$DEPOSIT_ACTUAL_VALUE" \ --from="$ETH1_FROM_ADDR" \ --privatekey="$ETH1_FROM_PRIV" echo "Sent deposit for validator $account_name $pubkey" sleep 5 done < "$DEPOSIT_DATAS_FILE_LOCATION.txt" ``` This script will read the values in `secrets.env` and then go through the temporary deposits file specified in `$DEPOSIT_DATAS_FILE_LOCATION`. It will process the json line by line and perform the deposit using the private key. Since we want to perform a large amount of deposits, we ideally want to avoid dos-ing the network all at once. To avoid that, there is a sleep command between each deposit to allow some time between deposits. Note: It is possible that one or more deposits might fail if done too quickly or due to the network state. To avoid this, its best to split up deposits into smaller batches of 10/25 or so - this would also make debugging nonce issues easier. :::warning Perform the deposits! Please be really sure before executing this step! ::: Finally,Run the script using `exec_deposits.sh`. 6. Check the deposit status in an [explorer](https://sepolia.etherscan.io/address/0x7f02C3E3c98b133055B8B348B2Ac625669Ed295D). Huge shoutout to [Protolambda](https://protolambda.com/) and the tool developers for creating both the scripts and the tools! ## Generating keys - Please use the [staking-deposit-cli](https://github.com/ethereum/staking-deposit-cli) to generate the keys after the deposits have been done and import them into your validator client.

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lost their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.


Upgrade

All
  • All
  • Team
No template.

Create a template


Upgrade

Delete template

Do you really want to delete this template?

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Sign in via SAML

or

Sign in via GitHub

Help

  • English
  • 中文
  • 日本語

Documents

Tutorials

Book Mode Tutorial

Slide Example

YAML Metadata

Resources

Releases

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions

Versions and GitHub Sync

Sign in to link this note to GitHub Learn more
This note is not linked with GitHub Learn more
 
Add badge Pull Push GitHub Link Settings
Upgrade now

Version named by    

More Less
  • Edit
  • Delete

Note content is identical to the latest version.
Compare with
    Choose a version
    No search result
    Version not found

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub

      Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

       Sign in to GitHub

      HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully