You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A set of core primitives and types to represent and keep track of a wallet
A network layer that retrieves blocks from a chain producer (i.e. the cardano-http-bridge)
A db layer that define an interface for persisting pieces of information to some db engine / storage
A wallet layer that connects the dots and make use of the above to provide a simple interface for wallet clients (like the API layer or the CLI)
Decision
We do need to implement the wallet layer to make sure that we process blocks from the chain producer and apply them as we received them. Also, this should ideally make use of the DB layer to keep track of the checkpoints and, restart from a given position when needed.
Acceptance Criteria
The wallet layer must process blocks from the NetworkLayer using the wallet primitives
The wallet layer should flush its latest state to the database after processing blocks
The wallet layer may quickly catch up with the network tip when started
Development Plan
Draft a first pipeline that tight together the various layers in order to restore a wallet from a given mnemonic.
Look at the heap and time profiling for restoring a wallet against mainnet
We've finalized the first draft implementation of the wallet layer as described by WalletLayer. To implement this layer, we had to pull strings from the DBLayer and NetworkLayer, ultimately tightening them together alongside the wallet primitive logic to accomplish basic wallet work.
Usage of the watchWallet have been manually tested and profiled and the result can be seen in comment of Connect Primitives to Layers #73 (note that, I have later removed the corresponding code from the CLI executable as it seemed to confuse people).
We do also have similar tests working directly at the WalletLayer level and checking additional invariant (like, conflict between ids), cf: Cardano/WalletLayerSpec.hs
The text was updated successfully, but these errors were encountered:
@KtorZ, code coverage on WalletLayer.hs is rather low now ~53%. Mostly due to not exercised watchWallet (and called within it applyBlocks and printInfo).
Perhaps it would be possible to add some integration tests for watchWallet similar to HttpBridgeSpec?
@piotr-iohk
Yup, I am actually about to cover those as part of the debt ticket we have (those are mentioned points). The watch wallet is a bit tricky to cover since it runs forever; I believe we can just run it for a while in a thread and then, nuke the thread at some point 🤔
Will do as part of #94
Context
We have:
Decision
We do need to implement the wallet layer to make sure that we process blocks from the chain producer and apply them as we received them. Also, this should ideally make use of the DB layer to keep track of the checkpoints and, restart from a given position when needed.
Acceptance Criteria
must
process blocks from theNetworkLayer
using the wallet primitivesshould
flush its latest state to the database after processing blocksmay
quickly catch up with the network tip when startedDevelopment Plan
PR
master
master
master
QA
We've finalized the first draft implementation of the wallet layer as described by WalletLayer. To implement this layer, we had to pull strings from the DBLayer and NetworkLayer, ultimately tightening them together alongside the wallet primitive logic to accomplish basic wallet work.
Usage of the
watchWallet
have been manually tested and profiled and the result can be seen in comment of Connect Primitives to Layers #73 (note that, I have later removed the corresponding code from the CLI executable as it seemed to confuse people).@paweljakubas also added extra unit tests to test basic properties on our fake DB engine for now, that are visible in Cardano/DBLayer/MVarSpec.hs
We do also have similar tests working directly at the WalletLayer level and checking additional invariant (like, conflict between ids), cf: Cardano/WalletLayerSpec.hs
The text was updated successfully, but these errors were encountered: