ObolNetwork / ObolNetwork/charon

CHARON_BEACON_NODE_ENDPOINTS doesn't support url params

Open
#3,228 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature protocol
Dominant language
Go
Stars
222
Forks
138
Avg merge
2d 6h
Merged PRs (30d)
35

Description

🐞 Bug Report

Description

Currently using google cloud managed blockchain to host my BN/EN, and the provided endpoint needs a API key to be appended at the end of the url. For example: https://beacon.someid.blockchainnodeengine.com/?key=SOME_KEY

I've configured .env as CHARON_BEACON_NODE_ENDPOINTS=https://beacon.someid.blockchainnodeengine.com/?key=SOME_KEY

And it seems that its unable to query the BN api endpoints.

Has this worked before in a previous version?

NA

🔬 Minimal Reproduction

Set .env as CHARON_BEACON_NODE_ENDPOINTS=https://beacon.someid.blockchainnodeengine.com/?key=SOME_KEY

🔥 Error

Emit scheduled slot event: beacon api validators: nok http response {"slot": 2306413, "label": "validators", "status_code": 400, "endpoint": "/eth/v1/beacon/states/head/validators", "method": "GET", "data": "{\"error\":{\"code\":500,\"message\":\"BAD_REQUEST: unknown field `key`, expected `id` or `status`\",\"stacktraces\":[],\"status\":\"\"}}"}
WARN tracker    Failed to check inclusion: beacon api block_attestations: request block attestations failed {"slot": 2306408, "label": "block_attestations", "status": 400, "body": "{\"error\":{\"code\":400,\"message\":\"API key not valid. Please pass a valid API key.\",\"status\":\"INVALID_ARGUMENT\",\"details\":[{\"@type\":\"type.googleapis.com/google.rpc.ErrorInfo\",\"reason\":\"API_KEY_INVALID\",\"domain\":\"googleapis.com\",\"metadata\":{\"service\":\"blockchainnodeengine.googleapis.com\"}}]}}"}

🌍 Your Environment

Operating System:

Ubuntu 22

What version of Charon are you running? (Which release)

1.0.1

Anything else relevant (validator index / public key)?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the handling of CHARON_BEACON_NODE_ENDPOINTS and follow how beacon API paths are joined to configured endpoints. Verify with the provided Google Cloud URL that its key remains query data for every request, while existing endpoint behavior still works; add regression coverage if the project has a relevant test.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.