From 69a8107c8605b55164c4f2a72d79b04745b12ccb Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Wed, 14 Oct 2020 16:31:54 -0400 Subject: [PATCH] Add wip rfc for zebra-client/cli design --- book/src/dev/rfcs/xxxx-zebra-client.md | 147 +++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 book/src/dev/rfcs/xxxx-zebra-client.md diff --git a/book/src/dev/rfcs/xxxx-zebra-client.md b/book/src/dev/rfcs/xxxx-zebra-client.md new file mode 100644 index 00000000..450dd1f6 --- /dev/null +++ b/book/src/dev/rfcs/xxxx-zebra-client.md @@ -0,0 +1,147 @@ +- Feature Name: (`zebra-client`) +- Start Date: (fill me in with today's date, 2020-10-15) +- Design PR: [ZcashFoundation/zebra#0000](https://github.com/ZcashFoundation/zebra/pull/0000) +- Zebra Issue: [ZcashFoundation/zebra#0000](https://github.com/ZcashFoundation/zebra/issues/0000) + +# Summary +[summary]: #summary + +Handling blockchain scanning in subtasks via a zebra-client component in zebrad, and +a wallet component in zebra-cli to query that component for wallet balances and to construct +transactions and send them out via zebrad. + +# Motivation +[motivation]: #motivation + +We want to send money via Zebra efficiently and securely. + +# Definitions +[definitions]: #definitions + + +# Guide-level explanation +[guide-level-explanation]: #guide-level-explanation + + + + + + + + + + + +zebra-client +- client component +- (does: key access, blockchain scanning) +- (has a whole separate sled DB for ’users’s txs, keys, etc) +- (keeps track of where it’s scanned to) +- (can be executed in its own tokio subtask to isolate from timing) +- (has access to notifs from zebra-state about new blocks etc) +- (lives as a subtask of zebrad) +- zebra-cli talks to this subcomponent which is in a running zebrad +- (the scanning executes independently (but in the same process) of the normal node operation) +- (zebra-client, in side zebrad, runs in its own separate task, in case it crashes, it’s not noticeable) +zebra-cli +- (can use servo/bincode + servo/ipc-channel to communicate with zebrad) +- (separate processes) + +# Reference-level explanation +[reference-level-explanation]: #reference-level-explanation + + + + + + + + + +## Module Structure + + + +zebra-client ( currently and empty stub) zebra-cli (does not exist yet) +zebra-rfc? (exists as an empty stub, we way have zebra-cli communicate with +zebra-client inside zebrad via an RPC method any/or a private IPC layer) + +## Test Plan + + + + + + + + + + + + + + + + + + +# Drawbacks +[drawbacks]: #drawbacks + + + +Supporting a wallet assumes risk. + +# Rationale and alternatives +[rationale-and-alternatives]: #rationale-and-alternatives + + + + + +> What is the impact of not doing this? +We can't send money with zebra alone. + +# Prior art +[prior-art]: #prior-art + + + + + + + + + + + + +. + +# Unresolved questions +[unresolved-questions]: #unresolved-questions + + + + + +# Future possibilities +[future-possibilities]: #future-possibilities + + + + + + + + + + + + + + + + + +