Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prysm persist w3s keys loaded via keymanager #1917

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Eth Docker uses a "semver-ish" scheme.
large.
- Second through fourth digit, [semver](https://semver.org/).

This is Eth Docker v2.12.1.0
This is Eth Docker v2.12.2.0
8 changes: 7 additions & 1 deletion prysm/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ fi

# Web3signer URL
if [ "${WEB3SIGNER}" = "true" ]; then
__w3s_url="--validators-external-signer-url http://web3signer:9000 --validators-external-signer-public-keys http://web3signer:9000/api/v1/eth2/publicKeys"
pietjepuk2 marked this conversation as resolved.
Show resolved Hide resolved
__w3s_url="--validators-external-signer-url http://web3signer:9000 \
--validators-external-signer-public-keys http://web3signer:9000/api/v1/eth2/publicKeys \
--validators-external-signer-key-file=/var/lib/prysm/w3s-keys.txt"

if [ ! -f /var/lib/prysm/w3s-keys.txt ]; then
touch /var/lib/prysm/w3s-keys.txt
fi
else
__w3s_url=""
fi
Expand Down
12 changes: 2 additions & 10 deletions vc-utils/keymanager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,7 @@ and secrets directories into .eth/validator_keys instead."
__api_port=${__vc_api_port}
__api_tls=${__vc_api_tls}

if [ -z "${PRYSM:+x}" ]; then
jq --arg pubkey_value "$__pubkey" --arg url_value "http://web3signer:9000" '. | .remote_keys += [{"pubkey": $pubkey_value, "url": $url_value}]' <<< '{}' >/tmp/apidata.txt
else
jq --arg pubkey_value "$__pubkey" --arg url_value "http://web3signer:9000" '. | .remote_keys += [{"pubkey": $pubkey_value}]' <<< '{}' >/tmp/apidata.txt
fi
jq --arg pubkey_value "$__pubkey" --arg url_value "http://web3signer:9000" '. | .remote_keys += [{"pubkey": $pubkey_value, "url": $url_value}]' <<< '{}' >/tmp/apidata.txt
pietjepuk2 marked this conversation as resolved.
Show resolved Hide resolved

get-token
__api_data=@/tmp/apidata.txt
Expand Down Expand Up @@ -991,11 +987,7 @@ validator-register() {

__w3s_pubkeys="$(echo "$__result" | jq -r '.data[].validating_pubkey')"
while IFS= read -r __pubkey; do
if [ -z "${PRYSM:+x}" ]; then
jq --arg pubkey_value "$__pubkey" --arg url_value "http://web3signer:9000" '. | .remote_keys += [{"pubkey": $pubkey_value, "url": $url_value}]' <<< '{}' >/tmp/apidata.txt
else
jq --arg pubkey_value "$__pubkey" --arg url_value "http://web3signer:9000" '. | .remote_keys += [{"pubkey": $pubkey_value}]' <<< '{}' >/tmp/apidata.txt
fi
jq --arg pubkey_value "$__pubkey" --arg url_value "http://web3signer:9000" '. | .remote_keys += [{"pubkey": $pubkey_value, "url": $url_value}]' <<< '{}' >/tmp/apidata.txt

__api_data=@/tmp/apidata.txt
__api_path=eth/v1/remotekeys
Expand Down