Skip to content

apollo_l1_provider: create l1 message provider config struct #8075

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

Open
wants to merge 1 commit into
base: arni/l1_provider/config/scraper_config_to_config_file
Choose a base branch
from

Conversation

ArniStarkware
Copy link
Contributor

@ArniStarkware ArniStarkware commented Jul 17, 2025

In this PR, we create the struct L1MessageProviderConfig.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

ArniStarkware commented Jul 17, 2025

Copy link
Contributor

@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.

Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @giladchase)


crates/apollo_l1_provider/src/config.rs line 33 at r1 (raw file):

        ];

        sub_configs.into_iter().flatten().collect()

I'm not sure what the final structure would be in this case. Would it just have two fields: l1_provider_config and l1_scraper_config? I think maybe there's a way to do this without vec! and the flatten that would make that more obvious.

Also, you probably want to run the binary that produces the config json files.

@ArniStarkware
Copy link
Contributor Author

crates/apollo_l1_provider/src/config.rs line 33 at r1 (raw file):

Previously, guy-starkware wrote…

I'm not sure what the final structure would be in this case. Would it just have two fields: l1_provider_config and l1_scraper_config? I think maybe there's a way to do this without vec! and the flatten that would make that more obvious.

Also, you probably want to run the binary that produces the config json files.

Regarding how unreadable this flatten is - fixed. Thanks - I hate it.

This struct is not used anywhere in this PR. It is first used in the next PR: #8076.
You can see the result of the run of the binary in the next PR.

@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/scraper_config_to_config_file branch from cf946b8 to f304a6b Compare July 21, 2025 08:33
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/l1_message_provider_config branch from 73beece to cd73ed8 Compare July 21, 2025 08:33
Copy link
Contributor

@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.

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

Copy link
Contributor Author

@ArniStarkware ArniStarkware 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, 1 unresolved discussion (waiting on @giladchase)


crates/apollo_l1_provider/src/config.rs line 24 at r2 (raw file):

    pub l1_provider_config: L1ProviderConfig,
    pub l1_scraper_config: L1ScraperConfig,
}

As discussed with @guy-starkware .
We should consider making this a flat configuration, which will replace both L1ProviderConfig and L1ScraperConfig.

Code quote:

#[derive(Clone, Debug, Default, Serialize, Deserialize, Validate, PartialEq)]
pub struct L1MessageProviderConfig {
    pub l1_provider_config: L1ProviderConfig,
    pub l1_scraper_config: L1ScraperConfig,
}

@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/l1_message_provider_config branch from cd73ed8 to c829762 Compare July 21, 2025 12:07
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/scraper_config_to_config_file branch 2 times, most recently from fe0582b to a634665 Compare July 22, 2025 17:06
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/l1_message_provider_config branch from c829762 to 8d6e846 Compare July 22, 2025 17:06
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/scraper_config_to_config_file branch from a634665 to e0b1fbc Compare July 28, 2025 16:14
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/l1_message_provider_config branch from 8d6e846 to c3988a8 Compare July 28, 2025 16:14
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/scraper_config_to_config_file branch from e0b1fbc to 8bd3e10 Compare July 30, 2025 17:34
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/l1_message_provider_config branch 2 times, most recently from 3203369 to cf7e240 Compare July 30, 2025 19:03
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/scraper_config_to_config_file branch from 8bd3e10 to 2a323db Compare July 30, 2025 19:03
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/l1_message_provider_config branch from cf7e240 to e87fc07 Compare July 31, 2025 10:59
@ArniStarkware ArniStarkware force-pushed the arni/l1_provider/config/scraper_config_to_config_file branch from 2a323db to c388197 Compare July 31, 2025 10:59
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