ChainSafe / ChainSafe/lodestar
"Invalid string length" error when querying states
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 150
Description
### Describe the bug
```
curl -Ssv "http://consensus:5052/eth/v2/debug/beacon/states/finalized"
* Trying 172.21.0.12:5052...
* Connected to consensus (172.21.0.12) port 5052
> GET /eth/v2/debug/beacon/states/finalized HTTP/1.1
> Host: consensus:5052
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< vary: Origin
< access-control-allow-origin: *
< content-type: application/json; charset=utf-8
< content-length: 84
< Date: Thu, 23 Nov 2023 04:16:45 GMT
< Connection: keep-alive
< Keep-Alive: timeout=72
<
{ [84 bytes data]
* Connection #0 to host consensus left intact
{"statusCode":500,"error":"Internal Server Error","message":"Invalid string length"}
```
### Expected behavior
State json or an error that is more descriptive
### Steps to reproduce
(see above curl)
### Additional context
_No response_
### Operating system
Linux
### Lodestar version or commit hash
v1.12.0
Contributor guide
Research direction
Start by reproducing the curl request against Lodestar v1.12.0 and trace the handler for GET /eth/v2/debug/beacon/states/finalized. Determine why the request produces "Invalid string length" and make the endpoint return state JSON or a more descriptive error, then verify the response with the same request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100