Skip to content

Conversation

@guy-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from c4630be to ee5e32e Compare December 3, 2025 12:41
@guy-starkware guy-starkware force-pushed the guyn/l1provider/reset_bootstrapper branch from 046f9f1 to b8af5b7 Compare December 3, 2025 12:41
@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from ee5e32e to 453d1c4 Compare December 7, 2025 13:19
@guy-starkware guy-starkware force-pushed the guyn/l1provider/reset_bootstrapper branch 2 times, most recently from 444039c to c4cdcd7 Compare December 9, 2025 08:45
@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from 453d1c4 to 3de885e Compare December 9, 2025 08:45
Copy link
Contributor

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @guy-starkware)


crates/apollo_l1_provider/src/l1_provider.rs line 447 at r1 (raw file):

            self.state = ProviderState::Pending;
            self.reset_bootstrapper();

This is so next time you try to bootstrap you start from a reset bootstrapped? Is it not better to reset once the state moves to bootstrapping?

Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/l1_provider.rs line 447 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

This is so next time you try to bootstrap you start from a reset bootstrapped? Is it not better to reset once the state moves to bootstrapping?

It would make life a little bit harder for testing, since you'd be initializing the test with some particular bootstrapper, and then have to somehow skip the part where you reset it just before starting bootstrapping.

Copy link
Contributor

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @guy-starkware)


crates/apollo_l1_provider/src/l1_provider.rs line 447 at r1 (raw file):

Previously, guy-starkware wrote…

It would make life a little bit harder for testing, since you'd be initializing the test with some particular bootstrapper, and then have to somehow skip the part where you reset it just before starting bootstrapping.

Can we add a test that would test this flow at least?

Copy link
Contributor

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @guy-starkware)


crates/apollo_l1_provider/src/l1_provider.rs line 447 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

Can we add a test that would test this flow at least?

Wait what am I talking about, wrong PR...

Copy link
Contributor

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @guy-starkware)


crates/apollo_l1_provider/src/l1_provider.rs line 447 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

Wait what am I talking about, wrong PR...

Doesn't reset_bootstrapper return the bootstrapper to a state where it can begin bootstrapping (identical to the initial bootstrapper) Why would you need to avoid resetting it in tests?

Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/l1_provider.rs line 447 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

Doesn't reset_bootstrapper return the bootstrapper to a state where it can begin bootstrapping (identical to the initial bootstrapper) Why would you need to avoid resetting it in tests?

Yeah, I guess if we are going to override the bootstrapper state in the test we can also circumvent the "reset" part, too.

@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from 3de885e to b665780 Compare December 9, 2025 18:35
@guy-starkware guy-starkware force-pushed the guyn/l1provider/reset_bootstrapper branch from c4cdcd7 to 91f02de Compare December 9, 2025 18:35
Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/l1_provider.rs line 447 at r1 (raw file):

Previously, guy-starkware wrote…

Yeah, I guess if we are going to override the bootstrapper state in the test we can also circumvent the "reset" part, too.

I had to change only one test to skip the "normal" way we trigger bootstrapping, but that's not too bad.

Copy link
Contributor

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @guy-starkware and @ShahakShama)


crates/apollo_l1_provider/src/l1_provider.rs line 335 at r2 (raw file):

        self.reset_bootstrapper();
        self.state = ProviderState::Bootstrap;
        self.bootstrapper.start_l2_sync(self.current_height, target_height);

make this a function

Code quote:

        self.state = ProviderState::Bootstrap;
        self.bootstrapper.start_l2_sync(self.current_height, target_height);

crates/apollo_l1_provider/src/l1_provider_tests.rs line 379 at r2 (raw file):

    l1_provider.initialize(STARTUP_HEIGHT, vec![]).await.expect("l1 provider initialize failed");
    l1_provider.state = ProviderState::Bootstrap;
    l1_provider.bootstrapper.start_l2_sync(STARTUP_HEIGHT, TARGET_HEIGHT);

call that function here

Code quote:

    l1_provider.state = ProviderState::Bootstrap;
    l1_provider.bootstrapper.start_l2_sync(STARTUP_HEIGHT, TARGET_HEIGHT);

Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ShahakShama reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @guy-starkware)

@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from caf686a to c0cf695 Compare December 15, 2025 10:59
@guy-starkware guy-starkware force-pushed the guyn/l1provider/reset_bootstrapper branch from 31cfc70 to 4eddf74 Compare December 15, 2025 10:59
@guy-starkware guy-starkware changed the base branch from guyn/l1provider/uninitialized_check to main-v0.14.1 December 15, 2025 12:41
Copy link
Contributor Author

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

@guy-starkware reviewed 2 of 4 files at r3, 2 of 2 files at r4, all commit messages.
@guy-starkware dismissed @sirandreww-starkware from 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @guy-starkware)

@guy-starkware guy-starkware added this pull request to the merge queue Dec 15, 2025
Merged via the queue into main-v0.14.1 with commit fd51bee Dec 15, 2025
34 of 42 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants