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

Add a rest endpoint to return checkpoint in batches #19457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sadhansood
Copy link
Contributor

Description

This PR adds a rest endpoint in full node to return full checkpoints in batches. Additionally, it adds a query param to control server side wait timeout if there is no data available to reduce network traffic.

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 11:59pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 11:59pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 11:59pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 11:59pm

Comment on lines +103 to +105
fn path(&self) -> &'static str {
"/checkpoints/full/batch"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably just want the path to be "/checkpoints/full" to be consistent with the other apis

Comment on lines +133 to +135
pub struct GetCheckpointFullBatchQueryParameters {
pub start: CheckpointSequenceNumber,
pub batch_size: u32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look at the other list apis (checkpoints as an example) to match the param naming

pub struct GetCheckpointFullBatchQueryParameters {
pub start: CheckpointSequenceNumber,
pub batch_size: u32,
pub max_wait_ms: Option<u64>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed offline lets punt the long polling till later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants