-
Notifications
You must be signed in to change notification settings - Fork 23
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
"value for domain lovelace violates check constraint lovelace_check" when calling grest.pool_info() #155
Comments
Strange indeed. I checked all the registered Koios nodes and none of them seem to have trouble with the mentioned pool ID.
SELECT
amount::lovelace AS as_sum
FROM
grest.pool_active_stake_cache AS pasc
WHERE
pasc.pool_id = 'pool1p3chxyfv5cfk95hwq5zqjuljrpyk3uk5ua5alpn8rjgkkvvy8ne'
AND
pasc.epoch_no = 388;
# as_sum
# ----------------
# 31775639067379
# (1 row)
SELECT
amount::lovelace AS es_sum
FROM
grest.epoch_active_stake_cache AS easc
WHERE
easc.epoch_no = 388;
# es_sum
# -------------------
# 25427056571856294
# (1 row)
SELECT
SUM(total_balance)::lovelace as stake
FROM
grest.stake_distribution_cache AS sdc
WHERE
sdc.pool_id = 'pool1p3chxyfv5cfk95hwq5zqjuljrpyk3uk5ua5alpn8rjgkkvvy8ne';
# stake
# ----------------
# 32527930705976
# (1 row) |
It seems that there's no data in the |
Our Koios setup isn't exactly standard. This is running in k8s with manifests adapted from Dandelion, so we don't have the benefit of being able to run the setup script. The missing epoch |
Thanks for the background. I think the part that might be related to k8s would be dbsync log JSON files which currently does not have better way of handling epoch-wide sum of epoch stake to be marked as ready for processing stake of new epoch (as the calculation of epoch_stake for new epoch occurs in small delta steps within dbsync - that's still pending rework upstream in cardano-ledger). I am not sure if dandelion have upgraded their support for koios-1.0.9 yet (their current equivalents of cron job unfortunately does not cover all cron job deployments, and instead of being able to loop over job folder, it requires manual addition of individual cron job. Coming back to the current issue, my question headed towards cache because with koios-1.0.9, one of the larger piece of improvements was the way some of cache entries are calculated (rather than querying entire transaction history, it leverages epoch stake information and only calculates transactions from that snapshot). If inaccurate - it could have potentially bought in much larger amount of stake additions for something like stake distribution cache. |
I think we got into this situation due to a combination of factors:
Instead of trying to figure out exactly what's broken and fix it, I've just dropped the |
Crux of pain-point is having to parse logs post epoch transition for which there currently isnt an alternate method, an issue was opened upstream - and will be tracked via #195 on Koios ends |
I'm encountering a weird error when using the
grest.pool_info()
function with a particular pool ID against mainnet. This doesn't happen with some other pool IDs that I tested, and it's only happening in 2 of our 3 Koios setups. These setups were initially provisioned using Koiosv1.0.9rc
and have not been upgraded since then.This is the
lovelace
type from the DB sync schema:I've also found this somewhat relevant upstream DB sync issue:
IntersectMBO/cardano-db-sync#351
The full SQL error context is:
The text was updated successfully, but these errors were encountered: