stellar / go

Stellar's public monorepo of go code
https://stellar.org/developers
Apache License 2.0
1.29k stars 502 forks source link

services/horizon: Validate network settings against datastore metadata #5384

Open urvisavla opened 2 months ago

urvisavla commented 2 months ago

What problem does your feature solve?

Consider validating network settings against the metadata of the objects fetched from the datastore to detect mismatches.

While working on #4911, I reingested data for the wrong network ((horizon configured with pubnet while downloading data for testnet) and got an error like this: error processing ledger range 3800 - 3810: Error streaming changes during ledger batch: Error streaming changes from ledger: could not read transaction: unknown tx hash...... It would be more useful to detect the mismatch in network settings using the metadata and validate that against the network settings and throw a more specific error message indicating the mismatch.

What would you like to see?

Detect and show an error when the configured network doesn't match the network of the downloaded data.

What alternatives are there?

tamirms commented 1 month ago

this is blocked on https://stellarorg.atlassian.net/browse/HUBBLE-397 which implements the data lake schema