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

feat: sanity checker for network config #279

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Commits on Jun 6, 2024

  1. feat: sanity checker for network config

    Implement a sanity checker that checks that the information stored in
    the DB corresponds the chain for which the app is run. If the app is run
    for one chain, and the DB contains data for another chain, the sanity
    checker prevents the app from start and throws the error.
    AlexanderLukin committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    774e97f View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. Configuration menu
    Copy the full SHA
    69af272 View commit details
    Browse the repository at this point in the history
  2. refactor: rename findOneById method

    Rename the `findOneById` method of the `SRModuleStorageService` to
    `findOneByModuleId`.
    AlexanderLukin committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    f6051f0 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. Configuration menu
    Copy the full SHA
    23c807b View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2024

  1. refactor: replace constants with module addresses

    Replace the internal `CURATED_MODULE_ADDRESSES_FOR_CHAINS` constant with
    curated module addresses with the appropriate
    `REGISTRY_CONTRACT_ADDRESSES` constant from `@lido-nestjs` repo.
    AlexanderLukin committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    ef7d2d3 View commit details
    Browse the repository at this point in the history
  2. refactor: fix lint errors in tests

    Remove unnecessary `consensusProviderService` variable and fix lint
    errors in unit tests for `NetworkValidation` service.
    AlexanderLukin committed Jun 11, 2024
    Configuration menu
    Copy the full SHA
    ed54f90 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. refactor: move network ID checking

    Move checking that the network ID specified in .env config matches the
    EL chain ID one level up in the `validate` method of the
    `NetworkValidation` service.
    AlexanderLukin committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    4a6c3ca View commit details
    Browse the repository at this point in the history
  2. refactor: new checkChainIdMismatch method

    Move checking that chain ID from the config, EL chain ID and CL chain ID
    match each other to the separate `checkChainIdMismatch` private method
    of the `NetworkValidation` service.
    AlexanderLukin committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    529f2f8 View commit details
    Browse the repository at this point in the history
  3. refactor: new specific error types

    Add two new custom error types (`ChainMismatchError` and
    `InconsistentDataInDBError`) with properties that help better indicate
    specific of the error. Update test cases to make sure that correct error
    types with correct properties are returned in each test case.
    AlexanderLukin committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    407dabe View commit details
    Browse the repository at this point in the history
  4. refactor: rename symbols

    Rename `dbKey` local constant to `dbKeys`;
    Rename `dbOperator` local constant to `dbOperators`.
    AlexanderLukin committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    7016a00 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9a08698 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. chore: add new specific error types

    Add new specific error types for cases when keys or operators table is
    empty. Change error messages to better reflect the essence of the error.
    Add new tests for testing these new error types.
    AlexanderLukin committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    a194a83 View commit details
    Browse the repository at this point in the history
  2. fix: test for chain and EL IDs mismatch

    Fix test that tests the case when chain ID and EL ID don't match each
    other. This test should not depend on the value of the
    `VALIDATOR_REGISTRY_ENABLE` env variable.
    AlexanderLukin committed Jun 18, 2024
    Configuration menu
    Copy the full SHA
    8c04d2f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8bf17bf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    be0b2d6 View commit details
    Browse the repository at this point in the history