BLS 至执行变更

简介

要使你的信标链验证者自动将余额提取到你的执行层(以太坊 1)地址,你可以使用 工具生成SignedBLSToExecutionChange 消息JSON文件。此消息包括将旧的BLS取款凭证更改为执行地址格式的新取款凭证的请求。在卡佩拉/上海硬分叉,要将此信息纳入主网,你需要将此信息上传到信标节点的 池。

安装

选项 1:二进制文件

您可以在 质押存款 CLI 版本 中找到二进制文件

选项 2:源代码 + 虚拟环境

Download master branch:git clone https://github.com/earthwallet/staking-deposit-cli.git安装并设置虚拟环境:pip3 install virtualenv
virtualenv venv
source venv/bin/activate
安装依赖项:python3 setup.py install
pip3 install -r requirements.txt

生成 bls_to_execution_change-*.json 文件

假设你已经生成了 EIP-2334 格式的存款,并且具有 BLS 提款凭证。如果没有,你可以通过遵循 相关文档 生成它。

用参数执行

选项 1:二进制文件

交互模式./deposit generate-bls-to-execution-change带标志的命令行./deposit --language=english generate-bls-to-execution-change \
--chain=mainnet \
--mnemonic="<您的助记符>" \
--bls_withdrawal_credentials_list="<您的旧 BLS 提款凭证>" \
--validator_start_index=<EIP-2334 中的密钥起始索引> \
--validator_indices="<您的验证者索引>" \
--execution_address="<用于提款的执行地址>"
[Example]./deposit --language=english generate-bls-to-execution-change \
--chain=mainnet \
--mnemonic="sister protect peanut hill ready work profit fit wish want small inflict flip member tail between sick setup bright duck morning sell paper worry" \
--bls_withdrawal_credentials_list="0x00bd0b5a34de5fb17df08410b5e615dda87caf4fb72d0aac91ce5e52fc6aa8de,0x00a75d83f169fa6923f3dd78386d9608fab710d8f7fcf71ba9985893675d5382" \
--validator_start_index=0 \
--validator_indices="50000, 50001" \
--execution_address="0x3434343434343434343434343434343434343434"

选项 2:源代码 + 虚拟环境

交互模式python ./staking_deposit/deposit.py generate-bls-to-execution-change带标志的命令行python ./staking_deposit/deposit.py --language=english generate-bls-to-execution-change \
--chain=mainnet \
--mnemonic="<您的助记符>" \
--bls_withdrawal_credentials_list="<您的旧 BLS 提款凭证>" \
--validator_start_index=<EIP-2334 中的密钥起始索引> \
--validator_indices="<您的验证者索引>" \
--execution_address="<用于提款的执行地址>"
[Example]python ./staking_deposit/deposit.py --language=english generate-bls-to-execution-change \
--chain=mainnet \
--mnemonic="sister protect peanut hill ready work profit fit wish want small inflict flip member tail between sick setup bright duck morning sell paper worry" \
--bls_withdrawal_credentials_list="0x00bd0b5a34de5fb17df08410b5e615dda87caf4fb72d0aac91ce5e52fc6aa8de,0x00a75d83f169fa6923f3dd78386d9608fab710d8f7fcf71ba9985893675d5382" \
--validator_start_index=0 \
--validator_indices="50000, 50001" \
--execution_address="0x3434343434343434343434343434343434343434"
对于 devnet,可以添加一个参数:--devnet_chain_setting='{ "network_name": "<网络名称>", "genesis_fork_version": "<创世块分叉版本>", "genesis_validator_root": "<创世块验证者 root>" }'[示例:withdrawal-mainnet-shadowfork-1]--devnet_chain_setting='{ "network_name": "withdrawal-msf-1", "genesis_fork_version": "0x10000043", "genesis_validator_root": "0xe9ec351d158fd3b89b6afd2e6033bcae8d8adc2dd4c560c4bbf852d47ed0410e" }'

预期输出

**[Warning] you are setting an Eth1 address as your withdrawal address. Please ensure that you have control over this address.**

Verifying your BLSToExecutionChange file: [####################################] N/N

Success!
Your SignedBLSToExecutionChange JSON file can be found at: /.../staking-deposit-cli/bls_to_execution_changes

Press any key.
默认情况下,你可以在 ./bls_to_execution_changes 文件夹中找到 bls_to_execution_changes-*.json 文件。

上传到信标节点 BLSToExecutionChange

您可以使用 curl 命令从命令行广播您已签名的消息:curl -X POST -H “Content-type: application/json” -d @<@文件名目标> \
http://<BEACON_NODE_HTTP_API_URL>/eth/v1/beacon/pool/bls_to_execution_changes
您也可以使用 Beaconcha.in 广播工具,通过 Web 用户界面上传您的消息:Beaconcha.in 广播工具