-
Notifications
You must be signed in to change notification settings - Fork 213
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
List stake distribution and stake pool statistics #713
Comments
GET /stake
I'm not sure why
|
From @rvl
|
Not quite sure what this refers to 🤔, but I simply copied the yaml-example from the jörmungandr docs. I wasn't advocating that we should serve yaml (in #715 that would be). |
GET /stake
About what is included in the total stake: The U/S clearly specifies Running jörmungandr with the following stake distribution: $ curl http://127.0.0.1:8080/api/v0/stake
{"epoch":252054,"stake":{"dangling":0,"pools":[["7d749ef424507fb80fed0d2289d535a94f6870add0cf8b374cfe6cae078320ec",1]],"unassigned":100100000000000}}⏎ it produces blocks every slot. Also, if the single pool has |
👍 sounds intuitive. |
763: add jormungandr get stake distribution r=KtorZ a=paweljakubas # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added GET handle of jormungandr `/stake` - [x] I have added tests # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> 764: Update Buildable instances for BlockHeader and Hash r=KtorZ a=Anviking # Issue Number #711 # Overview - [x] I added an idea for new `BlockHeader` buildable instance where the prevBlockHash comes first, and the blockHeader points towards it. - [x] I made `Hash tag` `build` to `424c4f43` instead of `424c4f43...c0dd1877`. - [x] I implemented `To/FromText` and `Buildable` instances on `Hash tag` in general, instead of having one instance per tag. # Comments <!-- Additional comments or screenshots to attach if any --> ```haskell fmtLn $ build h -- Old: Block (5.36#1036) -> 424c4f43...434b3033 -- New: 424c4f43 ⬸ [5.36#1036] fmtLn $ build (prevBlockHash h) -- Old: 424c4f43...434b3033 -- New: 424c4f43 ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> 770: Foundations for stake-pools integration tests r=KtorZ a=piotr-iohk # Issue Number #715 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [ ] I have added simple _foundations_ for future integration tests for stake-pools list # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Pawel Jakubas <pawel.jakubas@iohk.io> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com> Co-authored-by: Piotr Stachyra <piotr.stachyra@iohk.io>
763: add jormungandr get stake distribution r=KtorZ a=paweljakubas # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added GET handle of jormungandr `/stake` - [x] I have added tests # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Pawel Jakubas <pawel.jakubas@iohk.io>
842: Add `NetworkLayer.stakeDistribution` and change types of response r=Anviking a=Anviking # Issue Number #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I simplified the types of JormungandrClient.getStakeDistribution and added NetworkLayer.stakeDistribution since our code currently works well with a large NetworkLayer. This way `StakePool.Metrics` can get the stake distribution without having a JörmungandrClient. - [ ] *Bonus*: <s>Add Buildable instance for Percentage</s> # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
842: Add `NetworkLayer.stakeDistribution` and change types of response r=Anviking a=Anviking # Issue Number #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I simplified the types of JormungandrClient.getStakeDistribution and added NetworkLayer.stakeDistribution since our code currently works well with a large NetworkLayer. This way `StakePool.Metrics` can get the stake distribution without having a JörmungandrClient. - [ ] *Bonus*: <s>Add Buildable instance for Percentage</s> # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
856: implement 'withinSameTip' = to retry an action if the tip has changed while executing it r=Anviking a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added a helper function `withinSameTip` to "bracket" an action, retrying it if necessary (i.e. if the tip has changed during the execution of the action). # Comments <!-- Additional comments or screenshots to attach if any --> example usage: ```hs withinSameTip defaultPolicy (getNetworkTip nl) $ \tip -> do activity <- getStakePoolActivity tip distribution <- getStakeDistribution tip pure $ combineMetrics activity distribution ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
856: implement 'withinSameTip' = to retry an action if the tip has changed while executing it r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added a helper function `withinSameTip` to "bracket" an action, retrying it if necessary (i.e. if the tip has changed during the execution of the action). # Comments <!-- Additional comments or screenshots to attach if any --> example usage: ```hs withinSameTip defaultPolicy (getNetworkTip nl) $ \tip -> do activity <- getStakePoolActivity tip distribution <- getStakeDistribution tip pure $ combineMetrics activity distribution ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
861: Measure intersection hit rate in chain following tests r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added a `findIntersection` function to the network layer in order to allow client code to find an intersection with the current node's unstable block headers. - [x] I have measured the "intersection hit rate" (i.e., the number of time we are actually within `k` blocks from the tip before we call `nextBlocks` for the next batch). - [x] I have fixed a "small" bug in the http-bridge init cursor which would cause a partial pattern match to be triggered when the wallet is restarted. This gives us some idea of how well our chain following code performs. The main assumption is that our Jörmungandr client is actually much harsher than the reality. Therefore, if our chain follower does good in these scenarios, we might expect it to do rather okay in reality # Comments <!-- Additional comments or screenshots to attach if any --> We were wondering how frequent would we return a "ErrNoSynced" when fetching the stake pool distribution. We return such error if the our local chain has no intersection with the node's. With a small (in front of `k`) batch size, we currently get something like this: ``` 57.425% Intersection hit rate GREAT (75% - 100%) 32.235% Intersection hit rate GOOD (50% - 75%) 10.331% Intersection hit rate POOR (10% - 50%) 0.009% Intersection hit rate BAD (0% - 10%) ``` Now, if we increase the batch size to be bigger than k (like an order of magnitude) ``` 84.438% Intersection hit rate GREAT (75% - 100%) 15.541% Intersection hit rate GOOD (50% - 75%) 0.021% Intersection hit rate POOR (10% - 50%) ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
868: store 'StakeDistribution' in the database, implement put & read ops r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added a StakeDistribution table - [x] I have added two operations for reading and putting stake distributions to DB - [x] I have added two basic properties for the operations above. # Comments <!-- Additional comments or screenshots to attach if any --> ``` Sqlite Stake Pool properties readStakeDistribution . putStakeDistribution == pure +++ OK, passed 100 tests (4% Empty distributions). readStake . putStake a1 . putStake s0 == pure a1 +++ OK, passed 100 tests: 6% b is empty 4% a is empty 3% a & b are empty ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
868: store 'StakeDistribution' in the database, implement put & read ops r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added a StakeDistribution table - [x] I have added two operations for reading and putting stake distributions to DB - [x] I have added two basic properties for the operations above. # Comments <!-- Additional comments or screenshots to attach if any --> ``` Sqlite Stake Pool properties readStakeDistribution . putStakeDistribution == pure +++ OK, passed 100 tests (4% Empty distributions). readStake . putStake a1 . putStake s0 == pure a1 +++ OK, passed 100 tests: 6% b is empty 4% a is empty 3% a & b are empty ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
868: store 'StakeDistribution' in the database, implement put & read ops r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added a StakeDistribution table - [x] I have added two operations for reading and putting stake distributions to DB - [x] I have added two basic properties for the operations above. # Comments <!-- Additional comments or screenshots to attach if any --> ``` Sqlite Stake Pool properties readStakeDistribution . putStakeDistribution == pure +++ OK, passed 100 tests (4% Empty distributions). readStake . putStake a1 . putStake s0 == pure a1 +++ OK, passed 100 tests: 6% b is empty 4% a is empty 3% a & b are empty ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
868: store 'StakeDistribution' in the database, implement put & read ops r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have added a StakeDistribution table - [x] I have added two operations for reading and putting stake distributions to DB - [x] I have added two basic properties for the operations above. # Comments <!-- Additional comments or screenshots to attach if any --> ``` Sqlite Stake Pool properties readStakeDistribution . putStakeDistribution == pure +++ OK, passed 100 tests (4% Empty distributions). readStake . putStake a1 . putStake s0 == pure a1 +++ OK, passed 100 tests: 6% b is empty 4% a is empty 3% a & b are empty ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
881: Connect Pool DB with Api r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have implemented a `GET /stake-pool` that reads and combines metrics from `Pool.DB` - [x] TODO: Figure out when we are unsynced - [ ] TODO: Look for things to test if possible in this PR # Comments ### Self-node with a very short epoch-length (results are unavailable across epoch boundaries) ![self-node-short-epochs](https://user-images.githubusercontent.com/304423/67398367-d0edc680-f5aa-11e9-86da-ac13337e2a63.gif) ### Testnet syncing which is interrupted and resumed ![testnet-2](https://user-images.githubusercontent.com/304423/67399072-f7f8c800-f5ab-11e9-9fb1-38e8886aeba4.gif) <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
881: Connect Pool DB with Api r=Anviking a=Anviking # Issue Number #713 # Overview - [x] I have implemented a `GET /stake-pool` that reads and combines metrics from `Pool.DB` - [x] TODO: Figure out when we are unsynced - [ ] TODO: Look for things to test if possible in this PR # Comments ### Self-node with a very short epoch-length (results are unavailable across epoch boundaries) ![self-node-short-epochs](https://user-images.githubusercontent.com/304423/67398367-d0edc680-f5aa-11e9-86da-ac13337e2a63.gif) ### Testnet syncing which is interrupted and resumed ![testnet-2](https://user-images.githubusercontent.com/304423/67399072-f7f8c800-f5ab-11e9-9fb1-38e8886aeba4.gif) <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
881: Connect Pool DB with Api r=Anviking a=Anviking # Issue Number #713 # Overview - [x] I have implemented a `GET /stake-pool` that reads and combines metrics from `Pool.DB` - [x] TODO: Figure out when we are unsynced - [ ] TODO: Look for things to test if possible in this PR # Comments ### Self-node with a very short epoch-length (results are unavailable across epoch boundaries) ![self-node-short-epochs](https://user-images.githubusercontent.com/304423/67398367-d0edc680-f5aa-11e9-86da-ac13337e2a63.gif) ### Testnet syncing which is interrupted and resumed ![testnet-2](https://user-images.githubusercontent.com/304423/67399072-f7f8c800-f5ab-11e9-9fb1-38e8886aeba4.gif) <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
881: Connect Pool DB with Api r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have implemented a `GET /stake-pool` that reads and combines metrics from `Pool.DB` - [x] TODO: Figure out when we are unsynced - [ ] TODO: Look for things to test if possible in this PR # Comments ### Self-node with a very short epoch-length (results are unavailable across epoch boundaries) ![self-node-short-epochs](https://user-images.githubusercontent.com/304423/67398367-d0edc680-f5aa-11e9-86da-ac13337e2a63.gif) ### Testnet syncing which is interrupted and resumed ![testnet-2](https://user-images.githubusercontent.com/304423/67399072-f7f8c800-f5ab-11e9-9fb1-38e8886aeba4.gif) <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
881: Connect Pool DB with Api r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have implemented a `GET /stake-pool` that reads and combines metrics from `Pool.DB` - [x] TODO: Figure out when we are unsynced - [ ] TODO: Look for things to test if possible in this PR # Comments ### Self-node with a very short epoch-length (results are unavailable across epoch boundaries) ![self-node-short-epochs](https://user-images.githubusercontent.com/304423/67398367-d0edc680-f5aa-11e9-86da-ac13337e2a63.gif) ### Testnet syncing which is interrupted and resumed ![testnet-2](https://user-images.githubusercontent.com/304423/67399072-f7f8c800-f5ab-11e9-9fb1-38e8886aeba4.gif) <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
910: Review stake pool worker creation r=Anviking a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have slightly re-organized the code around the declaration of the stake pool layer - [x] I have namespaced the stake pool worker - [x] I have mounted some simple error handling on the stake pool worker thread # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
910: Review stake pool worker creation r=Anviking a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have slightly re-organized the code around the declaration of the stake pool layer - [x] I have namespaced the stake pool worker - [x] I have mounted some simple error handling on the stake pool worker thread # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
919: Test stake-pool metrics on extremely short epochs r=Anviking a=Anviking # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x]⚠️ I have changed the epoch length to 3, and slotDuration to 1, in the genesis block of the integration tests. - [x] I have extended the expectation that we `eventually get 200`, to `eventually get 200 >> eventually get 503`, as the stake-pool metrics become unsynced when the node enters a new epoch. - [x] I have added guarantees on the returned list of stake-pools based on our specific testing setup. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
919: Test stake-pool metrics on extremely short epochs r=Anviking a=Anviking # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x]⚠️ I have changed the epoch length to 3, and slotDuration to 1, in the genesis block of the integration tests. - [x] I have extended the expectation that we `eventually get 200`, to `eventually get 200 >> eventually get 503`, as the stake-pool metrics become unsynced when the node enters a new epoch. - [x] I have added guarantees on the returned list of stake-pools based on our specific testing setup. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
928: Test that monitorStakePools resumes correctly after being killed r=Anviking a=Anviking # Issue Number #713 # Overview - [x] I added an integration test, testing `monitorStakePools` and `Pool.DB, making sure that if a worker is killed and restarted, it is the same as if it had never been killed. # Comments <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
940: Add more stake-pools in the CI setup r=Anviking a=Anviking # Issue Number #713 # Overview - [x] I have added more stake-pools to the CI setup. We launch 1 pool, and have 2 inactive ones. # Comments - I don't really understand the effect on `consensus_genesis_praos_active_slot_coeff` on the block-production / slot, I'm checking with the rust folks. - As of currently this PR keeps `consensus_genesis_praos_active_slot_coeff : 1` and results in 100% of the slots being produced by the first pool, despite having 33% of the stake. <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
940: Add more stake-pools in the CI setup r=Anviking a=Anviking # Issue Number #713 # Overview - [x] I have added more stake-pools to the CI setup. We launch 1 pool, and have 2 inactive ones. # Comments - I don't really understand the effect on `consensus_genesis_praos_active_slot_coeff` on the block-production / slot, I'm checking with the rust folks. - As of currently this PR keeps `consensus_genesis_praos_active_slot_coeff : 1` and results in 100% of the slots being produced by the first pool, despite having 33% of the stake. <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io>
924: Prototype implementation of approximate pool performance r=KtorZ a=Anviking # Issue Number #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Very quick prototype implementation of approximate performance (`AP`). - [x] Performance is included in the stake-pool-metrics served by the api. # Comments <!-- Additional comments or screenshots to attach if any --> - Should make sure corner-cases are handled correctly (numbers may be 0) - On the jormungandr testnet one pool has a performance of 53, while the others have 0 🤔 . (There is only one pool that is actually producing blocks.) <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
924: Prototype implementation of approximate pool performance r=KtorZ a=Anviking # Issue Number #713 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Very quick prototype implementation of approximate performance (`AP`). - [x] Performance is included in the stake-pool-metrics served by the api. # Comments <!-- Additional comments or screenshots to attach if any --> - Should make sure corner-cases are handled correctly (numbers may be 0) - On the jormungandr testnet one pool has a performance of 53, while the others have 0 🤔 . (There is only one pool that is actually producing blocks.) <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
979: Support atomic and isolated executions of the database layers r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have made sure that `putPoolProduction` and `putStakeDistribution` happens in a single Sqlite transaction. If the wallet were to crash, either none of them or both of them succeed. - [x] Existing tests verify that this works for large batches `~ 100`. I tried writing 2000 pool-productions atomically, and it also worked, but slowed down tests, so I didn't commit it. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
979: Support atomic and isolated executions of the database layers r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have made sure that `putPoolProduction` and `putStakeDistribution` happens in a single Sqlite transaction. If the wallet were to crash, either none of them or both of them succeed. - [x] Existing tests verify that this works for large batches `~ 100`. I tried writing 2000 pool-productions atomically, and it also worked, but slowed down tests, so I didn't commit it. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
979: Support atomic and isolated executions of the database layers r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have made sure that `putPoolProduction` and `putStakeDistribution` happens in a single Sqlite transaction. If the wallet were to crash, either none of them or both of them succeed. - [x] Existing tests verify that this works for large batches `~ 100`. I tried writing 2000 pool-productions atomically, and it also worked, but slowed down tests, so I didn't commit it. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
979: Support atomic and isolated executions of the database layers r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have made sure that `putPoolProduction` and `putStakeDistribution` happens in a single Sqlite transaction. If the wallet were to crash, either none of them or both of them succeed. - [x] Existing tests verify that this works for large batches `~ 100`. I tried writing 2000 pool-productions atomically, and it also worked, but slowed down tests, so I didn't commit it. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
979: Support atomic and isolated executions of the database layers r=KtorZ a=Anviking # Issue Number #713 # Overview - [x] I have made sure that `putPoolProduction` and `putStakeDistribution` happens in a single Sqlite transaction. If the wallet were to crash, either none of them or both of them succeed. - [x] Existing tests verify that this works for large batches `~ 100`. I tried writing 2000 pool-productions atomically, and it also worked, but slowed down tests, so I didn't commit it. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Johannes Lund <johannes.lund@iohk.io> Co-authored-by: KtorZ <matthias.benkort@gmail.com>
Shall we close that one 😶 ? |
Yes I think so, I was just keeping it here while doing some exploratory testing on different testnets (which discovered few issues)... |
It might be worth attempting to generalise the performance calculation (to e.g. support exponential moving averages) and at the same time extending the tests. |
To cover what business requirement exactly 🤔 ?
I think we already had 50 days for that :) ... Any more work on this would go in a new story, in a new ticket. |
Context
ℹ️ This ticket is now an aggregation of:
#712
#715
#725
#722
Jörmungandr provides an endpoint for this with the following yaml-ified response format:
Todo: When run with BFT-config, jörmungandr only returns
{"epoch":2521}
. How do we handle that?Decision
NetworkLayer
andJörmungandrLayer
to allow fetching this endpoint.It should have a return-type similar to
Acceptance Criteria
Development Plan
PR
master
QA
combineMetrics
is tested https://github.com/input-output-hk/cardano-wallet/blob/8ba0c261e7ae3a687c218db457b4e079e63b8155/lib/core/test/unit/Cardano/Pool/MetricsSpec.hs#L49-L72The text was updated successfully, but these errors were encountered: