• Bitcoin
  • Blockchain
  • Crypto
  • Metaverse
  • AltCoins
  • Business
  • Investment
  • Upcoming
What's Hot

The Lightning Network Makes Bitcoin Unstoppable: Bitcoin Backstage with David Marcus

September 28, 2023

The Great Inscription Renumbering Debate: The Code & The Culture

September 28, 2023

You'll Activate The Covenants And You'll Like It

September 28, 2023
Facebook Twitter Instagram
  • Bitcoin

    The Lightning Network Makes Bitcoin Unstoppable: Bitcoin Backstage with David Marcus

    September 28, 2023

    The Great Inscription Renumbering Debate: The Code & The Culture

    September 28, 2023

    You'll Activate The Covenants And You'll Like It

    September 28, 2023

    Whitney Webb: Bitcoin And The Plot To Destroy Financial Privacy

    September 28, 2023

    NBA Champion and Former LeBron James Teammate Now Working in Bitcoin

    September 27, 2023
  • Blockchain

    BlockJoy raises $12M to help cut operating costs for businesses running blockchain nodes • TechCrunch

    February 2, 2023

    Blockchain Futurist Conference — Canada’s biggest crypto conference returns for fifth year

    February 2, 2023

    WEMADE and Metagravity Sign Strategic Alliance MOU to Collaborate on Blockchain Games for the Metaverse

    February 2, 2023

    Will Polkadot’s [DOT] new parachain fix the blockchain?

    February 1, 2023

    BNB Chain Unveils 3rd Blockchain in BNB Ecosystem, Tether ‘Never Borrowed from Celsius’, Ripple Sold $226M Worth of XRP in Q4

    February 1, 2023
  • Crypto

    Crypto Donations Now Need An Appraisal

    February 2, 2023

    Bitcoin Shrugs Off Fed Rate Hike to Hit Six-Month High

    February 2, 2023

    Stock and Share Market News, Economy and Finance News, Sensex, Nifty, Global Market, NSE, BSE Live IPO News

    February 2, 2023

    Yates County cryptocurrency miner completes debt restructuring deal

    February 1, 2023

    How ‘King of Instagram’ Dan Bilzerian ‘made millions’ from cryptocurrency after bizarre poker deal

    February 1, 2023
  • Metaverse

    Facebook’s Metaverse Division Lost Nearly $14 Billion Dollars Last Year

    February 2, 2023

    Samsung Hints Metaverse Ambitions At Product Launch Event, Eyes Integrating Different Realities Into Premium Smartphones

    February 2, 2023

    Sanlam makes history with SA’s first media launch in the metaverse

    February 2, 2023

    Meta’s plans to expand metaverse are up and running again: Here’ how

    February 2, 2023

    RFOX VALT Launches AI-Enabled Metaverse Apartments for Sale

    February 1, 2023
  • AltCoins

    Altcoins Lead Post-Fed Crypto Rally as Risk Appetite Increases

    February 2, 2023

    CAKE, SHIB And These Alt-Coins Are Trending

    February 2, 2023

    Elon Musk Wants McDonald’s to Accept Crypto Payments. Dogecoin (DOGE), Bitcoin (BTC), and Snowfall Protocol (SNW) Benefit

    February 2, 2023

    Crypto Analysts are Saying These Altcoins Have Huge Potential – Here’s Why

    February 2, 2023

    Are Cryptos Bound to Retrace Amid Recent Pump?

    February 1, 2023
  • Business

    Ray Dalio Warns Money Is in Jeopardy, Favors Inflation-Linked Crypto

    February 2, 2023

    BIT Mining Limited Regains Compliance with NYSE Continued Listing Standards

    February 2, 2023

    Bithumb’s de facto owner arrested over alleged embezzlement

    February 2, 2023

    Crypto Custody Firm Copper Alerted to Security ‘Incident’ Over Christmas

    February 1, 2023

    Cathie Wood’s Ark Invest Says Bitcoin Could Hit $1.5 Million by 2030

    February 1, 2023
  • Investment

    The Investor’s Guide to Crypto Options Trading

    February 2, 2023

    Pune software engineer loses Rs 13 lakh to crypto investment fraud

    February 2, 2023

    Crypto Investment Products’ AUM Surges as Investor Confidence Returns: CryptoCompare Report

    February 2, 2023

    Crypto Investors Can Purchase Bankruptcy Put Options to Protect Funds on Binance, Coinbase, Kraken Crypto Exchanges

    February 1, 2023

    Ethereum price forecast for February, including Morgan Stanley comments By Investing.com

    February 1, 2023
  • Upcoming

    S&P 500 rises to the highest level in five months Thursday as Meta leads a tech comeback

    February 2, 2023

    Looking For Something Different From Nubank and C6 Bank? Try Lanistar! – Sponsored Content

    February 2, 2023

    NYDFS Releases Guidance For BitLicensees And Limited Purpose Trust Companies On Asset Custody In The Wake Of Cryptocurrency Insolvencies – Financial Services

    February 2, 2023

    This Supreme Court Case Will Reverberate Throughout the Compliance and ESG World | NAVEX

    February 2, 2023

    Ethereum (ETH) Could Reclaim $2,000, Trader Says

    February 1, 2023
investorstoday.press
investorstoday.press
Home»Bitcoin»With Nix, Bitcoin Projects Can Accelerate Contributions And Deployment
Bitcoin

With Nix, Bitcoin Projects Can Accelerate Contributions And Deployment

maikdezana@icloud.comBy maikdezana@icloud.comJuly 5, 2023No Comments9 Mins Read
Share
Facebook Twitter LinkedIn Pinterest Email


This is an opinion editorial by niftynei, a developer educator who runs the Base58 Bitcoin protocol academy and an organizer of the upcoming, Nix-focused Bitcoin++ conference.

When you want to install a new app on your computer, where do you get it from?

Deciding which source to use is a problem that’s surprisingly difficult to solve, but it’s one that every computing platform struggles with.

Before the internet was widespread, new software “packages” were distributed on hard media, like CDs or USB sticks. If you wanted to get the latest version of your computer’s operating system (OS) or the newest version of Bitcoin Core, for example, you’d need to buy it physically at the store or have it mailed to you. You’d then load the disk or USB stick into your computer, and make a copy of the new software onto your local disk.

As a developer writing code, you’d have to physically hand out copies of your programs to friends and family. Or you’d work for a large corporation that had relationships with companies and computer stores, which would figure out how to get the software you wrote distributed to their clients and customers.

With the advent of always-connected computers, the landscape of software distribution forever changed. Now, instead of having to physically pick up a copy of the bits in a program, you can easily download a copy of it from the internet.

This made it much easier for new developers to write apps that anyone can download. The problem now, however, is answering the question: Where on the internet should users download the new software from?

The Hacker’s App Store

The way that mobile phone ecosystems solve the problem of new application distribution is through a program on your phone called the “App Store” (or the “Google Play store” on Android).

Developers upload the latest copy of their apps to either Apple’s or Google’s servers. Those companies then send out a silent notification to all of the phones that have the app installed, and the app gets updated in the background on users’ phones, without the users’ involvement.

If you’re a user and you want to add a new app to your phone, in most cases you’ll be able to find it in the App Store, and download it from there.

But not all software is available as a mobile phone app. Some software projects are desktop apps or tools that developers use to write new pieces of software. These applications need a distribution channel too. On desktop operating systems, we tend to call the “App Store” software by the term “package managers.” They manage the packages of software that you download onto your computer.

Modern package managers consist of a central server, sometimes called a repository, that can keep track of the latest version of the app, and a client-side application which runs on the package user’s computer.

If you’re a developer, you’ve probably run into “homebrew” or “apt-get install” somewhere in your life. “Homebrew” and “apt” are package managers.

In the way package managers work, the client-side application will check in with the central repository occasionally to see if there’s any new updates for any of the currently-installed packages. Or, if you have the right OS and the right permissions set, maybe your computer will automatically run these checks, download and install the latest version of an app.

(As an aside, you can add other sources of software packages to your local package-manager client. If a developer self hosts their apps instead of uploading them to the central repository, you’d need to add their self-hosted website to the list of places to look for updates in your own package-manager client app.)

What If We Could Reproduce Everything?

Nix is a package manager that aims to bring reproducible builds to all of the packages that it helps to distribute.

Nix solves the problems with software distribution by keeping detailed track of all of the inputs to a build, uniquely identifying every input and using the same ones as the original builder did. This ensures it’s able to build the same thing every time and on any machine.

Nix hashes every input and output of a build; this makes it easy to identify when an input has changed. When the inputs to a build change, the outputs are guaranteed to also change.

One big problem with reproducible builds is that different users will have different versions of the inputs that a program needs to be built with. Every new program that you build on your machine might need a different version of its input in order to be reproducible.

Nix fixes this by keeping track of builds by hash lists, and only using inputs that match the list of hashes it expects. The tradeoff is that Nix uses a lot more disc space and can often take a bit longer to download, as it’ll need to download the correct inputs to a binary build process if you don’t have them on your computer already.

I like to joke that Nix was only made possible thanks to Moore’s law, which means that we now have enough extra disk space to not need to worry about having multiple copies of the same program, just in slightly different versions.

So, Nix makes it possible to distribute a reproducible build of your software much much more easily, which means that a user can reliably rebuild your software on their machine and have it just work, no questions asked.

As a small aside, note that what “reproducible” means for a Nix build is that “if a package works on one machine, it will also work on another.” This isn’t the same as the reproducibility that Bitcoin Core developers try to guarantee for official Bitcoin binaries, which have a separate process to check that they’re bit-for-bit identical.

Nix And Bitcoin

Distributing open-source software in a way that’s easy for end users to get running, and is reproducible on any system, is a very useful and important feature. It makes it easier for anyone to start using the project and also easier for new developers to start contributing back to the project.

A few years ago, a set of intrepid developers launched a repository of the most common Bitcoin software projects that are packaged up as Nix packages and modules.

Packages make it much easier for anyone using the Nix package manager to install and start running a Bitcoin node, on almost any architecture. You don’t have to worry about installing the right dependencies before running the build commands, and the project will build from source on your own machine. It’s pretty ideal in terms of quickly being able to download, build and run a Bitcoin node from scratch.

The Nix-Bitcoin repository provides Nix “modules,” which are configurations for software applications that are meant to work on NixOS. The Nix-Bitcoin modules allow anyone who’s running NixOS to reproduce a build of Bitcoin Core and other Bitcoin open-source projects, and quickly get them running on their machines with minimal fuss.

In an interview for this article, Jonas Nick, one of the lead maintainers of the Nix-Bitcoin project, had the following to say about using the project:

“The main benefit that Nix-Bitcoin gets from Nix/NixOS is declarative config management. Configuring your system using the Nix programming language allows for abstraction, so you can modularize your logic to reuse and test individual components. This allows managing complexity, which inevitably occurs when building systems, and helps to build a correct and secure system. For example, a lot of the security features that Nix-Bitcoin provides would be very annoying to maintain if we didn’t have the module system. Reproducibility in NixOS also helps a lot with updates, because we know exactly what is running on the systems of our users. Finally, with NixOS can also get errors at evaluation time instead of at runtime.”

Bitcoin Core isn’t the only project that’s packaged up for distribution on Nix.

There’s also Core Lightning, BTCPay Server and a number of other projects. For the most part, these projects are added and bundled up for distribution on Nix by fans of the Nix package-management system, not the developers who are writing the software. For a more complete list of available packages, check out the “modules” list in the Nix-Bitcoin GitHub repository.

Why Not Nix Everywhere?

If Nix is such a great change to the way that Bitcoin projects are built and shipped, why doesn’t everyone use it? The truth is that Nix is a big project that’s a bit difficult to get into. The learning curve for using Nix is quite steep, and the paradigm of running Nix as a package manager can be quite different than most are used to.

NixOS started as a research project by Eelco Dolstra in 2003, and has slowly been building a following and user base since then.

Bitcoin++ Berlin: Expanding The Use Of Nix In Bitcoin

By organizing the upcoming Bitcoin++ conference in Berlin, we aim to change this. Bitcoin++ is a developer-focused conference series which focuses on different topics in the Bitcoin developer space. Originally started in Austin, Texas, in 2022, the most recent conference in late April 2023 focused on Layer 2 technologies in Bitcoin, such as Ark, the Lightning Network

and validity rollups.

The upcoming Berlin conference, planned for October 6 and October 7, 2023, aims to be a “Nix-pilling” event for the Bitcoin developer ecosystem. The core maintainers of the Nix-Bitcoin project on Fort Nix will be in attendance (including Nick, Pavol Rusnak and Eric Sirion, to

name a few). The two-day event will be full of hands-on workshops and lectures

designed to teach developers from across the ecosystem about how to use Nix to package

their projects and better bundle their development dependencies so that new

contributors can start coding and contributing faster, as well as demonstrate how fast and easy it is to deploy software using modules on NixOS.

Additional Article References

  1. Reproducibility with Nix
  2. Interview with “nixbitcoindev”
  3. Where to start
  4. Why Nix-Bitcoin, for Bitcoiners

This is a guest post by niftynei. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
maikdezana@icloud.com
  • Website

Related Posts

The Lightning Network Makes Bitcoin Unstoppable: Bitcoin Backstage with David Marcus

September 28, 2023

The Great Inscription Renumbering Debate: The Code & The Culture

September 28, 2023

You'll Activate The Covenants And You'll Like It

September 28, 2023

Whitney Webb: Bitcoin And The Plot To Destroy Financial Privacy

September 28, 2023
Add A Comment

Leave A Reply Cancel Reply

Top Posts

Subscribe to Updates

Get the latest crypto news

Advertisement
Demo
Top Insights

The Lightning Network Makes Bitcoin Unstoppable: Bitcoin Backstage with David Marcus

September 28, 2023

The Great Inscription Renumbering Debate: The Code & The Culture

September 28, 2023

You'll Activate The Covenants And You'll Like It

September 28, 2023
Get Informed

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

Categories
  • AltCoins (1,399)
  • Bitcoin (2,039)
  • Blockchain (1,384)
  • Business (1,378)
  • Crypto (1,365)
  • Investment (1,383)
  • Metaverse (1,361)
  • Upcoming (1,319)
Facebook Instagram
  • Contact Us
  • privacy policy
  • about us
© 2023 Designed by investorstoday.

Type above and press Enter to search. Press Esc to cancel.