-
Notifications
You must be signed in to change notification settings - Fork 214
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
Use SlotNo and TimeInterpreter #1901
Merged
Merged
Commits on Jul 16, 2020
-
Convert wallet to use SlotNo and TimeInterpreter
== Add TimeInterpreter, necessary queries, and a way to run them Add tests comparing them with old implementation == Fundamentally change wallet to use SlotNo instead of SlotId - Patch together cardano-wallet-jormungandr to still work, despite the binary using SlotId. == Remove redundant byron code == Sync progress calculation compares times now instead of slots
Configuration menu - View commit details
-
Copy full SHA for 353f4b6 - Browse repository at this point
Copy the full SHA 353f4b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5942f12 - Browse repository at this point
Copy the full SHA 5942f12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b34242 - Browse repository at this point
Copy the full SHA 7b34242View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2a785a - Browse repository at this point
Copy the full SHA c2a785aView commit details -
It would group slots like: Epoch 1: SlotNo 0 SlotNo 8 Epoch 0: SlotNo 11 when it zipped the grouped slots together with the epochs. I'm not sure how it worked previously and stopped working now. I also added a somewhat ugly shrinker for the stake pool fixtures.
Configuration menu - View commit details
-
Copy full SHA for 3fc013b - Browse repository at this point
Copy the full SHA 3fc013bView commit details -
Rename sqlite
slot
fields toslot_no
forcing migrationWe previously encoded SlotId = (epoch, slotInEpoch) in the `slot` tables as a single, flat integer (using an artificial epoch length) We are now storing the SlotNos. It would be VERY BAD if a new wallet would read re-interpret the old wallet data incorrectly. Renaming the fields should trigger the automatic DB migration.
Configuration menu - View commit details
-
Copy full SHA for 9eb843b - Browse repository at this point
Copy the full SHA 9eb843bView commit details -
Revert "Rename sqlite
slot
fields toslot_no
forcing migration"This reverts commit 9eb843b. That commit broke a unit test failure for a manual migration. I am not sure if the test could have been removed without consequences. But weirdly, migration seems to work smoothly without it: $ cardano-wallet-shelley-2020-07-06 serve --node-socket socket --testnet shelley_testnet-genesis.json --database wallet-db $ # Create a wallet $ cardano-wallet-shelley transaction list <WALLET ID> $ cardano-wallet-shelley serve --node-socket socket --testnet shelley_testnet-genesis.json --database wallet-db $ cardano-wallet-shelley transaction list <WALLET ID> $ # The correct slots are still shown. Looking in the DBs, it seems like wallet does detect that the schema has changed, and re-syncs from genesis.
Configuration menu - View commit details
-
Copy full SHA for 0df6556 - Browse repository at this point
Copy the full SHA 0df6556View commit details
Commits on Jul 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for bb18aaa - Browse repository at this point
Copy the full SHA bb18aaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for a220dbe - Browse repository at this point
Copy the full SHA a220dbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1014550 - Browse repository at this point
Copy the full SHA 1014550View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4a21b4 - Browse repository at this point
Copy the full SHA d4a21b4View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.