Skip to content
Draft
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
3 changes: 2 additions & 1 deletion .github/workflows/test-client-combos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ jobs:
{"labels": ["test-vero"],
"env": ["CORE_FILES=nimbus-cl-only.yml:vero-vc-only.yml:nethermind.yml:web3signer.yml",
"FEE_RECIPIENT=0xDccf8451070a86183eE70D330C4c43b686E9CF86",
"WEB3SIGNER=true"],
"WEB3SIGNER=true",
"VERO_DOCKER_TAG=master"],
"test_cl": true, "test_el": true, "test_vc": true},
{"labels": ["test-caplin"],
"env": ["CORE_FILES=caplin.yml:erigon.yml:lodestar-vc-only.yml:mev-boost.yml",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test-keymanager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ jobs:
"MEV_BOOST=true"]},
{"label": "test-teku", "files": "teku.yml:geth.yml"},
{"label": "test-grandine", "files": "grandine-allin1.yml:geth.yml", "grandine_wallet": true},
{"label": "test-vero", "files": "nimbus-cl-only.yml:vero-vc-only.yml:geth.yml", "w3s_only": true},
{"label": "test-vero", "files": "nimbus-cl-only.yml:vero-vc-only.yml:geth.yml", "w3s_only": true,
"env": ["VERO_DOCKER_TAG=master"]},
{"label": "test-grandine-plugin", "files": "grandine-plugin-allin1.yml:nethermind.yml",
"grandine_wallet": true,
"cl_service": "execution", "beacon_wait": 600,
Expand Down
41 changes: 36 additions & 5 deletions vero/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@ __normalize_int() {
printf '%s' "${v}"
}

__normalize_float() {
local v=$1
local int_part
local frac_part

if [[ "${v}" =~ ^[0-9]+(\.[0-9]+)?$ ]]; then
int_part="${v%%.*}"
frac_part=""
if [[ "${v}" == *.* ]]; then
frac_part="${v#*.}"
fi
# Strip leading zeros as text, as in __normalize_int
[[ "${int_part}" =~ ^0*([0-9]+)$ ]] && int_part="${BASH_REMATCH[1]}"
if [[ -n "${frac_part}" ]]; then
v="${int_part}.${frac_part}"
else
v="${int_part}"
fi
fi
printf '%s' "${v}"
}


# Set keymanager API token permissions
if [[ -f /var/lib/vero/keymanager-api-token.txt ]]; then
Expand Down Expand Up @@ -115,14 +137,23 @@ if [[ "${__mev_active}" -eq 1 || "${EPBS_BUILDERS}" = "true" ]]; then
fi
;;
esac
# Adjust once Vero supports ePBS CLI parameters, to pass them here like Prysm does
__epbs=""
if [[ -n "${EPBS_MIN_BID}" ]]; then
min_bid="$(__normalize_float "${EPBS_MIN_BID}")"
if [[ "${min_bid}" =~ ^[0-9]+(\.[0-9]+)?$ ]]; then
min_bid_gwei=$(awk -v v="${min_bid}" 'BEGIN{printf "%.0f", v * 1000000000}')
__epbs+=" --builder-min-bid ${min_bid_gwei}"
else
echo "WARNING: EPBS_MIN_BID has an invalid value of \"${EPBS_MIN_BID}\", ignoring"
fi
fi
# Compose keeps the newlines of a multi-line EPBS_BUILDER_URLS
builder_urls="${EPBS_BUILDER_URLS//[[:space:]]/}"
if [[ -n "${builder_urls}" || -n "${EPBS_MIN_BID}" ]]; then
echo "Vero does not support ePBS CLI parameters for builder URLs or minimum bid yet. Ignoring EPBS_BUILDER_URLS and EPBS_MIN_BID."
echo "Use \"./ethd keys set-builder\" to configure ePBS builders."
if [[ -n "${builder_urls}" ]]; then
__epbs+=" --builder-urls ${builder_urls}"
fi
else
__epbs=""
__mev_factor="--builder-boost-factor 0"
echo "Build blocks locally, use ePBS builders as fallback"
fi
Expand Down Expand Up @@ -169,4 +200,4 @@ fi

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__network} "${__graffiti_args[@]}" ${__mev_boost} ${__mev_factor} ${__log_level} ${__doppel} ${VC_EXTRAS}
exec "$@" ${__network} "${__graffiti_args[@]}" ${__mev_boost} ${__mev_factor} ${__epbs} ${__log_level} ${__doppel} ${VC_EXTRAS}
Loading