node icon indicating copy to clipboard operation
node copied to clipboard

Avoid unauthenticated Engine API probe in consensus-entrypoint

Open riyue121 opened this issue 6 months ago • 1 comments

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.

riyue121 avatar May 22 '26 16:05 riyue121

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

cb-heimdall avatar May 22 '26 16:05 cb-heimdall

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.

github-actions[bot] avatar Jun 06 '26 01:06 github-actions[bot]

This pull request was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Jun 11 '26 01:06 github-actions[bot]