Skip to content

Uprading from version 0.6.17 to 0.7.0 requires a rescan? #79

Description

@got3nks

I recently upgraded chaind from version 0.6.17 to 0.7.0.

{"level":"info","service":"chaindb","impl":"postgresql","target_version":9,"time":"2023-02-10T00:02:21+01:00","message":"Upgrading database"}
{"level":"info","service":"chaindb","impl":"postgresql","current":1,"total":1,"time":"2023-02-10T00:02:21+01:00","message":"Running upgrade function"}
{"level":"info","service":"chaindb","impl":"postgresql","target_version":10,"time":"2023-02-10T00:02:21+01:00","message":"Upgrading database"}
{"level":"info","service":"chaindb","impl":"postgresql","current":1,"total":2,"time":"2023-02-10T00:02:21+01:00","message":"Running upgrade function"}
{"level":"info","service":"chaindb","impl":"postgresql","current":2,"total":2,"time":"2023-02-10T00:02:21+01:00","message":"Running upgrade function"}
{"level":"info","service":"chaindb","impl":"postgresql","target_version":11,"time":"2023-02-10T00:02:21+01:00","message":"Upgrading database"}
{"level":"info","service":"chaindb","impl":"postgresql","current":1,"total":1,"time":"2023-02-10T00:02:21+01:00","message":"Running upgrade function"}
{"level":"info","service":"chaindb","impl":"postgresql","time":"2023-02-10T00:02:21+01:00","message":"Upgrade complete"}

I checked the db updates 9,10,11 in the source file postgresql/upgrader.go and I see requiresRefetch is not set to true. Nevertheless beaconcommittees is taking very long to catch up. Is it a bug or a rescan is actually needed?

In the PostgreSQL pg_stat_activity I see these queries being executed:

      INSERT INTO t_attestations(f_inclusion_slot
                                ,f_inclusion_block_root
                                ,f_inclusion_index
                                ,f_slot
                                ,f_committee_index
                                ,f_aggregation_bits
                                ,f_aggregation_indices
                                ,f_beacon_block_root
                                ,f_source_epoch
                                ,f_source_root
                                ,f_target_epoch
                                ,f_target_root
                                ,f_canonical
                                ,f_target_correct
                                ,f_head_correct
						  )
      VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15)
      ON CONFLICT (f_inclusion_slot,f_inclusion_block_root,f_inclusion_index) DO
      UPDATE ....

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions