Altszn.com
  • Home
  • Crypto
    • Altcoins
    • Bitcoin
    • Ethereum
    • Monero
    • XRP
    • Zcash
  • Web3
  • DeFi
  • NFTs
No Result
View All Result
Altszn.com
  • Home
  • Crypto
    • Altcoins
    • Bitcoin
    • Ethereum
    • Monero
    • XRP
    • Zcash
  • Web3
  • DeFi
  • NFTs
No Result
View All Result
Altszn.com
No Result
View All Result

With Nix, Bitcoin Projects Can Accelerate Contributions And Deployment

Altszn.com by Altszn.com
July 9, 2023
in Bitcoin
0
With Nix, Bitcoin Projects Can Accelerate Contributions And Deployment
399
SHARES
2.3k
VIEWS
Share on FacebookShare on Twitter

[ad_1]


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.



[ad_2]

Read More: bitcoinmagazine.com

Tags: AccelerateBitcoinBTCcontributionsDeploymentNixProjects
ADVERTISEMENT

Recent

VIRTUAL Rallies Ahead of First Ethereum-Based AI Agent Launch

VIRTUAL Rallies Ahead of First Ethereum-Based AI Agent Launch

June 15, 2025
Is it the future of finance?

Is it the future of finance?

June 15, 2025
U.S. Lawmakers Unveil CLARITY Act Regulating Digital Assets

U.S. Lawmakers Unveil CLARITY Act Regulating Digital Assets

June 10, 2025

Categories

  • Bitcoin (4,214)
  • Blockchain (10,148)
  • Crypto (8,074)
  • Dark Web (339)
  • DeFi (7,801)
  • Ethereum (4,217)
  • Metaverse (6,116)
  • Monero (193)
  • NFT (741)
  • Solana (4,793)
  • Web3 (18,927)
  • Zcash (430)

Category

Select Category

    Advertise

    Advertise your site, company or product to millions of web3, NFT and cryptocurrency enthusiasts. Learn more

    Useful Links

    Advertise
    DMCA
    Contact Us
    Privacy Policy
    Shipping & Returns
    Terms of Use

    Resources

    Exchanges
    Changelly
    Web3 Jobs

    Recent News

    VIRTUAL Rallies Ahead of First Ethereum-Based AI Agent Launch

    VIRTUAL Rallies Ahead of First Ethereum-Based AI Agent Launch

    June 15, 2025
    Is it the future of finance?

    Is it the future of finance?

    June 15, 2025

    ยฉ 2022 Altszn.com. All Rights Reserved.

    No Result
    View All Result
    • Home
      • Home โ€“ Layout 1
      • Home โ€“ Layout 2
      • Home โ€“ Layout 3

    ยฉ Altszn.com. All Rights Reserved.

    • pinksalePinkSale (PINKSALE) $ 254.66
    • pinksalePinkSale (PINKSALE) $ 254.66
    • tokenbot-2tokenbot (CLANKER) $ 25.38
    • tokenbot-2tokenbot (CLANKER) $ 25.38
    • bridged-usd-coin-scrollBridged USD Coin (Scroll) (USDC) $ 0.998490
    • bridged-usd-coin-scrollBridged USD Coin (Scroll) (USDC) $ 0.998490
    • waterneuronWaterNeuron (WTN) $ 0.215986
    • waterneuronWaterNeuron (WTN) $ 0.215986
    • covalent-x-tokenCovalent X Token (CXT) $ 0.027190
    • covalent-x-tokenCovalent X Token (CXT) $ 0.027190
    • omisegoOMG Network (OMG) $ 0.180557
    • omisegoOMG Network (OMG) $ 0.180557
    • shardusShardus (ULT) $ 0.057495
    • shardusShardus (ULT) $ 0.057495
    • wen-4Wen (WEN) $ 0.000035
    • wen-4Wen (WEN) $ 0.000035
    • hooked-protocolHooked Protocol (HOOK) $ 0.096164
    • hooked-protocolHooked Protocol (HOOK) $ 0.096164
    • layerzero-bridged-usdc-aptosLayerZero Bridged USDC (Aptos) (ZUSDC) $ 1.00
    • layerzero-bridged-usdc-aptosLayerZero Bridged USDC (Aptos) (ZUSDC) $ 1.00
    • zoraZora (ZORA) $ 0.007979
    • zoraZora (ZORA) $ 0.007979
    • magpieMagpie (MGP) $ 0.052652
    • magpieMagpie (MGP) $ 0.052652
    • cdaicDAI (CDAI) $ 0.024618
    • cdaicDAI (CDAI) $ 0.024618
    • genius-aiGENIUS AI (GNUS) $ 2.02
    • genius-aiGENIUS AI (GNUS) $ 2.02
    • saucerswapSaucerSwap (SAUCE) $ 0.030397
    • saucerswapSaucerSwap (SAUCE) $ 0.030397
    • bbachainBBAChain (BBA) $ 0.158625
    • bbachainBBAChain (BBA) $ 0.158625
    • sceptre-staked-flrSceptre Staked FLR (SFLR) $ 0.025650
    • sceptre-staked-flrSceptre Staked FLR (SFLR) $ 0.025650
    • infrafred-bgtInfrared BGT (IBGT) $ 2.38
    • infrafred-bgtInfrared BGT (IBGT) $ 2.38
    • radio-cacaRadio Caca (RACA) $ 0.000061
    • radio-cacaRadio Caca (RACA) $ 0.000061
    • advertise-coinAdvertise Coin (ADCO) $ 0.552567
    • advertise-coinAdvertise Coin (ADCO) $ 0.552567
    • neonNeon (NEON) $ 0.103410
    • neonNeon (NEON) $ 0.103410
    • earthmetaEarthMeta (EMT) $ 0.012291
    • earthmetaEarthMeta (EMT) $ 0.012291
    • game-stopGME (Ethereum) (GME) $ 0.000060
    • game-stopGME (Ethereum) (GME) $ 0.000060
    • gxchainGXChain (GXC) $ 0.326641
    • gxchainGXChain (GXC) $ 0.326641
    • morphwareMorphware (XMW) $ 0.031235
    • morphwareMorphware (XMW) $ 0.031235
    • gyroscope-gydGyroscope GYD (GYD) $ 1.00
    • gyroscope-gydGyroscope GYD (GYD) $ 1.00
    • ahatokenAhaToken (AHT) $ 0.003649
    • ahatokenAhaToken (AHT) $ 0.003649
    • aegis-yusdAegis YUSD (YUSD) $ 0.999769
    • aegis-yusdAegis YUSD (YUSD) $ 0.999769
    • alien-worldsAlien Worlds (TLM) $ 0.004137
    • alien-worldsAlien Worlds (TLM) $ 0.004137
    • heimaHeima (HEI) $ 0.312376
    • heimaHeima (HEI) $ 0.312376
    • milady-cult-coinMilady Cult Coin (CULT) $ 0.000552
    • milady-cult-coinMilady Cult Coin (CULT) $ 0.000552
    • spring-staked-suiSpring Staked SUI (SSUI) $ 2.90
    • spring-staked-suiSpring Staked SUI (SSUI) $ 2.90
    • step-financeStep Finance (STEP) $ 0.075233
    • step-financeStep Finance (STEP) $ 0.075233
    • limewire-tokenLimeWire (LMWR) $ 0.070058
    • limewire-tokenLimeWire (LMWR) $ 0.070058
    • avalon-2Avalon (AVL) $ 0.130219
    • avalon-2Avalon (AVL) $ 0.130219
    • scout-protocol-tokenScout Protocol Token (DEV) $ 0.026789
    • scout-protocol-tokenScout Protocol Token (DEV) $ 0.026789
    • dora-factory-2Dora Factory (DORA) $ 0.023903
    • dora-factory-2Dora Factory (DORA) $ 0.023903
    • laine-stakeLaine Staked SOL (LAINESOL) $ 183.30
    • laine-stakeLaine Staked SOL (LAINESOL) $ 183.30
    • o-intelligence-coinO Intelligence Coin (OI) $ 23,884,326.00
    • o-intelligence-coinO Intelligence Coin (OI) $ 23,884,326.00
    • optioOptio (OPT) $ 0.004199
    • optioOptio (OPT) $ 0.004199
    • automataAutomata (ATA) $ 0.040617
    • automataAutomata (ATA) $ 0.040617
    • noon-usnNoon USN (USN) $ 0.999751
    • noon-usnNoon USN (USN) $ 0.999751
    • lukso-token-2LUKSO (LYX) $ 0.777870
    • lukso-token-2LUKSO (LYX) $ 0.777870
    • coinmetroCoinmetro (XCM) $ 0.078580
    • coinmetroCoinmetro (XCM) $ 0.078580
    • jamboJambo (J) $ 0.146916
    • jamboJambo (J) $ 0.146916
    • guardians-of-the-sparkGuardians Of The Spark (GOTS) $ 0.358492
    • guardians-of-the-sparkGuardians Of The Spark (GOTS) $ 0.358492
    • minswapMinswap (MIN) $ 0.016533
    • minswapMinswap (MIN) $ 0.016533
    • stake-linkstake.link (SDL) $ 0.404257
    • stake-linkstake.link (SDL) $ 0.404257
    • camino-networkCamino Network (CAM) $ 0.071143
    • camino-networkCamino Network (CAM) $ 0.071143
    • port3-networkPort3 Network (PORT3) $ 0.047290
    • port3-networkPort3 Network (PORT3) $ 0.047290
    • pinksalePinkSale (PINKSALE) $ 254.66
    • pinksalePinkSale (PINKSALE) $ 254.66
    • tokenbot-2tokenbot (CLANKER) $ 25.38
    • tokenbot-2tokenbot (CLANKER) $ 25.38
    • bridged-usd-coin-scrollBridged USD Coin (Scroll) (USDC) $ 0.998490
    • bridged-usd-coin-scrollBridged USD Coin (Scroll) (USDC) $ 0.998490
    • waterneuronWaterNeuron (WTN) $ 0.215986
    • waterneuronWaterNeuron (WTN) $ 0.215986
    • covalent-x-tokenCovalent X Token (CXT) $ 0.027190
    • covalent-x-tokenCovalent X Token (CXT) $ 0.027190
    • omisegoOMG Network (OMG) $ 0.180557
    • omisegoOMG Network (OMG) $ 0.180557
    • shardusShardus (ULT) $ 0.057495
    • shardusShardus (ULT) $ 0.057495
    • wen-4Wen (WEN) $ 0.000035
    • wen-4Wen (WEN) $ 0.000035
    • hooked-protocolHooked Protocol (HOOK) $ 0.096164
    • hooked-protocolHooked Protocol (HOOK) $ 0.096164
    • layerzero-bridged-usdc-aptosLayerZero Bridged USDC (Aptos) (ZUSDC) $ 1.00
    • layerzero-bridged-usdc-aptosLayerZero Bridged USDC (Aptos) (ZUSDC) $ 1.00
    • zoraZora (ZORA) $ 0.007979
    • zoraZora (ZORA) $ 0.007979
    • magpieMagpie (MGP) $ 0.052652
    • magpieMagpie (MGP) $ 0.052652
    • cdaicDAI (CDAI) $ 0.024618
    • cdaicDAI (CDAI) $ 0.024618
    • genius-aiGENIUS AI (GNUS) $ 2.02
    • genius-aiGENIUS AI (GNUS) $ 2.02
    • saucerswapSaucerSwap (SAUCE) $ 0.030397
    • saucerswapSaucerSwap (SAUCE) $ 0.030397
    • bbachainBBAChain (BBA) $ 0.158625
    • bbachainBBAChain (BBA) $ 0.158625
    • sceptre-staked-flrSceptre Staked FLR (SFLR) $ 0.025650
    • sceptre-staked-flrSceptre Staked FLR (SFLR) $ 0.025650
    • infrafred-bgtInfrared BGT (IBGT) $ 2.38
    • infrafred-bgtInfrared BGT (IBGT) $ 2.38
    • radio-cacaRadio Caca (RACA) $ 0.000061
    • radio-cacaRadio Caca (RACA) $ 0.000061
    • advertise-coinAdvertise Coin (ADCO) $ 0.552567
    • advertise-coinAdvertise Coin (ADCO) $ 0.552567
    • neonNeon (NEON) $ 0.103410
    • neonNeon (NEON) $ 0.103410
    • earthmetaEarthMeta (EMT) $ 0.012291
    • earthmetaEarthMeta (EMT) $ 0.012291
    • game-stopGME (Ethereum) (GME) $ 0.000060
    • game-stopGME (Ethereum) (GME) $ 0.000060
    • gxchainGXChain (GXC) $ 0.326641
    • gxchainGXChain (GXC) $ 0.326641
    • morphwareMorphware (XMW) $ 0.031235
    • morphwareMorphware (XMW) $ 0.031235
    • gyroscope-gydGyroscope GYD (GYD) $ 1.00
    • gyroscope-gydGyroscope GYD (GYD) $ 1.00
    • ahatokenAhaToken (AHT) $ 0.003649
    • ahatokenAhaToken (AHT) $ 0.003649
    • aegis-yusdAegis YUSD (YUSD) $ 0.999769
    • aegis-yusdAegis YUSD (YUSD) $ 0.999769
    • alien-worldsAlien Worlds (TLM) $ 0.004137
    • alien-worldsAlien Worlds (TLM) $ 0.004137
    • heimaHeima (HEI) $ 0.312376
    • heimaHeima (HEI) $ 0.312376
    • milady-cult-coinMilady Cult Coin (CULT) $ 0.000552
    • milady-cult-coinMilady Cult Coin (CULT) $ 0.000552
    • spring-staked-suiSpring Staked SUI (SSUI) $ 2.90
    • spring-staked-suiSpring Staked SUI (SSUI) $ 2.90
    • step-financeStep Finance (STEP) $ 0.075233
    • step-financeStep Finance (STEP) $ 0.075233
    • limewire-tokenLimeWire (LMWR) $ 0.070058
    • limewire-tokenLimeWire (LMWR) $ 0.070058
    • avalon-2Avalon (AVL) $ 0.130219
    • avalon-2Avalon (AVL) $ 0.130219
    • scout-protocol-tokenScout Protocol Token (DEV) $ 0.026789
    • scout-protocol-tokenScout Protocol Token (DEV) $ 0.026789
    • dora-factory-2Dora Factory (DORA) $ 0.023903
    • dora-factory-2Dora Factory (DORA) $ 0.023903
    • laine-stakeLaine Staked SOL (LAINESOL) $ 183.30
    • laine-stakeLaine Staked SOL (LAINESOL) $ 183.30
    • o-intelligence-coinO Intelligence Coin (OI) $ 23,884,326.00
    • o-intelligence-coinO Intelligence Coin (OI) $ 23,884,326.00
    • optioOptio (OPT) $ 0.004199
    • optioOptio (OPT) $ 0.004199
    • automataAutomata (ATA) $ 0.040617
    • automataAutomata (ATA) $ 0.040617
    • noon-usnNoon USN (USN) $ 0.999751
    • noon-usnNoon USN (USN) $ 0.999751
    • lukso-token-2LUKSO (LYX) $ 0.777870
    • lukso-token-2LUKSO (LYX) $ 0.777870
    • coinmetroCoinmetro (XCM) $ 0.078580
    • coinmetroCoinmetro (XCM) $ 0.078580
    • jamboJambo (J) $ 0.146916
    • jamboJambo (J) $ 0.146916
    • guardians-of-the-sparkGuardians Of The Spark (GOTS) $ 0.358492
    • guardians-of-the-sparkGuardians Of The Spark (GOTS) $ 0.358492
    • minswapMinswap (MIN) $ 0.016533
    • minswapMinswap (MIN) $ 0.016533
    • stake-linkstake.link (SDL) $ 0.404257
    • stake-linkstake.link (SDL) $ 0.404257
    • camino-networkCamino Network (CAM) $ 0.071143
    • camino-networkCamino Network (CAM) $ 0.071143
    • port3-networkPort3 Network (PORT3) $ 0.047290
    • port3-networkPort3 Network (PORT3) $ 0.047290