coinbase / coinbase/mesh-cli

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

Open
#222 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
165
Forks
99
PR merge metrics
No merged PRs in 30d

Description

**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](https://www.rosetta-api.org/docs/AccountApi.html#accountcoins), 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](https://github.com/coinbase/rosetta-bitcoin/tree/v0.0.9) `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
2. Install `rosetta-cli v0.6.7`
3. 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](https://github.com/coinbase/rosetta-cli/blob/master/pkg/tester/construction.go#L213), where account balances fetching invokes first. Going deeper you may find, that returned account balances don't have any coin identifiers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.