-
Notifications
You must be signed in to change notification settings - Fork 217
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
Get reward account balance #1750
Comments
1752: Shelley get reward account balance r=paweljakubas a=rvl ### Issue Number ADP-302 / #1750 ### Overview Adds implementation of network layer `getAccountBalance` for shelley. ### Comments The integration test is not passing because stake pools are not connected with the test cluster network. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: Pawel Jakubas <[email protected]>
1757: Shelley network: remove queryRewardQ from wallet client r=rvl a=rvl ### Issue Number ADP-302 / #1750 ### Overview Review comment: #1752 (comment) Co-authored-by: Rodney Lorrimar <[email protected]>
1755: Bump cardano-node r=Anviking a=Anviking - Appears to break compatibility with the most recent FF genesis - Should include what we need to get non myopic member rewards 1765: Add script to show cardano-node and cardano-cli versions r=rvl a=rvl Run this script if you would like to know which version of `cardano-node` will be in the `nix-shell` (i.e. CI). This PR IntersectMBO/cardano-node#1283 fixes the CLI version strings. 1767: Better tracing of shelley network local state query r=rvl a=rvl ### Issue Number ADP-302 / #1750 ### Overview More detail in the logs. Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
1755: Bump cardano-node r=rvl a=Anviking - Appears to break compatibility with the most recent FF genesis - Should include what we need to get non myopic member rewards 1765: Add script to show cardano-node and cardano-cli versions r=rvl a=rvl Run this script if you would like to know which version of `cardano-node` will be in the `nix-shell` (i.e. CI). This PR IntersectMBO/cardano-node#1283 fixes the CLI version strings. 1767: Better tracing of shelley network local state query r=rvl a=rvl ### Issue Number ADP-302 / #1750 ### Overview More detail in the logs. Co-authored-by: Johannes Lund <[email protected]> Co-authored-by: Rodney Lorrimar <[email protected]>
1765: Add script to show cardano-node and cardano-cli versions r=rvl a=rvl Run this script if you would like to know which version of `cardano-node` will be in the `nix-shell` (i.e. CI). This PR IntersectMBO/cardano-node#1283 fixes the CLI version strings. 1767: Better tracing of shelley network local state query r=rvl a=rvl ### Issue Number ADP-302 / #1750 ### Overview More detail in the logs. Co-authored-by: Rodney Lorrimar <[email protected]>
1772: More integration test cluster logging improvements r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 ### Overview - Output Debug-severity log files for each cardano-node process to the temporary directory, while only showing Error-severity logs on stdout. - Show different hostnames in cardano-node logs so that it's possible to see which node produced the log message. - Add a new helper function for starting the cardano-node process. - Use a single temp directory for all nodes in the cluster - makes inspecting configs and logs easier. - The environment variable `NO_CLEANUP` causes the integration tests to not delete the temp directory after they have finished. - The environment variable `CARDANO_NODE_TRACING_MIN_SEVERITY` sets the log level the the cluster nodes for stdout. - The environment variable `CARDANO_WALLET_TRACING_MIN_SEVERITY` sets the log level for the wallet server. - Also bumps cardano-node and libraries to latest master (to get latest logging features). Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: IOHK <[email protected]>
1790: Fix logging in shelley integration test cluster r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 ### Overview 1. Block forging and adoption was not being logged by the integration tests cluster. Fixed it. The default minimum severity for stdout remains as Error. The default minimum severity for the log file is Debug. 2. This adds a passive node which the wallet connects to, rather than using the bft node. My hope is that this will cause transactions to be broadcast to _all_ stake pools, meaning that transactions won't be lost with rollbacks. But in any case, this updated topology makes for a more "realistic" integration test. Co-authored-by: Rodney Lorrimar <[email protected]>
1768: Store delegation reward account balances in the database r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer ### Comments - [ ] STAKE_POOLS_JOIN_04 test passes Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
1768: Store delegation reward account balances in the database r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer ### Comments - [ ] STAKE_POOLS_JOIN_04 test passes Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
1768: Store delegation reward account balances in the database r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer ### Comments - [ ] STAKE_POOLS_JOIN_04 test passes Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: IOHK <[email protected]>
1768: Store delegation reward account balances in the database r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer ### Comments - [ ] STAKE_POOLS_JOIN_04 test passes Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: IOHK <[email protected]>
1768: Store delegation reward account balances in the database r=rvl a=rvl ### Issue Number ADP-302 / #1750 / #1759 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Johannes Lund <[email protected]>
1768: Store delegation reward account balances in the database r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 / #1759 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Johannes Lund <[email protected]>
1768: Store delegation reward account balances in the database r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 / #1759 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Johannes Lund <[email protected]>
1768: Store delegation reward account balances in the database r=KtorZ a=rvl ### Issue Number ADP-302 / #1750 / #1759 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Johannes Lund <[email protected]>
1768: Store delegation reward account balances in the database r=rvl a=rvl ### Issue Number ADP-302 / #1750 / #1759 ### Overview Turns out querying reward account balances can be slow. This is not good if it's done when listing/getting wallets. Better to do these queries in a separate thread and cache the results in the database. - [x] Add new database table for the latest known wallet reward account balance. - [x] Use the database when getting the reward account balance. - [x] Add a network layer method to watch the node tip. - [x] Update the account balance in each wallet when the node tip changes (asynchronously). - [x] Store reward account balance in db as it arrives. - [x] Adapt Jörmungandr network layer Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Johannes Lund <[email protected]>
lgtm. However cannot really see if rewards stop due to "Can't quit pools when reward account is non-empty #1824". Also for that matter I suppose the part of the test |
@piotr-iohk Thanks, yes the STAKE_POOLS_JOIN_04 scenario is testing multiple things. The "rewards accumulate" part applies to this user story ADP-302. The "rewards stop" part is blocked by #1824 - I added a note there. |
Context
Jira ticket: ADP-302
User Story
Overview
The delegation rewards balance is shown as part of the shelley wallet balance in the API.
This task is to implement the function in the shelley network layer which queries the cardano-node backend for the reward account balance.
There is some overlap with ADP-301 Check current delegation preference because the same cardano-node query method is used.
Decision
The wallet rewards address is already known. It is passed as the parameter to this network layer method.
The shelley implementation of this method should use the node local state query protocol to get the stake address info.
A model for this could be the
cardano-cli shelley query stake-address-info
command. Its implementation is inCardano.Api.LocalStateQuery.queryDelegationsAndRewardsFromLocalState
(cardano-node
repo /cardano-api
package).The
ChimericAccount
address must be converted to a shelley stake credential.In the shelley network layer, create a queue of
LocalStateQueryCmd ShelleyBlock GetFilteredDelegationsAndRewardAccounts
In
mkWalletClient
, add a local state query protocol which handles the reward account query commands. The block queried is tip of the wallet's chain sync protocol.Acceptance Criteria
getAccountBalance
method must return the rewards balance of the wallet (if it is synced).Development
QA
There is an integration test
STAKE_POOLS_JOIN_04 - Rewards accumulate and stop
to cover:However the test case is pending until we have stake pool nodes working in the integration test cluster.The text was updated successfully, but these errors were encountered: