Skip to content

Conversation

@guy-starkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

@guy-starkware guy-starkware marked this pull request as ready for review December 7, 2025 11:42
Copy link
Contributor Author

guy-starkware commented Dec 7, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

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 8 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @guy-starkware)


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 41 at r1 (raw file):

const FAKE_HASH: &str = "0x1234567890123456789012345678901234567890123456789012345678901234";

// Each function signature is hashed using keccak257 to get the selector.

257? not 256?


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 44 at r1 (raw file):

// For example, LogMessageToL2(address,uint256,uint256,uint256[],uint256,uint256)
// becomes "db80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b".
fn filter_to_hash(filter: &str) -> String {

I personally like putting tests at the top of the file and util functions at the bottom, but I leave it up to you


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 143 at r1 (raw file):

#[tokio::test]
async fn all_event_types_must_be_filtered_and_parsed() {

What about the other test? Where an event that shouldn't be parsed is generated and we make sure we don't parse it?
I'm ok with doing it in a different PR


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 143 at r1 (raw file):

#[tokio::test]
async fn all_event_types_must_be_filtered_and_parsed() {

Consider splitting this test to a test for each event

@guy-starkware guy-starkware force-pushed the guyn/baselayer/new_with_provider branch from aa4b181 to 59d2d3c Compare December 9, 2025 16:14
@guy-starkware guy-starkware force-pushed the guyn/baselayer/test_event_types branch from 56deace to a9af227 Compare December 9, 2025 16:14
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: all files reviewed, 4 unresolved discussions (waiting on @ShahakShama)


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 41 at r1 (raw file):

Previously, ShahakShama wrote…

257? not 256?

Oops!


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 44 at r1 (raw file):

Previously, ShahakShama wrote…

I personally like putting tests at the top of the file and util functions at the bottom, but I leave it up to you

I agree in this case it is better.


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 143 at r1 (raw file):

Previously, ShahakShama wrote…

What about the other test? Where an event that shouldn't be parsed is generated and we make sure we don't parse it?
I'm ok with doing it in a different PR

I will look into it. I'm not sure if we have another event like that in the contract... In any case, different PR.


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 143 at r1 (raw file):

Previously, ShahakShama wrote…

Consider splitting this test to a test for each event

I will consider it :)

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: 7 of 8 files reviewed, 4 unresolved discussions (waiting on @ShahakShama)


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 143 at r1 (raw file):

Previously, guy-starkware wrote…

I will consider it :)

Having considered it, it will cause us to skip a very important step: checking that every item in event_identifiers_to_track() is represented in our parsing code. If we do a separate test for each, we'd have to remember to manually add any new log types.

@guy-starkware guy-starkware force-pushed the guyn/baselayer/test_event_types branch from 83fc919 to 7fe085f Compare December 10, 2025 08:38
@guy-starkware guy-starkware force-pushed the guyn/baselayer/new_with_provider branch from 59d2d3c to 7be8f82 Compare December 10, 2025 08:38
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: 7 of 8 files reviewed, 4 unresolved discussions (waiting on @ShahakShama)


crates/apollo_l1_provider/tests/flow_test_event_filters.rs line 143 at r1 (raw file):

Previously, guy-starkware wrote…

I will look into it. I'm not sure if we have another event like that in the contract... In any case, different PR.

So I'm going to add a test that LogMessageToL1 does not get filtered. It will be on the top of the PR stack.

@guy-starkware guy-starkware force-pushed the guyn/baselayer/test_event_types branch from 877a4c9 to 961e73b Compare December 15, 2025 12:43
@guy-starkware guy-starkware force-pushed the guyn/baselayer/new_with_provider branch from f6794de to 18cd126 Compare December 15, 2025 12:43
@guy-starkware guy-starkware changed the base branch from guyn/baselayer/new_with_provider to main-v0.14.1 December 15, 2025 21:29
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 10 files at r4, 8 of 8 files at r6, 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 4960d82 Dec 15, 2025
50 of 78 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 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.

4 participants