question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Service unavailable when fetching validator duties

See original GitHub issue

Description

When fetching the validator duties for a given epoch (a recent one close to the head) I get that the service is not available. Note that the endpoint I’m using is eth/v1/validator/duties/proposer/xxx and that the node is working properly (i.e. curl http://localhost:5051/eth/v1/beacon/genesis works)

{"code":503,"message":"Service unavailable"}

Note also that I started synching the node with an Infura provided initial-state several hours before, so perhaps the node hasn’t downloaded the whole beacon chain. However, I’m fetching the duties of very recent epochs so it shouldn’t be related.

Steps to Reproduce

curl localhost:5051/eth/v1/validator/duties/proposer/143159

Expected behavior: Get the duties of this given epoch

Actual behavior: Return a “Service unavailable” error

Frequency: Always

Versions (Add all that apply)

  • Software version: consensys/teku:22.8.1
  • Java version: NA
  • OS Name & Version: NA
  • Docker Version: NA
  • Cloud VM, type, size: NA

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ajsuttoncommented, Aug 30, 2022

Ah, calculating proposer duties requires access to a BeaconState from within that epoch. By default Teku using prune storage mode which doesn’t store any states prior to the finalized checkpoint so when you’re requesting proposer duties for a historic state the service is unavailable because that state has been pruned and the information is no longer available. We should provide a more useful reason here though.

So you’d need to set --data-archive-mode=archive to get Teku to retain older states but it still wouldn’t have information from before you first enable that or before the initial state you sync from. To get the entire history you’d have to sync from genesis.

Alternatively you could try out the experimental support for reconstructing historic states which lets you using initial-state to get in sync quickly but then backfills the historic beacon states. It will still take quite a while to get through them all but would be faster than syncing from genesis as we don’t need to revalidate signatures. You can enable it with --Xreconstruct-historic-states.

0reactions
alrevueltacommented, Aug 31, 2022

Thanks! I see, great explanation!

Closing, since it’s expected behavior. I solved my problem by just removing the initial-state flag and syncing the node from genesis since the suggested alternatives, archive doesn’t fully solve my issue and I don’t want to rely on experimental stuff.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the HTTP Error 503 Service Unavailable
The 503 (Service Unavailable) status code indicates that the server is currently unable to handle the request due to a temporary overload or ......
Read more >
503 Service Unavailable - SSL Handshake Failure
This error occurs during the SSL handshake process between Apigee Edge's Message Processor and the backend server: If the truststore of Apigee Edge's...
Read more >
Npm Error: 503 Service Unavailable for npm install command
Seems like your npm registry config pointing to some private registry that is down or unavailable. Try to check npm configuration :
Read more >
HTTP 503 status code (Service Unavailable)
An HTTP 503 status code (Service Unavailable) typically indicates a performance issue on the origin server. In rare cases, it indicates that CloudFront ......
Read more >
Azure function app 503 Service Unavailable in Code+Test
First I need to say I'm new to Azure function app and this maybe a simple issue. I have a function app to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found