diff --git a/lodestar/run.sh b/lodestar/run.sh index b230db0e..0450f71d 100755 --- a/lodestar/run.sh +++ b/lodestar/run.sh @@ -54,6 +54,15 @@ if [ -f /home/charon/vc-config/proposer-config.json ]; then proposer_config: {}, default_config: {fee_recipient: d.fee_recipient, builder: {gas_limit: d.gas_limit}}, }; + if (d.builder) { + // Per-entry override keys match the keymanager JSON format, pass through verbatim. + Object.assign(out.default_config.builder, { + min_bid: d.builder.min_bid, + boost_factor: d.builder.builder_boost_factor, + max_execution_payment: d.builder.max_execution_payment, + builders: d.builder.builders, + }); + } for (const [pubkey, entry] of Object.entries(src.proposer_config || {})) { out.proposer_config[pubkey] = { fee_recipient: entry.fee_recipient ?? d.fee_recipient, diff --git a/prysm/run.sh b/prysm/run.sh index c937c7e0..eec11e2e 100755 --- a/prysm/run.sh +++ b/prysm/run.sh @@ -43,21 +43,26 @@ echo "Imported all keys" # Render Prysm's proposer settings from the charon-generated canonical config when available: # entries only carry fields diverging from default_config, absent fields fall back to it. +# Builder configuration renders as the v2 schema, inherited per key from default_config. PROPOSER_SETTINGS=() if [[ -f /home/charon/vc-config/proposer-config.json ]]; then echo "proposer-config.json found, rendering prysm proposer settings" jq --argjson enabled "${BUILDER_API_ENABLED}" ' .default_config as $d | + ($d.builder != null) as $b | { - proposer_config: (.proposer_config | map_values({ - fee_recipient: (.fee_recipient // $d.fee_recipient), - builder: {enabled: $enabled, gas_limit: (.gas_limit // $d.gas_limit)} - })), - default_config: { - fee_recipient: $d.fee_recipient, - builder: {enabled: $enabled, gas_limit: $d.gas_limit} - } - }' /home/charon/vc-config/proposer-config.json >/tmp/prysm-proposer-settings.json + proposer_config: (.proposer_config | map_values( + {fee_recipient: (.fee_recipient // $d.fee_recipient)} + + (if $b then {gas_limit: (.gas_limit // $d.gas_limit)} else {} end) + + {builder: {enabled: $enabled, gas_limit: (.gas_limit // $d.gas_limit)}} + )), + default_config: ( + {fee_recipient: $d.fee_recipient} + + (if $b then {gas_limit: $d.gas_limit} else {} end) + + {builder: ({enabled: $enabled, gas_limit: $d.gas_limit} + ($d.builder // {}))} + ) + } + + (if $b then {version: 2} else {} end)' /home/charon/vc-config/proposer-config.json >/tmp/prysm-proposer-settings.json PROPOSER_SETTINGS+=(--proposer-settings-file="/tmp/prysm-proposer-settings.json") else echo "proposer-config.json not found, running without proposer settings"