Open jbaldwinroberts opened 1 month ago
Not sure. It can't connect to the db from the rosetta container. Try to connect via psql using the same db/user/pass/host/port that rosetta is using. Verify the mirror_rosetta user exists in the db and has the appropriate roles and permissions.
The bigger question is why are you trying to use the rosetta module? It's intended for use only by Coinbase.
Thanks for the reply, i'll try those suggestions.
I work for a crypto custody provider and we we generally use either JSON-RPC or the rosetta/mesh api to integrate new chains. I've been having issues with getting JSON-RPC to work so this was my next port of call.
I'd prefer not to effectively roll our own integration through using a combination of hedera-sdk-go and the REST API.
I'm very open to suggestions/pointers if there is a better way, we need to be able to retrieve accounts/transactions/blocks.
I managed to get it to connect to the DB:
❯ docker compose logs -f rosetta
hedera-mirror-node-rosetta-1 | time="2024-08-13T18:43:38Z" level=info msg="External configuration file not found"
hedera-mirror-node-rosetta-1 | time="2024-08-13T18:43:38Z" level=info msg="Loaded external config file: /src/hedera-mirror-rosetta/application.yml"
hedera-mirror-node-rosetta-1 | time="2024-08-13T18:43:38Z" level=info msg="Using configuration: &{Cache:map[entity:{MaxSize:524288}] Db:{Host:db Name:mirror_node Password: Pool:{MaxIdleConnections:20 MaxLifetime:30 MaxOpenConnections:100} Port:5432 StatementTimeout:20 Username:mirror_rosetta} Feature:{SubNetworkIdentifier:false} Http:{IdleTimeout:10s ReadTimeout:5s ReadHeaderTimeout:3s WriteTimeout:10s} Log:{Level:info} Network:testnet NodeRefreshInterval:24h0m0s NodeVersion:0 Nodes:map[] Online:true Port:5700 Realm:0 Response:{MaxTransactionsInBlock:6000} Shard:0 ShutdownTimeout:10s}"
hedera-mirror-node-rosetta-1 | time="2024-08-13T18:43:38Z" level=info msg="hedera-mirror-rosetta version 0.112.0-SNAPSHOT, rosetta api version 1.4.12"
hedera-mirror-node-rosetta-1 | time="2024-08-13T18:43:39Z" level=info msg="Successfully connected to database"
hedera-mirror-node-rosetta-1 | time="2024-08-13T18:43:39Z" level=info msg="Serving Rosetta API in ONLINE mode"
hedera-mirror-node-rosetta-1 | time="2024-08-13T18:43:39Z" level=info msg="Listening on port 5700"
by setting HEDERA_MIRROR_ROSETTA_API_CONFIG: /src/hedera-mirror-rosetta/application.yml
in the docker-compose
file.
However, making a request results in `time="2024-08-13T18:44:58Z" level=info msg="172.26.0.1 POST /network/list (500) in 254.291µs"
which network was your mirrornode set for? from when it's configured to ingest data? The issue might be, for rosetta to work, in general, the mirrornode needs to ingest blocks from genesis.
Description
I cloned the repo, updated the application.yml file and then ran
docker compose up
.My application.yml file contains:
I think the importer is up to date as the logs show
2024-08-13T18:18:05.388Z INFO scheduling-6 c.h.m.i.d.r.RecordFileDownloader No new signature files to download after file: 2024-08-13T18_18_00.716505053Z.rcd.gz. Retrying in 0.5 s
but running
./hedera-mirror-node/hedera-mirror-rosetta/scripts/wait-for-mirror-node.sh
results in a time out.The rosetta logs show:
what am i doing wrong?
Steps to reproduce
Clone the repo, update the application.yml file and then run
docker compose up
.Additional context
No response
Hedera network
testnet
Version
main
Operating system
macOS