MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.97k stars 523 forks source link

Berkeley RC1 - mina-missing-blocks-auditor -> Error getting missing blocks gap #15066

Open olton opened 5 months ago

olton commented 5 months ago

Preliminary Checks

Description

When I run mina-missing-blocks-auditor I get an error Error getting missing blocks gap

olton@berkeley:~$ mina-missing-blocks-auditor --archive-uri postgres://mina:password@127.0.0.1:5432/mina_archive
{"timestamp":"2024-02-06 21:01:00.392025Z","level":"Info","source":{"module":"Dune__exe__Missing_blocks_auditor","location":"File \"src/app/missing_blocks_auditor/missing_blocks_auditor.ml\", line 32, characters 6-17"},"message":"Successfully created Caqti pool for Postgresql","metadata":{}}
{"timestamp":"2024-02-06 21:01:00.392127Z","level":"Info","source":{"module":"Dune__exe__Missing_blocks_auditor","location":"File \"src/app/missing_blocks_auditor/missing_blocks_auditor.ml\", line 33, characters 6-17"},"message":"Querying missing blocks","metadata":{}}
{"timestamp":"2024-02-06 21:01:00.402058Z","level":"Error","source":{"module":"Dune__exe__Missing_blocks_auditor","location":"File \"src/app/missing_blocks_auditor/missing_blocks_auditor.ml\", line 72, characters 18-30"},"message":"Error getting missing blocks gap","metadata":{"error":"Cannot decode int from <postgres://mina:_@127.0.0.1:5432/mina_archive2>: Invalid value \"\"."}}

Steps to Reproduce

Run mina-missing-blocks-auditor

Expected Result

Missing blocks

Actual Result

Error

Daemon version

Commit 1551e2faaa246c01636908aabe5f7981715a10f4 on branch berkeley

How frequently do you see this issue?

Rarely

What is the impact of this issue on your ability to run a node?

Low

Status

Mina daemon status
-----------------------------------

Global number of accounts:                     7681
Block height:                                  1127
Max observed block height:                     1127
Max observed unvalidated block height:         1127
Local uptime:                                  2d20h17m11s
Ledger Merkle root:                            jxQYEWMJvYQ6ZJQRFPSHq8x5VM4mNMk3stBRUfNAFMcnYinMLou
Protocol state hash:                           3NK3K4tVrKRFhr3Du9F73q9jRP9PaR2ZsEmdroDsNyuLt81r1f3C
Chain id:                                      fd7d111973bf5a9e3e87384f560fdead2f272589ca00b6d9e357fca9839631da
Git SHA-1:                                     1551e2faaa246c01636908aabe5f7981715a10f4
Configuration directory:                       /home/olton/.mina-config
Peers:                                         32
User_commands sent:                            0
SNARK worker:                                  None
SNARK work fee:                                100000000
Sync status:                                   Synced
Catchup status:
        To build breadcrumb:           0
        To initial validate:           0
        Finished:                      411
        To download:                   0
        Waiting for parent to finish:  0
        To verify:                     0

Block producers running:                       0
Coinbase receiver:                             Block producer
Best tip consensus time:                       epoch=0, slot=2061
Best tip global slot (across all hard-forks):  2061
Consensus time now:                            epoch=0, slot=2061
Consensus mechanism:                           proof_of_stake
Consensus configuration:
        Delta:                     0
        k:                         290
        Slots per epoch:           7140
        Slot duration:             3m
        Epoch duration:            14d21h
        Chain start timestamp:     2024-02-02 14:01:01.000000Z
        Acceptable network delay:  3m

Addresses and ports:
        External IP:    
        Bind IP:        0.0.0.0
        Libp2p PeerID:  12D3KooWDLNXPq28An4s2QaPZX5ftem1AfaCWuxHHJq97opeWxLy
        Libp2p port:    8302
        Client port:    8301

Metrics:
        block_production_delay:             7 (0 0 0 0 0 0 0)
        transaction_pool_diff_received:     28
        transaction_pool_diff_broadcasted:  0
        transactions_added_to_pool:         8892
        transaction_pool_size:              1
        snark_pool_diff_received:           146
        snark_pool_diff_broadcasted:        0
        pending_snark_work:                 0
        snark_pool_size:                    5788

Additional information

No response

emberian commented 4 months ago

The missing blocks auditor needs to be updated for the changes to the archive schema.

This tool deserves some automated test!