Skip to content

account/balance endpoint returns incorrect historical rewards for stake1 addresses #590

@puruoni

Description

@puruoni

Context & versions

Version: 1.3.2
Network: mainnet
Environment: Docker with docker-compose
Configuration: default

Steps to reproduce

  1. Execute the account/balance endpoint for a stake1 address with a past block number.

Actual behavior

cardano-rosetta-java

curl -s http://localhost:8080/account/balance -H 'Content-Type: application/json' --data-binary '{"network_identifier":{"blockchain": "cardano","network": "mainnet"},"block_identifier":{"index":"12335081"},"account_identifier": {"address":"stake1uxk8c5xl52mfcn8nppuktdvzaw6lsjwdnerfw7rszk6z3nqm5nagh","metadata": {}}}' | jq
{
"block_identifier": {
"index": 12335081,
"hash": "03c02b815911af94c6e96debbc55d5eb4aac636d57fd95e8716e06c5abd5980b"
},
"balances": [
{
"value": "0",
"currency": {
"symbol": "ADA",
"decimals": 6
}
}
]
}

cardano-rosetta

curl -s http://localhost:8080/account/balance -H 'Content-Type: application/json' --data-binary '{"network_identifier":{"blockchain": "cardano","network": "mainnet"},"block_identifier":{"index":"12335081"},"account_identifier": {"address":"stake1uxk8c5xl52mfcn8nppuktdvzaw6lsjwdnerfw7rszk6z3nqm5nagh","metadata": {}}}' | jq
{
"block_identifier": {
"index": 12335081,
"hash": "03c02b815911af94c6e96debbc55d5eb4aac636d57fd95e8716e06c5abd5980b"
},
"balances": [
{
"value": "927048",
"currency": {
"symbol": "ADA",
"decimals": 6
}
}
]
}

Expected behavior

The account/balance endpoint should return the historical unwithdrawn rewards as they were at the specified block.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions