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

Refactor archiver public API to return ArchiveBlockOutcome #3108

Merged
merged 4 commits into from
Oct 9, 2024

Conversation

teor2345
Copy link
Contributor

@teor2345 teor2345 commented Oct 9, 2024

This PR prepares for PR #3100 by moving piece mappings from NewArchivedSegment into a new ArchiveBlockOutcome return type. It also updates the RPCs with a notification channel for these separate mappings.

As part of this change, the archiver creates GlobalObjects directly, which significantly simplifies the code.

Code contributor checklist:

nazar-pc
nazar-pc previously approved these changes Oct 9, 2024
Copy link
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

A few things can be improved, but looks good overall

crates/sc-consensus-subspace/src/archiver.rs Outdated Show resolved Hide resolved
crates/sc-consensus-subspace/src/archiver.rs Outdated Show resolved Hide resolved
crates/sc-consensus-subspace/src/archiver.rs Outdated Show resolved Hide resolved
crates/subspace-archiving/src/archiver.rs Outdated Show resolved Hide resolved
crates/subspace-archiving/tests/integration/archiver.rs Outdated Show resolved Hide resolved
Copy link
Member

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

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

Looks goodl

@teor2345
Copy link
Contributor Author

teor2345 commented Oct 9, 2024

Done, with mass renames as requested.

@teor2345 teor2345 added this pull request to the merge queue Oct 9, 2024
Merged via the queue into main with commit ac9e171 Oct 9, 2024
9 checks passed
@teor2345 teor2345 deleted the archiver-public-api branch October 9, 2024 22:51
encoded_block,
block_object_mappings,
!sync_oracle.is_major_syncing(),
) {
);
send_object_mapping_notification(
Copy link
Member

Choose a reason for hiding this comment

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

Should skip this call if object mappings list is empty

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

Successfully merging this pull request may close these issues.

3 participants