Expose `min-balance` field in **Account Info**
Problem
min-balance is available in algod but not in the Java SDK.
Solution
https://github.com/algorand/go-algorand/pull/3287 has introduced min-balance to the response of algod's /v2/accounts/{{ACCOUNT}} as well as to the goal account info.
- When querying the REST API avove, expose the
min-balancefield - Pass appropriate cucumber tests
Dependencies
- Cucumber tests issue: https://github.com/algorand/algorand-sdk-testing/issues/155
Urgency
Low
Is it okay if I can take a stab at this?
I am wondering how to effectively update the sdk-testing repo and the individual repos for cucumber test changes. Is the idea is to push the changes to all repo at once?
- If we change cucumber test in algorand-sdk-testing to include the new parameter then we have to change the signature of the function in all the language specific sdks or the tests will start failing due to signature mismatch.
https://github.com/algorand/algorand-sdk-testing/blob/c306203d1f7bb2f1c4cc90c96256c9db60de6504/features/integration/indexer.feature#L147-L150
- The reverse is also true. We cannot update the language specific sdk integration test without updating the algorand-sdk-testing repo.
https://github.com/algorand/java-algorand-sdk/blob/e9871a544ad6155df8cb67f5d95ea38254f8a6a7/src/test/java/com/algorand/algosdk/integration/Indexer.java#L198-L200
That's a good point. You can add a new cucumber test together with a filter label (something like @accounts.min-balance) and then only run the test in the SDK that you have implemented. In that way, you won't break any of the other SDK's.
@tzaffi Thank you!
I am not working on this anymore.
Hey @tzaffi , quick question regarding this. When we refer to the /v2/accounts/{{ACCOUNT}} REST call above which are we referring to ?
/v2/accounts/{address} - algod /v2/accounts/{account-id} - indexer
Based on what you've said above, as well as having looked at the swaggers I believe the change needs to be made for algod, however the person who last worked on this has suggested making changes in the Indexer response
hi @jds1g14 - this issue when it was created was to provide min-balance functionality in the Java SDK, via algod. However, I expect that in a couple of weeks, indexer will be providing min-balance as well. Depending on the timing of when this issue is addressed, it may be possible to address the indexer functionality in the Java SDK as well. But technically, it's outside the scope of this issue. I Would probably create new issues when min-balance becomes available for indexer.
Perfect, I'll start work on this.
- Create/modify any existing tests and response files in algorand-sdk-testing, adding an appropriate tag
- Update model in java-algorand-sdk
I wonder why this isn't autogenerated. It appears to be in the OpenAPI spec: https://github.com/algorand/go-algorand/blob/master/daemon/algod/api/algod.oas2.json#L2466
It's because Account is shared between the OpenAPI spec in go-algorand and Indexer, but the Indexer version is used to generate the model types. The Indexer spec doesn't include min-balance because that feature was never added to Indexer.