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(consensus): try sync using context instead of sync_receiver #2930

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

Conversation

asmaastarkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor

@matan-starkware matan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @asmaastarkware)


crates/sequencing/papyrus_consensus/src/manager_test.rs line 163 at r1 (raw file):

        decision_tx.send(()).unwrap();
        Ok(())
    });

can you convert the asserts to withf?

Code quote:

    context.expect_decision_reached().return_once(move |block, votes| {
        assert_eq!(block, BlockHash(Felt::TWO));
        assert_eq!(votes[0].height, 2);
        decision_tx.send(()).unwrap();
        Ok(())
    });

@asmaastarkware asmaastarkware force-pushed the asmaa/decision_reached_updates_sync branch 5 times, most recently from f29b499 to 8f5e8e7 Compare December 26, 2024 10:06
@asmaastarkware asmaastarkware force-pushed the asmaa/manager_try_sync branch 4 times, most recently from 2d30fad to 40b17d6 Compare December 26, 2024 12:47
Base automatically changed from asmaa/decision_reached_updates_sync to main December 26, 2024 12:47
Copy link

Artifacts upload workflows:

@matan-starkware matan-starkware self-requested a review December 26, 2024 12:50
Copy link
Contributor

@matan-starkware matan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @asmaastarkware)


crates/sequencing/papyrus_consensus/src/manager_test.rs line 229 at r2 (raw file):

            .unwrap();
        block_receiver
    });

can you replace this with the local fn we have expect_validate_proposal(top of file)

Code quote:

    context.expect_validate_proposal().returning(move |_, _, _| {
        let (block_sender, block_receiver) = oneshot::channel();
        block_sender
            .send((BlockHash(Felt::ONE), ProposalFin { proposal_content_id: BlockHash(Felt::ONE) }))
            .unwrap();
        block_receiver
    });

Copy link
Contributor

@matan-starkware matan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @asmaastarkware)

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.

3 participants