Beam Open Source Pool

Raskul
6 min readJun 10, 2020

Proudly presented to the Beam mining community, an open source mining pool implementation. Evolved initially from s-nomp pool portal software, we have improved and evolved on it’s base code to bring a unique pool software which anyone can easily use. A full how-to install guide can be found at https://github.com/r45ku1/beam-mine/blob/master/README.md.

Also diverging from the built-in PPLNT mining rewards system normally found on s-nomp pool deployments, decisions were taken to build a brand new rewards mechanism, which we have named BASiC. A detailed explanation can be read about it, further in this article.

How your pool user interface will look after installation using the easy how-to guide;

As well as the code changes which are needed in the how-to install guide, there are also a few small changes you may want to make to the website files, to ensure that your own information shows correctly in your own pool user interface. Let’s go through these now;

On your pool server, navigate to /beam-mine/website/pages/
1. Use vim or nano to amend home.html — change your.pool.ip to specify your own pool DNS, as follows (lines 104 and 105):

2. Use a text editor (vim or nano or such like) to amend getting_started.html — change again your.pool.ip to specify your own pool DNS, in this section (line 318);

There are of course other parts of the website user interface that you may wish to amend, and you are free do so at your own discretion, all we ask is that you please leave the credits in the footer of your website, intact;

BASiC (The pool rewards mechanism)

The mechanism designed for use with the Beam Open Source Pool software is named BASiC (even though the pool was written in Javascript and the payout mechanism in Python — but let’s not split hairs over this minor technical divergence!). BASiC does exactly as it says, for miners using this open source software. Let’s go through how we derived the name BASiC;

BEAM

Designed specifically for mining Beam on the Open Source Pool Software which Beam Privacy has had developed for our mining community.

ANONYMOUS

The only collated information the pool needs to facilitate mining payments to the miners on your pool is a fully-private, never-expiring Beam address, which can be generated within your Beam wallet.

SHARES

Mining with your computer’s graphics processing unit (GPU) will collate shares in the pool and the pool assigns those shares with a value depending on the power of your GPU hashrate. The bigger the hashrate working at the pool for you, the closer you might get to each ‘block found’.

(INCENTIVISED) CALCULATION

Your shares are compiled as a percentage of the overall pool computational power. The more hashrate you push to the pool, the higher value your individual shares become.

How it all works…

YOUR HASHRATE
Your GPU Miner hashrate is shown on your WORKER PAGE (example) of the pool website. Your total hashrate will take a short while to ramp into the pool and immediate hashrate will average out correctly, over the length of your time mining at the pool.

YOUR SHARES
Your shares are collated by the pool from the sharediff function within the pool database. Higher GPU / Rig hash-rates commit higher difficulty shares to each block.

YOUR REWARDS
Your share of each block is an accumulative value from each share and proportionally divided amongst all miners of a block round within the overall pool sharediff calculations.

So What’s the INCENTIVISED part?

The individual blockfinder share (the specific share which calculates a Beam block) is significant whilst mining using the BASiC method and is of a higher value sharediff to the rest of the shares submitted in that block. This provides a variable ‘luck’ element which gives a variable bonus to the block-finding miner depending on the sharediff calculation of the block height. The block bonus is therefore calculated depending on the exact block calculation — the difficulty of the block and the individual share committed which found that block. So for example:

A snapshot from the database of an example Beam pool, where miners submit shares to the pool and the ‘sharediff’ of each job is logged in the database, corresponding to the anonymous userid of each miner.

In the screenshot above, the top two sharediff values are specific calculations of two different Beam blocks found by a pool running the open source pool software.
As you can see — these shares are higher than others because the miners who found them reached the exact block height calculation of these blocks and thus, found the blocks for the pool.
The percentage of the block calculations applicable to each miner is relative to the overall value of each miner account (userid) sharediff value and thus, the block finder has one singular more valuable share at time of block found, since that miner calculated the block, for the pool.
The bonus the block-found miner receives is therefore variable depending on the difficulty calculation of the block on the Beam network. The pool will attempt to collate each miner with at least one share of the work every ~7seconds.

POOL HOPPING

In the BASiC mining method, pool hopping is highly discouraged. The incentivised block reward which is paid to the block finding miner is made up partly of dropped shares by miners who drop out midway through a block round and partly due to the value of the blockfound share being higher. This is designed to encourage miners to stay on the pool.

PAYOUTS

Payouts are also handled differently to most other pools. Miners only need to point their rigs and let their mining run. Within the BASiC payment mechanism, payouts are automatically sent to miners as soon as the block is fully confirmed with 240 confirmations and will continue to attempt sending for up to 12 hours; giving your miners ample time to open their Beam wallets after the time of block confirmation. If the miner wallet is not open during this window of time, the pool operator will need to conduct a few manual steps to initiate the 12 hour payment window again. Let’s go through this;

In your database tables, find the table which corresponds to ‘payments’;

You will find any non-received payments showing similar as follows;

Failed payments will show transaction id (txid) as ‘NULL’ and status as ‘CANCELLED’

To reinitiate the payment (which again tries for 12 hours to send to the miner’s wallet) simply amend txid to “NULL” and statusCANCELLED” to “PENDING” as follows;

BASiC will again attempt the 12hr push transaction to your miner’s wallet

You can also amend this timeout to whichever time-window value you require in the BASiC code;
Use a text editor (vim or nano or such like) to amend auto_payment.py (located in folder /basic/) at line 240…

minutes=*** (use whichever time length in minutes)

this example shows 720minutes (12 hrs)

LINKS

https://github.com/r45ku1/beam-mine : Pool Software repository w/ install guide.

https://github.com/r45ku1/basic : BASiC Payment Processor repository w/ install guide.

https://pool.raskul.com : Working example of the Pool on the Beam mainnet.

--

--