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

feat(status): Add snapshot progress RPC #5368

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

akaladarshi
Copy link
Contributor

@akaladarshi akaladarshi commented Mar 3, 2025

Summary of changes

Changes introduced in this pull request:

  • Create an Appcontext in daemon to hold common objects
  • Create SnapshotTracket to track the snapshot progress
  • Expose a RPC API Filecoin.SyncStatus which reports the snapshot download progress

Reference issue to close (if applicable)

Closes: #4929

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@akaladarshi
Copy link
Contributor Author

akaladarshi commented Mar 3, 2025

@LesnyRumcajs @elmattic Please 🙏 can any one of give it a review.

This PR is not fully ready yet (naming, logging changes and need to remove extra command), just wanted to get some opinions on this, so I can proceed further.

Edit: To review only the snapshot progress tracker take a look at the last two commits

@LesnyRumcajs
Copy link
Member

I'll let @hanabi1224 or @lemmih take a look; I don't have the capacity currently.

use crate::lotus_json::lotus_json_with_self;

#[derive(PartialEq, Default, Serialize, Deserialize, Debug, Clone, JsonSchema)]
#[serde(rename_all = "camelCase")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#[serde(rename_all = "camelCase")]

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe it's OK to keep it for consistency

@akaladarshi akaladarshi marked this pull request as ready for review March 5, 2025 12:13
@akaladarshi akaladarshi requested a review from a team as a code owner March 5, 2025 12:13
@akaladarshi akaladarshi requested review from hanabi1224 and sudo-shashank and removed request for a team March 5, 2025 12:13
@akaladarshi
Copy link
Contributor Author

Hey @hanabi1224 can you please approve the request for running the workflows.

Also I have made some changes on top of your last review please do review and let me know what you think 🙏🏼.

@hanabi1224
Copy link
Contributor

@akaladarshi Any ideas why some tests keep failing after a few retries? Please let us know if assistance is needed for investigating the failures.

@akaladarshi
Copy link
Contributor Author

@akaladarshi Any ideas why some tests keep failing after a few retries? Please let us know if assistance is needed for investigating the failures.

The Snapshot test mostly fails because it is not able to download it before timeout.

I tried Devnet Check locally and it mostly failed because it was not able to download proofs and all.

I have seen these two test fail mostly in previous PR'S as well. Will try to dig deep.

@akaladarshi
Copy link
Contributor Author

@akaladarshi Any ideas why some tests keep failing after a few retries? Please let us know if assistance is needed for investigating the failures.

@hanabi1224 While looking into this issue: I came across this weird behaviour.

While adding another RPC call SyncSnapshotProgress inside the Status subcommand which already has an RPC SyncState, the Devnet Checks starts failing.

That's the reason why the Devnet Checks was working in initial commits, because I added an extra subcommand Progress to check the snapshot progress.

Have you noticed this behaviour or can you give some pointers about it?

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.

Indicate snapshot download in sync status
4 participants