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

Restructure configuration #550

Merged
merged 3 commits into from
Aug 10, 2022
Merged

Restructure configuration #550

merged 3 commits into from
Aug 10, 2022

Conversation

Voxelot
Copy link
Member

@Voxelot Voxelot commented Aug 10, 2022

This PR moves genesis chainspec configuration back to being a top-level module, and moves "Config" from being a top level module to being a submodule of service. This is because Config is only useful in the context of starting a FuelService, while chain_config is consumed in a larger variety of ways (e.g. node snapshot tooling).

This also reduces the number of breaking changes when migrating from v0.9.x.

Copy link
Contributor

@ControlCplusControlV ControlCplusControlV left a comment

Choose a reason for hiding this comment

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

Looking at failing tests there ares still some files you missed, I did a quick grep and it showed

./fuel-core-bft/src/lib.rs:pub use config::Config;
./fuel-txpool/src/lib.rs:pub use config::Config;
./fuel-block-importer/src/lib.rs:pub use config::Config;
./fuel-sync/src/lib.rs:pub use config::Config;
./fuel-block-producer/src/lib.rs:pub use config::Config;
./fuel-block-executor/src/lib.rs:pub use config::Config;
./fuel-core/src/database/metadata.rs:use crate::service::config::Config;
./fuel-core/src/service/genesis.rs:    service::{config::Config, FuelService},
./fuel-core/src/service/genesis.rs:    use crate::service::config::Config;
./fuel-relayer/src/lib.rs:pub use config::Config;
./fuel-tests/tests/chain_conf.rs:use fuel_core::{config::Config, service::FuelService};
./fuel-tests/tests/debugger.rs:use fuel_core::{config::Config, service::FuelService};

@Voxelot
Copy link
Member Author

Voxelot commented Aug 10, 2022

Those configs have the same name, but this refactor only applied to the one in fuel-core. I've pushed a commit which should address the current failure.

@Voxelot Voxelot enabled auto-merge (squash) August 10, 2022 22:15
Copy link
Contributor

@bvrooman bvrooman left a comment

Choose a reason for hiding this comment

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

👍

@Voxelot Voxelot merged commit c93fa04 into master Aug 10, 2022
@Voxelot Voxelot deleted the Voxelot/re-refactor-conf branch August 10, 2022 22:18
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