Announcing Zepio Wallet
Cross-platform shielded-address-first Zcash wallet
Today we’re announcing the release of Zepio, an open source shielded-address-first Sapling-enabled cross-platform Zcash desktop wallet. Zepio allows users to privately send and receive ZEC with ease, leveraging a friendly and intuitive user interface. With support for macOS, Linux and Windows machines, compatibility with both
testnet chains, support for multiple UI themes, and custom or built-in full node support, Zepio has something for all types of Zcash users.
Zepio is a project made possible through a partnership with the Zcash Foundation, a non-profit that focuses on financial privacy, primarily relating to the Zcash network. My talented colleagues at Astrocoders and I worked diligently over the past few months to build a product that was both pleasant and useful, to users of various backgrounds and with various needs.
Zepio is built entirely open source. The codebase and the product itself are released under the MIT license, and we purposefully chose libraries, frameworks and packages that follow the same set of OSS principles. Below is a list of the major packages used to architect the application:
- zcashd — Zcash blockchain full node daemon implementation
- Electron — Desktop cross-platform application builder
- React — User interface view layer framework
- Redux — Predictable application state container
- Styled Components — Visual primitives for theming and styling
- webpack — Application module bundler (and much more)
- Babel — ES7/JSX code transpilling
- ESLint — Code linting rules and standards
- Docz — Documentation builder
While the reasoning and choice behind the majority of the libraries mentioned above are pretty straightforward, it’s worth going into a little more detail in three of them specifically — Electron, zcashd, and Redux.
Electron also enables the use of powerful web technologies such as React and Redux on desktop environments. While the former relates to components in user interfaces, the latter entails application and business logic. Given the complexity of the Zepio wallet, we chose a modular architecture relying on Redux’s reducers to power and dictate the state of the UI. More specifically we decided to follow the architectural model known as Ducks Pattern. In its essence the pattern suggests the bundling of reducers, containers and actions (types and creators) at a feature level, so as to provide true separation of concerns and further linkability between application folder structure and actual business logic.
Zcash Full Node
The Zcash daemon is also another big piece to the Zepio architecture. Given that light client specifications are still not part of the core Zcash network, Zepio requires a full node implementation to power the application. Once again we chose to follow a modular approach and accept the use of both the built-in
zcashd node binaries (which come bundled with Zepio for each OS), as well as your custom
zcashd node setup. The idea was to appeal to both more advanced users who have their own specific node configurations, as well as to incoming Zcash enthusiasts searching for an easier onboarding route.
To power up the built-in
zcashd binaries, we leveraged NodeJS’s Child Process API. This API provides the ability to spawn separate child processes that can be controlled on the background of the main renderer application. In a nutshell, this is how Zepio handles the connection to a
Zepio checks for an already running daemon process. If it exists, Zepio reads the
zcash.confconfiguration file and/or command line arguments and connects to the node’s RPC server.
On the other hand, if it does not exist Zepio will read (create if needed) the
zcash.confconfiguration file, generate the RPC connection credentials necessary, and subsequently spawn the zcash daemon child process for the correct OS build target.
This provides a modular architectural setup for introducing light client support into Zepio once those become available in the Zcash network.
Automation is one of the core facets of achieving high development velocity and iteration in any software engineering team or project. We chose to prioritize automation from the beginning and spent some time creating a performant continuous integration and continuous development workflow that drastically simplifies the building, testing, signing, and deployment of the application.
Building and Bundling
Electron applications tend to be bundled using
electron-builder, the community-supported Electron bundling toolkit. It allows for quick configuration of multiple OS distribution targets, auto-updating capabilities, and direct publishing of the build artifacts to GitHub.
For the signing part of the workflow, we chose to follow a similar approach to other Zcash Foundation projects and rely on public and private GPG keys. Each release is signed with the private key, and subsequently released with the attached public key. This allows any Zepio user to confirm the validity of the binaries downloaded.
Zepio at its core is nothing more than a graphical user interface to interact with the
zcashd daemon. However, that does not mean we forgave implementing testing capabilities into the system. Quite to the contrary, given that we’re creating a product that transacts user’s assets, we wanted to make sure there were no side effects left up to chance.
We relied on testing utilities and helpers that encourage good testing practices. All of Zepio’s UI components have snapshot tests. All business logic such as reducers, actions and utilities are unit-tested. All APIs, including the
zcashd RPC server, are fully mocked and tested against. With that said, unit tests only get us so far in terms of identifying application side effects.
For our end-to-end testing workflow, we picked Spectron, a testing framework that leverages ChromeDriver and WebdriverIO to test Electron apps. We have end-to-end tests for all of the features available in the application, and by pairing Spectron with Xfvb, we were able to take end-to-end testing to an even higher level. After bundling the application, our continuous integration pipelines will spin up a virtual server, launch Zepio, perform each of the tests and record the testing sessions in full. A (quite odd to watch) video artifact is the output, allowing for even deeper debugging of any edge cases that appear.
After bundling, testing and signing the application, we’ve finally reached the deployment stage. For the core of our integration pipelines we use Bitrise. Bitrise’s tagline is
automate everything as a service, and it really is a powerful continuous integration tool. We were able to create a set of custom unique pipelines fully automating the test, release and deployment processes for Zepio. In a nutshell, here’s the workflow:
- Pull request gets code reviewed, QA’ed and subsequently merged into
masterbranch, triggering a webhook on the Bitrise workflow.
- Bitrise spins up a new macOS virtual server, clones the repository, installs dependencies and bundles the application.
- Bitrise imports the GPG key, and signs the binaries.
- Bitrise runs the unit and end-to-end tests on the virtual macOS machine, outputting the video artifacts from Xfvb.
- Bitrise leverages a GitHub integration to directly tag and publish a new release off of
masterbranch, including the macOS, Linux and Windows binaries, along with the signatures for the same.
With this workflow, the team is able to iterate on bug fixes and features at a very fast pace. Bitrise also offers free premium accounts for open source projects, so we figured we’d take advantage of that.
Zepio is a product for the Zcash community, and we hope you will help us test and improve the application. Head on over to the Github Releases page to download the version of Zepio for your operating system and give us your feedback so we can continue to improve the application. If you face any issues, please check the Troubleshooting guide in the documentation site, as well as any issues filed on GitHub. We hope Zepio serves as a first stepping-stone to improving the user experience of those seeking true financial privacy online.
Special thanks to Josh Cincinnati and the Zcash Foundation for continuing to lead the industry in supporting privacy-preserving projects and initiatives. Also big thanks to Guilherme de Campo, Gabriel Rubens, and George Lima from Astrocoders for partnering and helping build such an awesome product.