Skip to content

Conversation

@guy-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

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 4 files reviewed, 1 unresolved discussion (waiting on @guy-starkware)


crates/apollo_l1_provider/src/test_utils.rs line 104 at r1 (raw file):

            tx_manager: content.tx_manager_content.map(Into::into).unwrap_or_default(),
            // The real Provider starts as Uninitialized by default, but for testing purposes we
            // start it as Pending.

Should we do this? can't we follow a similar flow to make it pending?

@guy-starkware guy-starkware changed the base branch from guyn/l1provider/check_tx_is_pending to graphite-base/10512 December 9, 2025 09:23
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 4 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/test_utils.rs line 104 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

Should we do this? can't we follow a similar flow to make it pending?

There are three options:

  1. Make it Pending by default, which is what most tests expect (those that aren't about initialization). Requires least changes in existing tests.
  2. Make it Uninitialized by default, then add with_state to all the tests that need it to already be in Pending.
  3. Make it Uninitialized and add code to make it bootstrap to get into Pending mode (the "more realistic flow"). That would add some complexity to most of the tests.

Looking at these three options, I prefer (1). But I'm open to other ideas or if you have some other reasons we should pick (2) or (3).

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 4 files reviewed, 1 unresolved discussion (waiting on @guy-starkware)


crates/apollo_l1_provider/src/test_utils.rs line 104 at r1 (raw file):

Previously, guy-starkware wrote…

There are three options:

  1. Make it Pending by default, which is what most tests expect (those that aren't about initialization). Requires least changes in existing tests.
  2. Make it Uninitialized by default, then add with_state to all the tests that need it to already be in Pending.
  3. Make it Uninitialized and add code to make it bootstrap to get into Pending mode (the "more realistic flow"). That would add some complexity to most of the tests.

Looking at these three options, I prefer (1). But I'm open to other ideas or if you have some other reasons we should pick (2) or (3).

Can we add a test for 3 and assert that the object is identical to the object used by most of the other test?
That way we can be sure that we're testing a state that we would actually get in production

@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 changed the base branch from graphite-base/10512 to guyn/l1provider/check_tx_is_pending 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 4 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/test_utils.rs line 104 at r1 (raw file):

Previously, sirandreww-starkware (Andrew Luka) wrote…

Can we add a test for 3 and assert that the object is identical to the object used by most of the other test?
That way we can be sure that we're testing a state that we would actually get in production

It is actually really hard to get the provider to be identical to one that has undergone the full process of bootstrapping.
I'll try to do something like that in a different PR but it needs more thought.

@guy-starkware guy-starkware force-pushed the guyn/l1provider/check_tx_is_pending branch from a3efc8e to b29880f Compare December 10, 2025 12:23
@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from b665780 to 7f1375e Compare December 10, 2025 12:23
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 4 files reviewed, 1 unresolved discussion (waiting on @sirandreww-starkware)


crates/apollo_l1_provider/src/test_utils.rs line 104 at r1 (raw file):

Previously, guy-starkware wrote…

It is actually really hard to get the provider to be identical to one that has undergone the full process of bootstrapping.
I'll try to do something like that in a different PR but it needs more thought.

Ok, so for the trivial case of having no txs and no need for bootstrapping (e.g., we get initialized directly into the correct block height) then the test is very easy to write. I added it in this PR.

@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from 7f1375e to cdec096 Compare December 10, 2025 13:45
@guy-starkware guy-starkware force-pushed the guyn/l1provider/check_tx_is_pending branch from b29880f to 4ed08e0 Compare December 10, 2025 13:45
@graphite-app graphite-app bot changed the base branch from guyn/l1provider/check_tx_is_pending to graphite-base/10512 December 11, 2025 09:28
@guy-starkware guy-starkware force-pushed the guyn/l1provider/uninitialized_check branch from cdec096 to caf686a Compare December 11, 2025 09:54
@guy-starkware guy-starkware changed the base branch from graphite-base/10512 to main-v0.14.1 December 11, 2025 09:54
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.

:lgtm:

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @ShahakShama)

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 3 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (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
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 1 of 4 files at r1, 3 of 3 files at r3, all commit messages.
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 d37cf6f Dec 15, 2025
27 of 29 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 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