gobitfly / eth2-beaconchain-explorer

Open source golang based explorer for the eth2 beacon chain
GNU General Public License v3.0
798 stars 416 forks source link

error retrieving last blocks from backend node #1423

Closed ManuelMaM closed 2 years ago

ManuelMaM commented 2 years ago

I'm running a prysm node with the following args: beacon-chain --http-web3provider=http://localhost:8545 --mainnet --enable-debug-rpc-endpoints --grpc-max-msg-size=65568081 --slots-per-archive-point=1 It is full synced. When i run the explorer binary with my config file, it gives me the following:

`beaconexp@lab:~/eth2-beaconchain-explorer$ ./bin/explorer --config /home/manuel/config.yml
INFO[0000] did init config                               configName=mainnet depositChainID=1 depositContractAddress=0x00000000219ab540356cBB839Cbe05303d7705Fa depositNetworkID=1 genesisTimestamp=1606824023
INFO[0000] starting                                      chainName=mainnet config=/home/manuel/config.yml version=0.0.0-65824f4e
INFO[0000] database connection established
INFO[0000] gRPC connection to backend node established   module=rpc
INFO[0000] updating validator performance data           module=exporter
INFO[0000] fetching historic prices for day 2022-01-08 02:00:00 +0200 IST  module=services
INFO[0000] checking for new blocks/epochs to export      module=exporter
INFO[0000] retrieving block at slot 4291936              module=rpc
INFO[0000] initialized pools page updater                module=services
ERRO[0000] error exporting sync_committees               duration=5.489496ms error="error exporting snyc-committee at period 290: not implemented"
INFO[0000] initialized last proposed slot updater        module=services
ERRO[0000] error retrieving last blocks from backend node: rpc error: code = Unimplemented desc = unknown method ListBlocksAltair for service ethereum.eth.v1alpha1.BeaconChain  module=exporter
INFO[0000] initialized slot updater                      module=services
INFO[0000] initialized epoch updater                     module=services
INFO[0000] updated networkliveness for epoch 134126      module=exporter
INFO[0000] initialized index page updater                module=services
INFO[0000] frontend services initiated
INFO[0000] frontend database connection established
INFO[0000] skipping chartsPageDataUpdater because the explorer is syncing  module=services
INFO[0000] Updating ETH Clients Information              module=ethClients
INFO[0000] http server listening on localhost:3333
INFO[0000] stats update completed                        duration=2.460299ms epoch=0 module=services
INFO[0000] exported eth1-deposits                        blockHeight=15050010 depositsSaved=0 duration=12.025187ms fromBlock=2523557 module=exporter toBlock=2524557
ERRO[0000] error updating validator performance data: error retrieving latest epoch: sql: Scan error on column index 0, name "max": converting NULL to int64 is unsupported  module=exporter
INFO[0000] fetching historic prices for day 2022-01-09 02:00:00 +0200 IST  module=services
INFO[0000] retrieving block at slot 4292033              module=rpc
ERRO[0000] error receiving blocks via chain head stream: rpc error: code = Unimplemented desc = unknown method ListBlocksAltair for service ethereum.eth.v1alpha1.BeaconChain  module=rpc
INFO[0000] fetching historic prices for day 2022-01-10 02:00:00 +0200 IST  module=services
INFO[0000] fetching historic prices for day 2022-01-11 02:00:00 +0200 IST  module=services
INFO[0001] fetching historic prices for day 2022-01-12 02:00:00 +0200 IST  module=services
INFO[0001] fetching historic prices for day 2022-01-13 02:00:00 +0200 IST  module=services
INFO[0001] fetching historic prices for day 2022-01-14 02:00:00 +0200 IST  module=services
INFO[0001] fetching historic prices for day 2022-01-15 02:00:00 +0200 IST  module=services
INFO[0002] fetching historic prices for day 2022-01-16 02:00:00 +0200 IST  module=services
INFO[0002] fetching historic prices for day 2022-01-17 02:00:00 +0200 IST  module=services
INFO[0002] fetching historic prices for day 2022-01-18 02:00:00 +0200 IST  module=services
INFO[0003] fetching historic prices for day 2022-01-19 02:00:00 +0200 IST  module=services
INFO[0003] fetching historic prices for day 2022-01-20 02:00:00 +0200 IST  module=services
ERRO[0003] error retrieving historic eth prices for day 2022-01-20 02:00:00 +0200 IST: invalid character 'e' looking for beginning of value
module=services
INFO[0003] fetching historic prices for day 2022-01-21 02:00:00 +0200 IST  module=services
ERRO[0003] error retrieving historic eth prices for day 2022-01-21 02:00:00 +0200 IST: invalid character 'e' looking for beginning of value
module=services
INFO[0003] fetching historic prices for day 2022-01-22 02:00:00 +0200 IST  module=services
ERRO[0003] error retrieving historic eth prices for day 2022-01-22 02:00:00 +0200 IST: invalid character 'e' looking for beginning of value
module=services
INFO[0003] fetching historic prices for day 2022-01-23 02:00:00 +0200 IST  module=services
ERRO[0003] error retrieving historic eth prices for day 2022-01-23 02:00:00 +0200 IST: invalid character 'e' looking for beginning of value
module=services
INFO[0003] fetching historic prices for day 2022-01-24 02:00:00 +0200 IST  module=services
ERRO[0003] error retrieving historic eth prices for day 2022-01-24 02:00:00 +0200 IST: invalid character 'e' looking for beginning of value
module=services
INFO[0003] fetching historic prices for day 2022-01-25 02:00:00 +0200 IST  module=services
ERRO[0003] error retrieving historic eth prices for day 2022-01-25 02:00:00 +0200 IST: invalid character 'e' looking for beginning of value
module=services
 invalid character 'e' looking for beginning of value
module=services
`

After that errors keep comming: invalid character 'e' looking for beginning of value error exporting snyc-committee at period 290: not implemented unknown method ListBlocksAltair for service ethereum.eth.v1alpha1.BeaconChain

I've only found this old issue https://github.com/gobitfly/eth2-beaconchain-explorer/issues/1165 talking about the ListBlockAltair error.

ManuelMaM commented 2 years ago

my config file:


# Database credentials
readerDatabase:
  user: "beaconexp"
  name: "explorer"
  host: "localhost"
  port: "5432"
  password: "something"
writerDatabase:
  user: "beaconexp"
  name: "explorer"
  host: "localhost"
  port: "5432"
  password: "something"

# Chain network configuration (example will work for the prysm testnet)
chain:
  configPath: ./config/mainnet.chain.yml
  genesisTimestamp: 1639659600
# Note: It is possible to run either the frontend or the indexer or both at the same time
# Frontend config
frontend:
  enabled: true # Enable or disable to web frontend
  imprint: "templates/imprint.example.html}**"  # Path to the imprint page content
  siteName: "Ethereum 2.0 Beacon Chain (Phase 0) Block Chain Explorer" # Name of the site, displayed in the title tag
  siteSubtitle: "Showing the <a href='https://prylabs.net'>💎 Prysm Eth2 Testnet</a>" # Subtitle shown on the main page
  csrfAuthKey: '0123456789abcdef000000000000000000000000000000000000000000000000'
  jwtSigningSecret: "0123456789abcdef000000000000000000000000000000000000000000000000"
  jwtIssuer: "beaconcha.in"
  jwtValidityInMinutes: 30
  server:
    host: "0.0.0.0" # Address to listen on
    port: "3333" # Port to listen on
  readerDatabase:
    user: "beaconexp"
    name: "explorer"
    host: "localhost"
    port: "5432"
    password: "something"
  writerDatabase:
    user: "beaconexp"
    name: "explorer"
    host: "localhost"
    port: "5432"
    password: "something"
  # sessionSecret: "<sessionSecret>"
  # flashSecret: "" # Encryption secret for flash cookies

# Indexer config
indexer:
  enabled: true # Enable or disable the indexing service
  fullIndexOnStartup: false # Perform a one time full db index on startup
  indexMissingEpochsOnStartup: true # Check for missing epochs and export them after startup
  node:
    host: "localhost" # Address of the backend node
    port: "4000" # port of the backend node
    type: "prysm" # can be either prysm or lighthouse
    pageSize: 250 # the amount of entries to fetch per paged rpc call
  eth1Endpoint: 'http://127.0.0.1:8545/'```
recy21 commented 2 years ago

@ManuelMaM Looks like the problem is located here https://github.com/gobitfly/eth2-beaconchain-explorer/blob/3ecb5fabaf5b9ffc0fd7d1b197bfd67f14711b87/services/historic_prices.go#L75

For what ever reason:

The error message itself just saying that it's not possible to unmarshal a string that is not JSON Looks like an error is returned from coingecko for this date, for the program.

But to sum up: The explorer currently not supporting Prysm, so even if we will find & fix the cause of the problem, there will be another error. I suggest to use Lighthouse, which is supported.

ManuelMaM commented 2 years ago

Thx for the explanation, you should prob change the readme since it says to use prysm