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

Implement TOML Configuration for All Services #152

Merged
merged 18 commits into from
Feb 5, 2024
Merged

Implement TOML Configuration for All Services #152

merged 18 commits into from
Feb 5, 2024

Conversation

kobayurii
Copy link
Member

@kobayurii kobayurii commented Dec 21, 2023

This pull request introduces a comprehensive implementation of TOML configuration for all services within the project.
The primary goal is to enhance configurability, ease of maintenance, and flexibility across various components.
The changes included in this pull request are outlined below:

  1. New Configuration File:
    Introduces TOML configuration file for all services.
  2. TOML Syntax:
    Adopts TOML syntax for configuration file, providing a clear and human-readable format for specifying settings.
  3. Services-Specific Settings:
    Defines services-specific settings in the configuration file.
  4. Centralized Configuration:
    Centralized configuration offers flexibility management for all services.
  5. ENV variables supports:
    The configuration file supports the use of ENV variables, which greatly extends the possibilities.
  6. Validation and Error Handling:
    Implements validation mechanisms to ensure that configuration files adhere to the expected structure and contain valid values. Introduces error handling for scenarios where configuration values are missing or incorrect.

For developers who want to operate the ReadRPC node for their own needs.
This PR includes serving the data related to specific contracts, which actsas a backend for applications.
The configuration provides opportunities not to serve all the archival data.

This pull request aims to enhance the maintainability and configurability of the project by adopting a standardized TOML configuration approach.

@kobayurii kobayurii self-assigned this Dec 21, 2023
@kobayurii kobayurii force-pushed the config branch 3 times, most recently from a5320f7 to 9c11bd3 Compare December 22, 2023 08:20
@kobayurii kobayurii changed the title Config (WIP): Add configuration Dec 22, 2023
@kobayurii kobayurii force-pushed the config branch 3 times, most recently from ea0be28 to 3cad8f0 Compare December 22, 2023 09:26
@kobayurii kobayurii force-pushed the config branch 2 times, most recently from eecfd30 to b14fd10 Compare January 5, 2024 17:29
@kobayurii kobayurii requested a review from khorolets January 5, 2024 17:31
configuration/example.config.toml Outdated Show resolved Hide resolved
configuration/example.config.toml Outdated Show resolved Hide resolved
configuration/example.config.toml Outdated Show resolved Hide resolved
configuration/example.config.toml Outdated Show resolved Hide resolved
configuration/example.config.toml Show resolved Hide resolved
@kobayurii kobayurii changed the title (WIP): Add configuration Implement TOML Configuration for All Services Jan 25, 2024
@kobayurii kobayurii marked this pull request as ready for review January 25, 2024 13:56
@kobayurii kobayurii marked this pull request as draft January 25, 2024 15:08
@kobayurii kobayurii marked this pull request as ready for review January 25, 2024 15:13
@kobayurii kobayurii force-pushed the config branch 2 times, most recently from 893953b to c422c91 Compare January 25, 2024 17:19
Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

Overall looks great! I've left comments here and there, please, address the issues I've marked.

configuration/Cargo.toml Outdated Show resolved Hide resolved
configuration/README.md Outdated Show resolved Hide resolved
configuration/README.md Outdated Show resolved Hide resolved
configuration/example.config.toml Outdated Show resolved Hide resolved
configuration/example.config.toml Outdated Show resolved Hide resolved
tx-indexer/src/collector.rs Outdated Show resolved Hide resolved
tx-indexer/src/storage/database.rs Show resolved Hide resolved
khorolets
khorolets previously approved these changes Jan 29, 2024
Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

LGTM!

@kobayurii kobayurii marked this pull request as draft January 29, 2024 15:01
add config.toml around env variables
fix docker build
@kobayurii kobayurii marked this pull request as ready for review January 30, 2024 18:28
@kobayurii kobayurii requested a review from khorolets January 30, 2024 18:28
@kobayurii kobayurii force-pushed the config branch 3 times, most recently from 934ce05 to 090dcc4 Compare February 2, 2024 11:26
Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

LGTM!

@kobayurii kobayurii merged commit 369d2ed into main Feb 5, 2024
3 checks passed
@kobayurii kobayurii deleted the config branch February 5, 2024 09:40
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.

2 participants