safe-global / safe-infrastructure

One `docker-compose.yml` file to rule them all
MIT License
56 stars 92 forks source link

Execution of the `safe-infrastructure-txs-worker-indexer` task resulted in a failure #140

Closed hapetherw closed 3 months ago

hapetherw commented 3 months ago

Hello, i am trying to operate the safe-infrastructure repo on my end. Unfortunately, it fails on safe-infrastructure-txs-worker-indexer step. Here's the log about tx-worker-indexer.

2024-05-29 01:05:14 ==> 17:05:14 ==> Migrating Django models... 
2024-05-29 01:05:18 Operations to perform:
2024-05-29 01:05:18   Apply all migrations: account_abstraction, admin, auth, authtoken, contenttypes, contracts, django_celery_beat, history, notifications, safe_messages, sessions, sites, tokens
2024-05-29 01:05:18 Running migrations:
2024-05-29 01:05:18   No migrations to apply.
2024-05-29 01:05:18 ==> 17:05:18 ==> Setting up service... 
2024-05-29 01:05:21 Removing old tasks
2024-05-29 01:05:21 Old tasks were removed
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.check_reorgs_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.check_sync_status_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.index_internal_txs_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.index_safe_events_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.index_new_proxies_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.index_erc20_events_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.reindex_mastercopies_last_hours_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.reindex_erc20_erc721_last_hours_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.process_decoded_internal_txs_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.history.tasks.remove_not_trusted_multisig_txs_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.contracts.tasks.create_missing_contracts_with_metadata_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.contracts.tasks.create_missing_multisend_contracts_with_metadata_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.contracts.tasks.reindex_contracts_without_metadata_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.tokens.tasks.fix_pool_tokens_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.tokens.tasks.update_token_info_from_token_list_task
2024-05-29 01:05:21 Created Periodic Task safe_transaction_service.analytics.tasks.get_transactions_per_safe_app_task
2024-05-29 01:05:21 Setting up Safe Contract Addresses
2024-05-29 01:05:23 Cannot detect a valid ethereum-network
2024-05-29 01:05:24 ==> 17:05:24 ==> Setting contracts... 
2024-05-29 01:05:29 ==> 17:05:29 ==> Check RPC connected matches previously used RPC... 
2024-05-29 01:05:32 CommandError: EthereumRPC chainId 555666 does not match previously used chainId 17172

For your information, our chain is Eclipse Testnet. We have already deprecated old chain(17172) and we are operating the new chain(555666). Old and current chain info were added to 'safe-deployments,safe-core-sdk, andsafe-wallet-webrepos. These chain info were added on theprotocol-kitpackage insafe-core-sdk` with different chainId and shortName.

{ chainId: 17172n, shortName: 'eclipse' },
{ chainId: 555666n, shortName: 'eclipset' },

https://github.com/safe-global/safe-core-sdk/blob/main/packages/protocol-kit/src/utils/eip-3770/config.ts

I would like to know if we need to remove old chain info from protocol-kit to resolve this issue. Please let me know your thoughts on how to resolve it. Thank you.

dasanra commented 3 months ago

Are you trying to use a database that was previously populated with the RPC using 17172? I think the error here is that you need to delete the database and index the chain again from scratch. The service complains that the new chainId provided by the RPC does not match previously used chainId 17172, which I guess is the one was using before to index the Safe.

hapetherw commented 3 months ago

Thank you, now it's resolved.

hapetherw commented 3 months ago

@dasanra Could you please have a look into the following issue? It's important as operating the safe-infrastructure is high priority for us... https://github.com/safe-global/safe-infrastructure/issues/141