-
Notifications
You must be signed in to change notification settings - Fork 211
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
Extend Wallet Layer to Support Transaction Creation #95
Comments
lgtm... conditionally (well, ok, the scope was However I cannot yet test it on Also as discussed on Slack, we need to figure out the level of support for Byron node. If Byron node is to be supported then integration tests for it (via |
Context
We do have a wallet layer which is our main interface to deal with wallet operation and make modification on our various checkpoints.
This layer is missing the ability to submit new pending transactions and sign them!
Decision
Extend the WalletLayer API with a way to submit transaction and keep track of the pending transaction in the underlying checkpoints and database engine. It should make use of the extended interface for the network layer and the coin selection (or at least, a mock of it).
Note that, to keep enough flexibility and allow for easily implementing already existing requests from various users, we do want to keep the input selection, transaction signing and transaction submission three separate actions. API handlers will eventually put them all together.
Acceptance Criteria
Development Plan
cardano-sl
and experimentWalletLayer
cardano-sl
PR
master
master
master
master
master
KtorZ/95/keystore-in-db
master
master
QA
This one was quite ... huge in the end. Many things have been done, starting from extending the wallet layer (see haddock) with three functions:
At the API-level, a transaction handler has been implemented to perform the three steps above in sequence. We may consider later to introduce new endpoints to perform only some of those steps.
Regarding the transaction itself, there are a few things which are network-specific and depends on the binary representation of a transaction. We have therefore introduced an abstraction 'TransactionLayer' which captures this specificity. Golden tests with cardano-sl have been added here and make sure that we do generate and encode transactions exactly like cardano-sl implementation would do it.
Note that, there's currently no integration tests which verifying the end-to-end process of creating a transaction from an API call and watching it being picked up by the wallet. My two cents on this: this isn't trivial to do as it requires us to be able to make transactions, and therefore, to redeem funds from a faucet address first! I'd therefore suggest to release the feature as "experimental" for now in the next pre-release, and have a dedicated milestone about doing this. Regarding priorities, since transactions are going to have a different format in the Rust node and, a slightly different logic regarding witnesses, it'd be better to perform integration tests directly with the rust node instead of loosing a week or two to enable this with the http bridge.
The text was updated successfully, but these errors were encountered: