hiero-ledger / hiero-sdk-go

Hiero SDK for Go
https://docs.hedera.com/docs/hedera-sdks
Apache License 2.0
110 stars 66 forks source link

SDK transactions fail on testnet with rpc retries #321

Closed failfmi closed 2 years ago

failfmi commented 3 years ago

Description

This has been common for the past few days:

retry 10/10: rpc error: code = Unavailable desc = unexpected HTTP status code received from server: 503 (Service Unavailable); transport: received unexpected content-type "text/html" or exceptional precheck status INVALID_NODE_ACCOUNT received for transaction

Steps to reproduce

Additional context

No response

Hedera network

testnet

Version

v2.5.0

Operating system

Linux

gregscullard commented 3 years ago

@failfmi please note that two of the testnet nodes are currently offline (https://status.hedera.com)

This will bypass them

var testnetNodes = map[string]hedera.AccountID{
    "0.testnet.hedera.com:50211": {Account: 3},
    "1.testnet.hedera.com:50211": {Account: 4},
    "2.testnet.hedera.com:50211": {Account: 5},
    //"3.testnet.hedera.com:50211": {Account: 6},
    //"4.testnet.hedera.com:50211": {Account: 7},
    "5.testnet.hedera.com:50211": {Account: 8},
    "6.testnet.hedera.com:50211": {Account: 9},
}

// Retrieving network type from environment variable HEDERA_NETWORK
client = hedera.ClientForNetwork(testnetNodes)

That said, the SDK should recover from nodes being offline.

andrix10 commented 3 years ago

We have been working on another network refactor with upcoming multiple ip support, this will definitely fixed with that.

SimiHunjan commented 2 years ago

Please reopen if you encounter this again.