基于区块链的毕业设计Ethereum 2.0 Staking with Kubernetes of GCP – 以太坊2.0与GCP的Kubernetes合作

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Ethereum 2.0 Staking with Kubernetes of GCP – 以太坊2.0与GCP的Kubernetes合作 是一篇很好的国外资料

Ethereum 2.0 Staking with Kubernetes of GCP

⚠️ This is for Staking on Testnet and has not been tested on mainnet.

Overview

This is a reference implementation for managing ETH2 staking on Kubernetes. This implementation uses geth as the ETH1 client and lighthouse as the ETH2 client. Use this repo for educational purposes only. Nothing here should be considered “mainnet ready,” it’s purely designed to be an example for running ETH2 on Kubernetes and has only been tested on testnet.

User Guide

⚠️ This is a work in progress so the user guide are pretty vague.

  1. Watch this great video from ETHOnline about ETH2 staking from SuperFiz
  2. Review Lighthouse Book
  3. Follow the setup process on the Pyrmont Eth2 Launchpad, this should provide you with a ./validator_keys directory
  4. Create a directory in this repo for the pyrmont network and your validators
mkdir -p pyrmont/validators 
  1. Move your validator_keys in pyrmont/validators
mv ./validator_keys ./pyrmont/validators/ 
  1. Use lighthouse with Docker to import your validators
docker run -it -v /path/to/eth2-kubernetes/:/root/.lighthouse/ sigp/lighthouse lighthouse --network pyrmont account validator import --directory /root/.lighthouse/pyrmont/validators/validator_keys 

Which should look like:

Running account manager for pyrmont network validator-dir path: "/root/.lighthouse/pyrmont/validators" validator-dir path: "/root/.lighthouse/pyrmont/validators" WARNING: DO NOT USE THE ORIGINAL KEYSTORES TO VALIDATE WITH ANOTHER CLIENT, OR YOU WILL GET SLASHED.  Keystore found at "/root/.lighthouse/pyrmont/validators/validator_keys/keystore-m_XXXXXXXXXXXXX.json":   - Public key: 0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  - UUID: XXXXXXXXXXXX  If you enter the password it will be stored as plain-text in validator_definitions.yml so that it is not required each time the validator client starts.  Enter the keystore password, or press enter to omit it:  Password is correct.  Successfully imported keystore. Successfully updated validator_definitions.yml. 
  1. Confirm pyrmont/validators/validator_definitions.yaml exists and that there is a directory in pyrmont/validators for the validator that contains the keystore file. For example:
├── pyrmont     └── validators     |   └── 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa     └── keystore-XXXXXX.json     └── validator_definitions.yaml 

⚠️ Do not commit this directory to Github!

  1. Create a new project on GCP with a unique project ID. For this example, you will see YOUR_PROJECT_ID, you’ll replace this with the project ID you select in this step.

  2. Create a Storage bucket with the name of the form: YOUR_PROJECT_ID-lighthouse

  3. Upload the ./prymont folder into the newly created bucket

  4. Create a new Kubernetes cluster. I used a single node cluster with a standard N2 instance, 2 CPU, 8 GB memory for testing on testnet.

  5. Open the Cloud Shell Terminal in GCP and connect to the cluster. This can also be done from your local terminal if you have gcloud installed.

  6. Clone your eth2 repo into the terminal and go into it:

git clone https://github.com/your_username/eth2-kubernetes cd eth2-kubernetes 
  1. Use gsutil to copy your valid ator folder from storage into the lighthouse directory in the clone repo:
gsutil cp -r gs://YOUR_PROJECT_ID-lighthouse/pyrmont ./lighthouse 
  1. Build the lighthouse docker image with your validator config and push into Google Container Registery:
docker build -t us.gcr.io/YOUR_PROJECT_ID/lighthouse:latest ./lighthouse/ --build-arg VALIDATOR_PATH=pyrmont/validators  docker push us.gcr.io/YOUR_PROJECT_ID/lighthouse:latest 
  1. Use helm to deploy geth and lighthouse to Kubernetes
helm upgrade --install --set lighthouse.image.tag=latest --set lighthouse.image.repository=us.gcr.io/YOUR_PROJECT_ID/lighthouse eth2-pyrmont infrastructure/ 
  1. Check that the deployment was successful in the GKE dashboard

We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.


以太坊eth2.0与GCP的Kubernetes合作

在⚠️ 这是为了在Testnet上打标,还没有在mainnet上测试过。

概述

这是管理ETH2在Kubernetes上的标桩的参考实现。这个实现使用geth作为ETH1客户机,lighthouse作为ETH2客户机。本回购仅用于教育目的。这里没有任何东西应该被认为是“mainnet ready”,它纯粹是为了作为在Kubernetes上运行ETH2的示例而设计的,并且只在testnet上进行了测试。

用户指南

始终激活
分析cookies
  • 观看ETHOnline关于SuperFiz ETH2立桩的精彩视频Pyrmont Eth2发射台的设置过程,这将为您提供一个./validator_keys目录
  • 在此repo中为pyrmont网络和验证器创建一个目录
  • 在pyrmont/validators中移动您的validator_keys
  • 使用lighthouse with Docker导入验证器
  • 确认pyrmont/validators/validator_定义.yaml存在并在pyrmont/validators中有一个包含密钥库文件的验证程序的目录。例如:
  • 在GCP上创建一个具有唯一项目标识的新项目。对于本例,您将看到您的“项目标识”,您将用您在本步骤中选择的项目标识替换此标识。
  • 使用以下表单的名称创建一个存储桶:YOUR_PROJECT_ID-lighthouse
  • 将./prymont文件夹上载到新创建的bucket中
  • 创建一个新的Kubernetes集群。我使用一个带有标准N2实例、2cpu、8gb内存的单节点集群在testnet上进行测试。
  • 在GCP中打开云Shell终端并连接到集群。如果您安装了gcloud,也可以从本地终端完成此操作。
  • 将eth2 repo克隆到终端并进入:
  • 使用gsutil将有效的ator文件夹从存储复制到克隆repo中的lighthouse目录中:
  • 使用您的验证程序配置构建lighthouse docker映像并将其推入Google容器注册表:
  • 使用helm部署geth和从灯塔到Kubernetes
  • 在GKE仪表板中检查部署是否成功
  • ⚠️ 这是一个正在进行的工作,所以用户指南相当模糊。

    1. 观看ETHOnline关于SuperFiz ETH2立桩的精彩视频Pyrmont Eth2发射台的设置过程,这将为您提供一个./validator_keys目录
    2. 在此repo中为pyrmont网络和验证器创建一个目录
    3. 在pyrmont/validators中移动您的validator_keys
    4. 使用lighthouse with Docker导入验证器
    mkdir -p pyrmont/validators 
    1. 确认pyrmont/validators/validator_定义.yaml存在并在pyrmont/validators中有一个包含密钥库文件的验证程序的目录。例如:
    mv ./validator_keys ./pyrmont/validators/ 
    1. 在GCP上创建一个具有唯一项目标识的新项目。对于本例,您将看到您的“项目标识”,您将用您在本步骤中选择的项目标识替换此标识。
    docker run -it -v /path/to/eth2-kubernetes/:/root/.lighthouse/ sigp/lighthouse lighthouse --network pyrmont account validator import --directory /root/.lighthouse/pyrmont/validators/validator_keys 

    应该是这样的:

    Running account manager for pyrmont network validator-dir path: "/root/.lighthouse/pyrmont/validators" validator-dir path: "/root/.lighthouse/pyrmont/validators" WARNING: DO NOT USE THE ORIGINAL KEYSTORES TO VALIDATE WITH ANOTHER CLIENT, OR YOU WILL GET SLASHED.  Keystore found at "/root/.lighthouse/pyrmont/validators/validator_keys/keystore-m_XXXXXXXXXXXXX.json":   - Public key: 0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  - UUID: XXXXXXXXXXXX  If you enter the password it will be stored as plain-text in validator_definitions.yml so that it is not required each time the validator client starts.  Enter the keystore password, or press enter to omit it:  Password is correct.  Successfully imported keystore. Successfully updated validator_definitions.yml. 
    1. 使用以下表单的名称创建一个存储桶:YOUR_PROJECT_ID-lighthouse
    ├── pyrmont     └── validators     |   └── 0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa     └── keystore-XXXXXX.json     └── validator_definitions.yaml 

    ⚠️ 不要将此目录提交给Github!

    1. 将./prymont文件夹上载到新创建的bucket中
    2. 创建一个新的Kubernetes集群。我使用一个带有标准N2实例、2cpu、8gb内存的单节点集群在testnet上进行测试。
    3. 在GCP中打开云Shell终端并连接到集群。如果您安装了gcloud,也可以从本地终端完成此操作。
    4. 将eth2 repo克隆到终端并进入:
    5. 使用gsutil将有效的ator文件夹从存储复制到克隆repo中的lighthouse目录中:
    6. 使用您的验证程序配置构建lighthouse docker映像并将其推入Google容器注册表:
    git clone https://github.com/your_username/eth2-kubernetes cd eth2-kubernetes 
    1. 使用helm部署geth和从灯塔到Kubernetes
    gsutil cp -r gs://YOUR_PROJECT_ID-lighthouse/pyrmont ./lighthouse 
    1. 在GKE仪表板中检查部署是否成功
    docker build -t us.gcr.io/YOUR_PROJECT_ID/lighthouse:latest ./lighthouse/ --build-arg VALIDATOR_PATH=pyrmont/validators  docker push us.gcr.io/YOUR_PROJECT_ID/lighthouse:latest 
    1. Use helm to deploy geth and lighthouse to Kubernetes
    helm upgrade --install --set lighthouse.image.tag=latest --set lighthouse.image.repository=us.gcr.io/YOUR_PROJECT_ID/lighthouse eth2-pyrmont infrastructure/ 
    1. Check that the deployment was successful in the GKE dashboard

    我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。

    部分转自网络,侵权联系删除区块链源码网

    www.interchains.cc

    https://www.interchains.cc/18878.html

    区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
    区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Ethereum 2.0 Staking with Kubernetes of GCP – 以太坊2.0与GCP的Kubernetes合作

    提供最优质的资源集合

    立即查看 了解详情