-
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
[ADP-106] Support restoration-from option in create-wallet API #4382
[ADP-106] Support restoration-from option in create-wallet API #4382
Conversation
2a3e154
to
0f00242
Compare
lib/wallet/api/http/Cardano/Wallet/Api/Types/RestorationMode.hs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. It would be good to do three more things in this API-affecting PR:
- add specification in a separate md file like we did for example for one change addr wallet : https://github.com/cardano-foundation/cardano-wallet/blob/master/specifications/api/one-change-address-mode.md
- Make sure shelley and shared wallet are covered
- Please regenerate golden for
PostWalletData
. ie. remove the file and then run unit tests like below
CREATE_MISSING_GOLDEN=TRUE cabal run cardano-wallet:test:unit
PS. Those files deleted are not part of this PR..Could you exclude them and create separate cleaning PR for this task? |
f21845a
to
fa66d54
Compare
da29adc
to
d289531
Compare
Fortunately, we already have an endpoint which does exactly that: https://cardano-foundation.github.io/cardano-wallet/api/edge/#operation/getBlocksLatestHeader It has a more REST-like path. |
5e27343
to
bbb3fea
Compare
bbb3fea
to
b82fdad
Compare
b82fdad
to
794b206
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adopting changes/improvemnts. I played a little with your branch and it looks fine. Please merge CLI branch onto this one before merging. Also I wonder if we could add unit tests and properties showing that
- if we have wallet created after slot1 then for any slot2 < slot1 and slot3 < slot2 the wallet state is the same.
- if we have wallet created after slot1 then for any slot2 < slot1 and fromGenesis we the wallet state the same
- for any wallet created at any point txs for wallet created from genesis include txs for wallet restored from any slot < tip which in turn include txs restored from tip.
etc.etc .(of course could be in separate PR if you find this idea compelling)
Overall LGTM! Great work!
This PR adds support for restoration from a given chainpoint for shelley wallets. - [x] Add RestorationMode optional field to the API specs - [x] Add RestorationMode and API counterpart haskell type - [x] Add some datatype to transport the mode to the DBLayer (StartRestorationPoint) - [x] Add a datatype to hold the initial state of a wallet (InitialState) - [x] Update JSON golden for WalletPostData - [x] Implement the database support for the mode ADP-106
…4382) This PR adds support for restoration from a given chainpoint for shelley wallets. - [x] Add RestorationMode optional field to the API specs - [x] Add RestorationMode and API counterpart haskell type - [x] Add some datatype to transport the mode to the DBLayer (StartRestorationPoint) - [x] Add a datatype to hold the initial state of a wallet (InitialState) - [x] Update JSON golden for WalletPostData - [x] Implement the database support for the mode ADP-106 Source commit: 416a7d7
This PR adds support for restoration from a given chainpoint for shelley wallets.
ADP-106