Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Rosetta API v1.4.10 - /account/coins invocation is missing #222

Open
DeFiDev opened this issue Mar 15, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@DeFiDev
Copy link

DeFiDev commented Mar 15, 2021

Describe the bug
When rosetta-cli loads configuration file with imported prefunded accounts and tries to fetch their balances, rosetta-cli receives only balances without any coin identifiers, which is especially important for UTXO based blockchains. So find_balance action with require_coin parameter set to true at construction API script returns account without any coin identifiers.

In this case the following execution of a script for construction API is impossible in an automated way (without specifying coin identifiers manually).

It seems that the main cause for this behavior is usage of rosetta-sdk-go v0.6.8, which already supports separate /account/coin method invocation. Please, see this link, which refers to the Rosetta API note about this applied decomposition

It doesn't seem to be a bug completely, however the usage of rosetta-cli v0.6.7 is uncomfortable

To Reproduce
Steps to reproduce the behavior:

  1. Download rosetta-bitcoin implementation
  2. Modify rosetta-bitcoin/rosetta-cli-conf/testnet/config.json by adding prefunded accounts with construction configuration section
  3. Run rosetta-bitcoin implementation by executing make run-testnet-online inside of the rosetta-bitcoin root directory
  4. Install rosetta-cli v0.6.7
  5. Run rosetta-cli check:construction with configuration file implemented at rosetta-bitcoin/rosetta-cli-conf/testnet/bitcoin.ros

Expected behavior
Invocation of rosetta-cli check:construction --configuration-file=path_to_file should transfer funds from imported prefunded account defined at configuration file to another account

Additional context
It may be a little bit clearer, if you also have a look at the line in rosetta-cli code here, where account balances fetching invokes first. Going deeper you may find, that returned account balances don't have any coin identifiers

@DeFiDev DeFiDev added the bug Something isn't working label Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant