SorellaLabs/brontes

Fix Discovery Issues and Improve Test Coverage for Protocol Pool Detection

Closed this issue · 0 comments

Describe the feature

Description

We've identified critical issues in our Discovery process that result in the failure to classify numerous pools, particularly from the Curve protocol. This issue primarily stems from:

  1. Incomplete Implementation: The current implementation of the Curve discovery does not comprehensively cover all pool factories and manually created pools, leading to significant data gaps.

  2. Database Query Errors: The SQL query intended to download the AddressToProtocolInfo from ClickHouse appears to be targeting the wrong table, further compounding the data integrity issues.

Proposed Solution

To address these challenges, the following steps are proposed:

A. Test Coverage Enhancement

  • Implement Comprehensive Tests: Develop unit and integration tests that cover all discovery protocols to ensure that pools are correctly identified and classified. These tests should verify the functionality of each protocol-specific discovery.

B. Discovery Implementation Review and Fix

  • Curve Discovery Review: Conduct a thorough review and reimplementation (if necessary) of the Curve discovery logic to ensure it captures all relevant pool types. For manually created pools, it will probably be easiest to gather them manually. You can also check the AddressMetadata table in clickhouse as it could potentially contain it.

C. Database Query Correction

  • Fix SQL Query: Correct the SQL query used to fetch AddressToProtocolInfo from ClickHouse, ensuring it accurately retrieves the necessary data from the correct table.

D. End-to-End Testing

  • E2E Test Implementation: Create an end-to-end test that:
    • Validates the detection and classification of new pools.
    • Confirms that data is correctly written to ClickHouse.
    • Ensures that the data can be accurately retrieved post-classification.

Additional context

No response