{"id":19574,"date":"2019-08-14T14:51:32","date_gmt":"2019-08-14T14:51:32","guid":{"rendered":"http:\/\/ci027cfe65800126c3"},"modified":"2019-08-14T14:51:32","modified_gmt":"2019-08-14T14:51:32","slug":"guix-makes-bitcoin-core-development-trustless","status":"publish","type":"post","link":"https:\/\/bitcoinmagazine.com\/technical\/guix-makes-bitcoin-core-development-trustless","title":{"rendered":"Guix Makes Bitcoin Core Development More Trustless"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/guix-makes-bitcoin-core-development-more-trustless.jpg\" title=\"\"><\/figure>\n<p>Back in 2016, Bitcoin development became a model for the entire open-source community with the integration of Gitian building \u2014 a \u201ccomputer within a computer\u201d framework that let developers verify binary computer files in a more transparent way. But with the <a href=\"https:\/\/twitter.com\/carl_dong\/status\/1149737031892967424\" target=\"_blank\" rel=\"noopener\">recent merging of Guix<\/a>, which supports deterministic and bootstrappable Bitcoin Core builds, work on the protocol has become even more trustless.<\/p>\n<p>Though the process involved is rather sophisticated and mostly concerns developers, the two issues at stake involve trust and language \u2014 components of Bitcoin that matter to all of us. As any crash course in computer science will tell you, computers receive instructions in binaries (\u201cones\u201d and \u201czeroes\u201d), but humans must write in a programming language that\u2019s logical and comprehensible to them. After the coding part is completed, the instructions need to be compiled into the kind of language that computers can understand. And when developers need to share the resulting binaries, there is a degree of trust that they must have in one another (unless the process involves extra steps for verification, which are time consuming).&nbsp;<\/p>\n<p>As a decentralized protocol, Bitcoin requires extra attention and caution. If there happens to be a slight third-party alteration (like a malevolent hacking, for example) in the binaries, which gets exchanged between developers, then the new version of the client may have bugs and side effects that lead to massive losses of funds. Unless a proper verification process is established, this issue can easily become a single point of failure.<\/p>\n<h3><strong>Gitian and Guix<\/strong><\/h3>\n<p>The idea that all developers would run the same code and compare binaries is unrealistic, as differences \u2014 even small differences \u2014 in variables such as system architecture, the operating system, and even compilation time may provide different results. Therefore, in order to tackle this issue, a pseudonymous developer who goes by the name of <a href=\"https:\/\/github.com\/devrandom\" target=\"_blank\" rel=\"noopener\">Dev Random<\/a> created Gitian.<\/p>\n<p>As <a href=\"https:\/\/bitcoinmagazine.com\/articles\/what-is-gitian-building-how-bitcoin-s-security-processes-became-a-model-for-the-open-source-community-1461862937\">described<\/a> by <em>Bitcoin Magazine<\/em>\u2019s Aaron van Wirdum, Gitian is a \u201ccomputer within a computer\u201d which provides a virtual space where binaries can be compiled without variables. No matter which device or operating system is used for the process, the results are guaranteed to always be the same.&nbsp;<\/p>\n<p>However, the procedure is not sufficient for the needs of Bitcoin Core developers, as it relies too much on the Ubuntu operating system. This dependency in and of itself can become a point of failure, and the verification process requires more transparency and auditability.&nbsp;<\/p>\n<p>As Chaincode Labs engineer Carl Dong told <em>Bitcoin Magazine<\/em>, \u201cThe standardized environment depends heavily, and somewhat blindly, on Ubuntu. In fact, the way we constructed the environment was by downloading un-auditable, opaque binaries (in other words, \u2018trusted binaries\u2019) from Ubuntu, exposing us to third-party risk. One could imagine how an attacker can poison all Bitcoin Core release executables through an intrusion of Ubuntu\u2019s infrastructure (or, perhaps simply by working there).\u201d<\/p>\n<p>Dong is responsible for the introduction of Guix, a binary verification system which makes development more trustless and is set to completely replace Gitian.&nbsp;<\/p>\n<p>\u201cGuix allows us to construct the environment in a way where we rely on a severely reduced set of trusted binaries,\u201d he said. \u201cMost of the environment is constructed by building from a tiny binary seed, and this building process is much more auditable.\u201d<\/p>\n<p>Furthermore, the trust minimization implementation (which <a href=\"https:\/\/github.com\/bitcoin\/bitcoin\/pull\/15277\" target=\"_blank\" rel=\"noopener\">was merged into Bitcoin Core<\/a> on July 12, 2019) aims to eliminate third-party risk. Dong considers it to be a simpler and less platform-specific approach to working on Bitcoin Core. In the future, Guix will also allow developers to build on different CPU architectures and produce reproducible executables across time. These features are essential for transparent and ethical development, and they will also make the exchange of binaries faster and more efficient.<\/p>\n<p>Admittedly, Dong has taken inspiration from the intentions and architecture of Gitian. Nonetheless, there is no room for both, and Guix is set to become the replacement.&nbsp;<\/p>\n<p>\u201cMy work on integrating Guix into Bitcoin Core certainly took inspiration from Gitian, but they don\u2019t complement each other much,\u201d Dong said. \u201cI expect that once the cross-compilation support for OS X and Windows targets are finished, Gitian will be retired.\u201d<\/p>\n<h3><strong>Guix and the Average Bitcoin User<\/strong><\/h3>\n<p>If Guix is a tool that\u2019s created by developers and for their own exchange of compiled binaries, then why would the average user care? Well, it also eliminates the trust in the data downloaded for the Bitcoin Core client. Though the odds are pretty slim, malevolent third parties such as phishing websites may intervene during the process and, in the absence of a proper verification framework, steal your bitcoin. Guix follows precisely the \u201cdon\u2019t trust, verify\u201d philosophy which is deeply rooted in the Bitcoin culture.<\/p>\n<p>According to Dong, \u201cGuix allows users to verify that the Bitcoin Core client they download corresponds exactly to the code that Bitcoin Core developers write. It mitigates attacks that target the way we turn our codebase into the client executables we release.\u201d<\/p>\n<p>In spite of the clear focus on the needs of developers, Guix is also something that users may need and want to use if they choose to be cautious about the software that they run.&nbsp;<\/p>\n<p>At press time, Guix is only available for Ubuntu builds. However, Dong estimates that the Windows and Mac OS versions will be released \u201coptimistically\u201d by the end of 2019. In the true conservative spirit of Bitcoin, a \u201cwhen it\u2019s completed and thoroughly tested\u201d clause is attached, so we shouldn\u2019t hold our breath for deadlines when the clear priority is robustness.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Supporting deterministic and bootstrappable Bitcoin Core builds.<\/p>\n","protected":false},"author":3423,"featured_media":19575,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[227,3303,3211,3151,3152],"class_list":["post-19574","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technical","tag-bitcoin-core","tag-carl-dong","tag-chaincode-labs","tag-gitian","tag-guix"],"author_data":{"id":3423,"name":"Vlad Costea","nicename":"vladcostea","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/dcf8df0c5a9b46a72d343c10a23bf0777a27a34001a19284e14f1439f3bfacca?s=96&d=robohash&r=g"},"featured_image_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/guix-makes-bitcoin-core-development-more-trustless.jpg","_links":{"self":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/19574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/users\/3423"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/comments?post=19574"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/19574\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media\/19575"}],"wp:attachment":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media?parent=19574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/categories?post=19574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/tags?post=19574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}