node
node copied to clipboard
Avoid unauthenticated Engine API probe in consensus-entrypoint
Summary
This PR updates the consensus-entrypoint readiness check to avoid probing the execution client's Engine/Auth RPC endpoint without JWT authentication.
Previously, the script used:
curl "${BASE_NODE_L2_ENGINE_RPC/ws/http}"
When BASE_NODE_L2_ENGINE_RPC=ws://execution:8551, this expands to:
http://execution:8551
This sends an unauthenticated request to the Engine/Auth RPC endpoint. base-reth-node correctly returns 401, but it also logs the request as an error:
Invalid JWT: Authorization header is missing or invalid
This is a false positive and can be confusing during node operations and debugging.
Change
Instead of probing the Engine/Auth RPC endpoint, this PR checks the regular execution JSON-RPC endpoint using eth_chainId:
curl -s --max-time 10 --connect-timeout 5 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' \
http://execution:8545 | grep -q '"result":"0x2105"'
Motivation
This avoids generating misleading Invalid JWT errors in the execution logs while still ensuring that the execution client RPC is ready before starting base-consensus.
🟡 Heimdall Review Status
| Requirement | Status | More Info | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Reviews |
🟡
0/1
|
Denominator calculation
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This pull request was closed because it has been inactive for 5 days since being marked as stale.