Chain / Interstellar
2015 - 2019
2015 - 2019
Go, C++, Rust, blockchains, elliptic-curve cryptography, consensus algorithms, compiler technology, Postgresql, AWS, hardware security modules (HSMs), Stellar network, and much more.
I was an early member of the engineering team at Chain, which was a leading developer of (and educator about) commercial blockchain technology at the beginning of the exploring-beyond-Bitcoin phase. Large financial firms including Nasdaq, Visa, and Citibank created pilot projects with Chain to learn about the potential of distributed ledgers, smart contracts, and more.
The Chain Core era
Blockchain technology was new to me, as it was to the rest of the world. As I climbed the learning curve, I wrote a pair of articles for Chain's blog to help the rest of the world climb it too:
Our users were institutional federations, with each federation member running an instance of our blockchain server, Chain Core. We released Chain Core as open source; the repository is at github.com/chain/chain.
Chain Core supported the creation of "smart contracts" by programming the Chain "virtual machine" in its low-level stack-based language, akin to assembly language. One weekend, frustration at the tedium of this process combined with inspiration and I produced a high-level language (later dubbed Ivy) for writing Chain Core smart contracts, plus a compiler for it that produced low-level VM code. [Godoc link.] When I showed up with it on Monday morning it was received as a minor miracle. We quickly productized it, which included creating an interactive Ivy playground, and we announced everything in a blog post. [Preserved copy of blog post.]
The Sequence era
Chain Core had two problems: it was complex to download, configure, and operate, and we were forever holding our customers' hands; and the VM, which was patterned after the one in Bitcoin, was too constraining for some of the smart contracts our customers wanted to explore.
So we transitioned to a new product, called Sequence, which was an evolution of Chain Core in two ways: we hosted it as a cloud service, making it much easier for users to get started with it; and we designed an innovative new VM for it called TxVM.
In addition to leading much of its development, I wrote the blog post announcing TxVM and the TxVM whitepaper. I followed these with another article illustrating several possible uses for TxVM. Privately, I also used TxVM to develop a working prototype of a "zero-knowledge contingent payment system" called Tredd ("trustless escrow for digital data"), the notional basis for a more just information economy.
To ensure the security of customer data in our new hosted service, I pioneered a new technique for tenant isolation called pgtenant.
The Interstellar era
The consensus layer is a necessary part of any blockchain system, and in both Chain Core and Sequence that remained an incomplete "to-do." Stellar, an established blockchain system with a novel consensus mechanism, hadn't achieved the commercial penetration that Chain had, and lacked good smart-contract technology. Thus complementing each other, in 2018 Chain joined forces with Stellar's commercial arm, Lightyear, to create Interstellar.
In preparation for the merger, I dedicated myself to becoming one of the few people in the world truly to understand the Stellar Consensus Protocol. I wrote the first clean-room implementation of it, based on its whitepaper; I contributed corrections and suggestions to its Internet Draft; and I ultimately wrote what became (and remains) the definitive explainer on the topic.
One of our first joint projects was Slidechain, a demonstration of using a TxVM network as a "sidechain" to Stellar. Value on the Stellar network could be "pegged" into and out of a parallel TxVM-based network where rich smart-contract semantics are available. I led the design and implementation of this system. I described the pegging mechanism in detail here. The code (including a runnable demo) is here.
I was next loaned out to Stellar's non-profit arm, the Stellar Development Foundation, because of my C++ knowledge and the expertise I had developed in the Stellar Consensus Protocol. They wanted my help with performance problems in bootstrapping an instance of Stellar Core, which took days to run. I profiled the code and was able to find some low-hanging fruit (batching numerous database operations together), producing a 40% reduction in bootstrap time.
Then I worked on a project called Starlight to implement Lightning-network-style payment channels in Stellar. It got as far as a proof-of-concept demo. Code and documentation are here.
Finally I worked on ZkVM, an evolution of TxVM that includes tremendous advances in performance and privacy. The implementation of ZkVM is in Rust, which I learned for this project. That project has continued (and moved from Interstellar to the Stellar Development Foundation) since I left, and is one of a group of related packages collectively called Slingshot. It can be found here.