Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle server_info while Clio is loading ledger data #1299

Open
mounikakun opened this issue Mar 27, 2024 · 1 comment
Open

Handle server_info while Clio is loading ledger data #1299

mounikakun opened this issue Mar 27, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@mounikakun
Copy link
Collaborator

Summary

Currently Clio returns "error": "notReady" if a request was sent while it is loading ledger data and do not serve any requests until it loads the initial ledger.

Feature request is to handle server_info and include current ledger sequence even when Clio is loading data similar to rippled.

Motivation

If Clio is setup with new database it can take up to 10 minutes to load ledger data so the user has to keep checking or track time while waiting for Clio to be in sync.It will be more informative for the user to gauge the approximate wait time if Clio can return current sequence in server_info while loading data.

Moreover rippled is handling server_info and returning current sequence while loading ledger data from the network so it will be good to have the same for Clio.

Solution

Handle server_info while loading ledger data and response should have seq. It is good replicate rippled's behavior for other params.

Sample expected response:

{
    "result": {
        "info": {
           .
           .
           .
            "validated_ledger": {
                .
                .
                _**"seq": 54**_
            }
           .
           .
        },
        "status": "success"
    }
}

Paths Not Taken

@mounikakun mounikakun added the enhancement New feature or request label Mar 27, 2024
@godexsoft godexsoft changed the title Handle server_info request and include current sequence when Clio is loading ledger data similar to rippled. Handle server_info while Clio is loading ledger data Mar 28, 2024
@godexsoft
Copy link
Collaborator

Idea: have a separate handler for notReady situation. Clio will always call it instead of any RPC the user requested while Clio is not ready to handle requests.
The new handler can contain info to help diagnose Clio's startup.

@godexsoft godexsoft added this to the 2.4 milestone Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants