klaytn / rosetta-klaytn

Apache License 2.0
4 stars 6 forks source link

Not able to query Rosseta Klaytn Node #168

Closed mayank-daga closed 2 months ago

mayank-daga commented 12 months ago

Describe the bug Rosetta Klaytn Node is set up using following command :

sudo docker run -d --ulimit "nofile=100000:100000" -e "PORT=8545" -p 8545:8080 -p 30303:30303 -e "MODE=ONLINE" -e "RPC_ENABLE=1" -e "NETWORK=MAINNET" -v /disname/node-klay/data:/data klaytn/rosetta-klaytn:v1.0.5

Node is syncing but not able to query the node. It is giving connnection refused always.

To Reproduce Query the node using below command:

sudo curl --location 'http://:8545' --header 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"klay_blockNumber","params":[],"id":83}'

Expected behavior it should give the latest block height for above api request

Additional context

kjhman21 commented 12 months ago

@mayank-daga Thanks for the inquiry.

@JayChoi1736 Could you check on this?

JayChoi1736 commented 12 months ago

@mayank-daga From my understanding, the request you sent appears to be in the format for a Klaytn endpoint node. And the 8545 port seems to be for rosetta-klaytn.

JayChoi1736 commented 12 months ago

For information about the APIs available on the Rosetta node, please refer to this link

https://www.rosetta-api.org/docs/Reference.html

mayank-daga commented 12 months ago

@JayChoi1736 can you help on which port is rosetta rpc query will work? I tried the below query but its giving connnection refused on port 8545

sudo curl --location --request POST ':8545/network/status' --header 'Content-Type: application/json' \ --data-raw '{ "network_identifier": { "blockchain": "Klaytn Cypress", "network": "8217" } }'

sudo docker run -d --ulimit "nofile=100000:100000" -e "PORT=8545" -p 8545:8080 -p 30303:30303 -e "MODE=ONLINE" -e "RPC_ENABLE=1" -e "NETWORK=MAINNET" -v /diskname/node-klay/data:/data klaytn/rosetta-klaytn:v1.0.5

JayChoi1736 commented 12 months ago

-p 8545:8080 -> -p 8545:8545 and send curl API request to :8545 or -p 8545:8080 -> -p 8080:8545 and send curl API request to :8080

if these solutions don't work, please check your firewall setting

yoomee1313 commented 2 months ago

I'll close this issue. If you have further issue, reopen at new repository. https://github.com/kaiachain/rosetta-kaia/issues