-
Notifications
You must be signed in to change notification settings - Fork 25
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
Pool registration/retirement active/inactive epoch fix #246
Conversation
Any updates on this? We want to release a new version of |
apologies - I realised I left comments as pending earlier |
@@ -6,7 +6,7 @@ RETURNS TABLE ( | |||
block_height word31type, | |||
epoch_no word31type, | |||
epoch_slot word31type, | |||
active_epoch_no word31type | |||
active_epoch_no bigint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the change presented seems OK, it might be worth checking see why it fails for you - it didnt seem to give trouble for any of the core instances. In fact I just re-ran with a reset again on my testnet instance. In fact , as you might see - it is currently live with word31type as output field for mentioned column.
Is there any additional detail that might help understand here why you got the mentioned error?
- dbsync version
- postgres version
- Output of
\dD+ word31type
tho I doubt that should change at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's probably the warnings/error settings specifically in our dockered koios(-tiny) stack, I just pointed it out. This seems to work without error in the original version.
- postgres 12.14-alpine
- dbsync 13.1.1.3
In DBSync schema active_epoch_no
is integer (64)
, so that's why I think it's throwing an error:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In pool_updates.sql
(as the parent of pool_registrations.sql
and pool_retirements.sql
) active_epoch_no
specified as bigint
, and I think it should be brought to the same format, especially as you see on other versions of postgres it crashes in error:
koios-artifacts/files/grest/rpc/pool/pool_updates.sql
Lines 3 to 19 in ac5d005
tx_hash text, | |
block_time integer, | |
pool_id_bech32 character varying, | |
pool_id_hex text, | |
active_epoch_no bigint, | |
vrf_key_hash text, | |
margin double precision, | |
fixed_cost text, | |
pledge text, | |
reward_addr character varying, | |
owners character varying [], | |
relays jsonb [], | |
meta_url character varying, | |
meta_hash text, | |
meta_json jsonb, | |
update_type text, | |
retiring_epoch word31type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postgres 12.14-alpine
Gotcha, maybe it is the version, happy for that part of update (aligning bigint vs word31type) to be from this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Didn't have permissions to revert a commit on this repo, hence - recreated via #249 |
## Description Recreated from #246 ![Screenshot 2023-11-10 at 14 30 42](https://github.com/cardano-community/koios-artifacts/assets/38279597/71deef70-f2d8-4633-a602-492051b626f1) pool_registrations.sql: `active_epoch_no` must be of type `bigint` pool_retirements.sql: `active_epoch_no` must be of type `bigint` --------- Co-authored-by: Ray Robot <[email protected]> Co-authored-by: ray-robot <[email protected]>
## Description Recreated from #246 ![Screenshot 2023-11-10 at 14 30 42](https://github.com/cardano-community/koios-artifacts/assets/38279597/71deef70-f2d8-4633-a602-492051b626f1) pool_registrations.sql: `active_epoch_no` must be of type `bigint` pool_retirements.sql: `active_epoch_no` must be of type `bigint` --------- Co-authored-by: Ray Robot <[email protected]> Co-authored-by: ray-robot <[email protected]>
pool_registrations.sql:
active_epoch_no
must be of typebigint
pool_retirements.sql:
active_epoch_no
must be replaced withretiring_epoch
according to
https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/schema.md#pool_retire
and
koios-artifacts/files/grest/rpc/pool/pool_updates.sql
Lines 3 to 19 in ac5d005
PS. Please check the specs update carefully, I may have done something wrong