Announcing BoomPoW v2 - The Next Generation of BANANO's Distributed Proof of Work System

Aug 11, 2022 6 min read

Today we're announcing BoomPoW v2, a complete rewrite, and redesign of the original BoomPoW protocol.

As we work to phase out the original BoomPoW, services and users will need to migrate to the new system as soon as possible.

Many services will be affected by the transition, read on for more info

BoomPoW v2 is Live Now

What is BoomPoW?

BoomPoW is a distributed proof of work system that provides PoW to numerous services on the BANANO and Nano networks. PoW is essentially a solution to a mathematical problem that requires a certain level of computational power, this is required for every single transaction on BANANO and Nano.

You can learn more about what BoomPoW is in the original announcement from 2019.

Why BoomPoW v2?

The original BoomPoW system was based on DPoW and while it served the community for many years, it often suffered periods of unavailability and downtime. It also taxes our infrastructure by being memory heavy, slow, and requiring an additional MQTT broker.

In addition to the performance and resource problems, it's also just complicated to setup.

  • Setting up a client requires specific python versions, a separate nano-work-server, and the majority of discussion in the #boom-pow channel on the BANANO discord revolves around just trying to get the thing to work.
  • Setting up a server is similarly extraordinarily complicated as it requires numerous dependencies and configurations. This deters most open source contributions and forks.

Implications of BoomPoW v2

BoomPoW has been the backbone for a large majority of transactions on BANANO and Nano, especially since Nano's original DPoW system has permanently gone offline.

Services using BoomPoW must migrate to BoomPoW v2 as soon as possible to avoid disruption

Phasing Out BoomPoW v1

The phase-out of the original BoomPoW system will happen over a period of 21 days, users of the original system may notice diminished performance immediately as contributors go offline. The phase-out will happen in stages:

Beginning Today

  • BoomPoW v2 goes live with a prize pool of 15,000 BAN per day, providers will receive a percentage of this pool every day based on the number of works contributed and the difficulty of the works contributed (higher difficulty = higher reward).
  • BoomPoW v1 prize pool will be cut in half to 5,000 BAN per day
  • Pippin 2.0.0 is available which adds support for BoomPoW v2 and removes support for the legacy BoomPoW

In approximately 7 Days

  • BoomPoW v1 prize pool will be cut in half to 2,500 BAN per day

In approximately 14 Days

  • BoomPoW v1 prize pool will be cut in half to 1,250 BAN per day

In approximately 21 Days

  • BoomPoW v1 will be completely shut down

Getting Started with BoomPoW v2

BoomPoW v2 is launching without a website, eventually, we will have a new website at https://bpow.banano.cc which will streamline the process to register for an account and perform the registration operations.

  1. The first thing to do is download the latest BoomPoW release for your platform
  2. Extract it to a location of your choosing

Providers (Get Paid for Contributing PoW)

If you are using windows, consider installing the Windows Terminal for a better experience.

The new provider experience requires creating an account and verifying your email address. The client will use GPU (OpenCL) for PoW generation if a GPU is detected, otherwise, it will use your CPU.

On Windows,

Open register-provider.bat and follow the prompts. Once complete, you should receive an email in which you will need to click the link to verify your email address. Once done, you can simply run boompow-client.exe to login and start contributing work.

On Linux or MacOS,

Download the BoomPoW client, and extract it to a location of your choosing. Then open Terminal and navigate to where you extracted the client

> cd ~/boompow-client # Wherever you downloaded boompow
> ./boompow-client -register-provider # Follow the prompts
> ./boompow-client # Once you have confirmed your email, this is it to start contributing

You can reference the README for more information about the client.

Services/Requesters (Request PoW from BoomPoW)

The new service experience is intended to be more streamlined.

  1. You'll register for an account
  2. You will be manually reviewed and receive a follow-up email once you are approved to request work.

On Windows,

Open register-service.bat and follow the prompts. Once complete, you should receive an email in which you will need to click the link.

When you are approved to use BoomPoW, you can open get-service-token.bat and follow the prompts to get an access key. This access key is then used to request work.

On Linux or MacOS,

Download the BoomPoW client, and extract it to a location of your choosing. Then open Terminal and navigate to where you extracted the client

> cd ~/boompow-client # Wherever you downloaded boompow
> ./boompow-client -register-service # Follow the prompts
> ./boompow-client -generate-service-token # Once you are approved, this will give you your token

Support

Eventually, this will be streamlined on a website (coming soon TM). In the meantime, if you need assistance getting setup please visit the BANANO Discord.

The BoomPoW client has some options such as benchmarking to test your setup, use ./boompow-client -help for a list of all of the options.

The Nitty Gritty of BoomPoW v2

BoomPoW v2 is written in GOLang. and released under the MIT License. The source code is available on GitHub.

If you're interested in the nerdy technical details of the new BoomPoW system and protocol, read on.

Rough Overview of How the System Works

Server

A big change to the system is that authentication is required for providers of work. The websocket service that clients connect to requires authorization. Currently , there are no restrictions on signing up to contribute, you just need to have a valid email address.

The server provides two things:

1.) GraphQL API

The GraphQL API is how the public interacts with BoomPoW. It provides various queries and mutations, including workGenerate, createUser, loginUser. It also provides a stats subscription that will periodically update stats regarding BoomPoW.

workGenerate requires a special authorization with a service token, that can be created after a service has been approved to use BoomPoW.

When a workGenerate request is made, the server:

  1. Ensures the request is valid
  2. Checks cache to see if work has already been generated that meets the specified difficulty, if so return from the cache.
  3. Generates a unique request_id
  4. Forwards the request to every connected client/worker
  5. Waits for responses from clients that include the same request_id
  6. If the work is invalid, it adds a flag to penalize the client that provided it
  7. If the work is valid, it issues work_cancel to every connected client. And sends the result over a channel to the GraphQL resolver to provide the result to the original requester.

2.) Websocket API

A proprietary websocket API is how clients/providers interact with the BoomPoW system. There is constant bidirectional communication between the server and clients regarding work.

Messages sent from server -> client include:

  1. work_generate - the actual work request that triggers clients to begin computing the PoW
  2. work_cancel - Cancels pending work requests that have already been completed by another client
  3. block_awarded - When a client "wins" a block, they receive this message which gives information about their current stake of the daily prize pool.

The client's primary message to the server is a ClientWorkResponse which includes the result of the computation, hash, and ID of the request.

Client

The BoomPoW client is dramatically different from the legacy BoomPoW. Like the server, it is also written in GOLang. It utilizes the module nanopow for actual work generation.

If the client is compiled with OpenCL, it will use the GPU for work requests if available, otherwise, it will use the CPU. (Multi-GPU setups are currently not supported). But be aware that not every GPU supports OpenCL.

Being written in GO allows for a much easier experience for providers. They simply need to run a pre-compiled binary on their machine and that's it. No Python, no nano-work-server, and no other dependencies.

The most interesting thing about the new client is the way it handles saturation.

When a work_generate request is received from the server:

  1. Add the request to a queue
  2. We then write to a buffered channel of configurable size, configured by -thread-count
  3. When this channel is read, it randomly retrieves a request from the queue and begins computation
  4. When finished, the result is sent to the server

The RandomAccessQueue data structure is intended to minimize the chance clients are working on the same unit of work at the same time.

What the Fork is Banano?

Banano is a cryptocurrency powered by DAG technology disrupting the meme economy. Banano has feeless and near-instant transactions, free & fair distribution, a highly active community, and active technical development!

Join the Banano Republic!

Official Website | Yellowpaper | Wiki

Join our social channels for updates & giveaways:
Discord | Twitter | Reddit | Youtube | Telegram | Instagram | Facebook | TikTok | Medium | Publish0x | Github | BitcoinTalk


Read More