Rosetta Troubleshooting
Invalid Operation Type Issue
Issue
Operation type is invalid
Error message:
operation type <operation type> is invalid
Solution
If you want to support the invalid operation type to make it valid, please make sure when you call NewServer function in the Rosetta implementation, the invalid operation type is added to supportedOperationTypes
and passed to NewServer function properly
Asserter Initialization Issue
Issue
Asserter is not able to initialize due to networks are not available
Error message:
unable to initialize asserter for fetcher: no networks available
Solution
Please double check the following two things then give a try:
- The
online_url
field is correctly specified inconfig.json
, which points to the node, docs ofconfig.json
is here /network/list
response includes available network(s), docs of/network/list
is here
Reconciliation Issue
Issue
Active or inactive reconciliation issue due to computed balance is not equal to live balance
Error message:
active reconciliation error for account address <account address> at block index <block index> (computed: <computed balance><currency symbol>, live: <live balance><currency symbol>): reconciliation failure
Or
inactive reconciliation error for account address <account address> at block index <block index> (computed: <computed balance><currency symbol>, live: <live balance><currency symbol>): reconciliation failure
Solution
You need to calculate the difference between the computed balance and live balance then check the balance changing operations using /block
(request block index < block index with reconciliation issue) to see which balance changing operation causes the balance mismatch.
Usually it happens on balance changing operation (e.g. deposit or withdraw operation) is missing for the specific transaction, you have to make sure the rosetta implementation can convert the specific transaction into balance changing operations properly
You also need to confirm the following things for each test run:
- Bootstrap balances are correct
- Snapshot is correct
- Concurrency is not too high in
active_reconciliation_concurrency
andinactive_reconciliation_concurrency
(optional)
If staking account hits reconciliation issue due to balance change of staking account can not be reflected and reconciled from the fund transfer operation, adding staking account to exemption list (i.e. exempt_accounts
) is an option
If L2 bridging account (i.e. the account that mint operation applies on) hits reconciliation issue due to balance change of L2 bridging account can not be reflected and reconciled from the fund transfer operation, adding L2 bridging account to exemption list (i.e. exempt_accounts
) or ignore the operation of L2 bridging account balance change are options
Account Balance Issue
Issue
Account balance issue due to historical balance lookup is not supported from genesis block
Solution
You can set historical_balance_disabled
to false
and set start_index
to the block index that is supported historical balance lookup
Rosetta Node Sync Issue
Issue
Rosetta node is not able to sync
Solution
You can call /network/status
to see if peers
from the response are missing. Also please make sure the image version and node version are correct
Block Fetch Issue
Issue
Block is not able to fetch
Error message:
unable to sync to <block index>: unable to fetch block <block index> from network <network> with retry: fetch message block {"index":<block index>}: retries exhausted
Solution
You can try to debug with the following steps:
- Call
/network/status
to verify if the rosetta server is reachable - Call
/block
with the block index to check if it works properly - If step 1 and step 2 are working fine, you can try to lower the concurrency of
max_online_connections
andmax_sync_concurrency
. However, we still suggest the rosetta node can handle high concurrency as the number of block request is large in production - You can verify the rosetta node host resource (i.e. cpu, memory, disk) consumption to ensure resource is enough to support the requests
- You can test the latency of
/block
as high latency still can cause block fetch issue
Address Derive Issue
Issue
Address is not able to derive from public key
Solution
Please check if the signing curve type matches
Account Fund Insufficient Issue on UTXO Based Blockchain
Issue
Account fund is insufficient for UTXO based blockchain when running check:construction
Error message:
1 account(s) insufficiently funded. Please fund the address [<address>]
Solution
Please set coin_supported
to true
Negative Balance Issue
Issue
Negative balance happens on specific account
Error message:
account balance <account balance> of currency {Symbol:<currency symbol> Decimals:<currency decimals> Metadata:map[]} for account {Address: <account address> SubAccount:<nil> Metadata:map[]} at block {Index:<block index> Hash:<block hash>}: negative balance
Solution
Please check the following things for troubleshooting:
- If you use snapshot, please check if the snapshot version is correct
- If you hit the issue on
check:construction
, please check if theprefunded_accounts
is set up properly - Check if the blockchain supports historical balance lookup for the full chain, if not , this issue could happen
- Incorrect or missing balance changing operation can cause this issue, you need to check the transaction history of the negative balance account to see if there are some issues related balance changing operation
Duplicate Transaction Hash Issue
Issue
Multiple transactions use the same transaction hash
Solution
Please check if the related transactions use the same transaction hash, for example withdraw stake operation (the operation to trigger stake withdrawal but doesn’t affect account balance) and return stake operation (the operation to return stake and affect account balance) may use the same transaction hash
Transaction Operation(s) Match Issue
Issue
Confirmed transaction operation(s) don’t match intent operation(s) when running check:construction
Error message:
confirmed transaction did not match intent
Solution
Please check your ros file to investigate which operation doesn’t match, if the operation is dynamic and it cannot be confirmed in intent (i.e. gas operation), you can remove it from ros file as intent operation(s) is subset of confirmed transaction operation(s) for match mechanism
Duplicate Coin Key Issue
Issue
Coin key for specific coin is duplicated
Error message:
unable to store coin: key <coin key> is invalid: duplicate key
Solution
The coin key in coin storage (i.e. badger db) has a collision. Need to check why the coin with the coin key has been stored before, refresh the coin storage then retest could be an option