-
Notifications
You must be signed in to change notification settings - Fork 2
Home
- Aion Pool particularities
- Configuring data source
- Sending payouts
- Multiple kernel connections
- Minimum payment
On blockchains that use Proof-of-Work for finding new blocks, miners will solve complex problems (usually given by a defined algorithm) in order to find the block solution which needs to be smaller than a calculated/given difficulty (by the kernel). In time, finding blocks gets harder and harder for single miners. In order to solve this problem, miners can unite into a mining pool.
Pool mining is the action of multiple miners joining their hashing power in order to find blocks faster (as a pool) and then splitting the rewards. The way the reward is split is defined by certain algorithm which each individual pool can implement based on their decision of which is better to attract miners.
Mining pools usually work by accepting both small and big miners. In order to open mining even for the smallest miner, pool implement what is called a variable difficulty. Variable difficulty can be static (which are more difficulties pre-defined by pools that can be accessed individually using different ports) or dynamic. Variable difficulty (dynamic) is usually an algorithm implemented by the pool which, based upon a configuration, will try to enforce a miner to send solutions every X (defined) seconds.
A step-by-step working of the pool is defined as follows:
- pool starts, connects to the kernel
- pool accepts connections from miners
- pool asks the kernel for the current block template
- pool notifies the miners with the current block template
- miners calculate solutions (based upong the PoW algorithm)
- miners send solutions to the pool (can be incorrect for the current difficulty of the network)
- pool verifies if the solution can be a block
- pool sends the block to the kernel, receives reward
- pool splits reward with miners
Aion Pool is a clone from Miningcore , therefor it shares some specific implementations of algorithms:
Reward split: Pay-per-last-n-shares Stratum support (protocol for communicating with miners) certain configurations and implementations for variable difficulty, banning, etc. Aion as a blockchain defines following implementations: Proof-of-Work: Equihash Block hashing: Blake2b
Datasource has to be configured in order for Aion Pool to work.
This example is part of the aion_pool.json.
Note that in cluster mode there should be one database and just the master node connects to it.
"persistence": {
"postgres": {
"host": "127.0.0.1",
"port": 5432,
"user": "miningcore",
"password": "password",
"database": "miningcore",
"connectionString":
"Server=localhost;Port=5432;Database=miningcore;User
Id=miningcore;Password=password;"
}
},
Aion Pool offers the possibility of making payments towards the user with one the two methods;
- Account unlock using the password - this method required the keystore to be stored in the kernel to which the pool connects to and the password
- private key - taken from the configuration
Account unlock using the password configuration example:
"paymentProcessing": {
"enabled":true,
"minimumPayment": 0.1,
"payoutScheme":"PPLNS",
"payoutSchemeConfig": {
"factor": 2.0
},
"accountPassword":"asd",
"keepTransactionFees":true,
"minimumConfirmations": 1,
"nrgFee": 0.0001,
"minimumPeerCount": 1,
"privateKey":"",
"sendTransactionsUsingPrivateKey":false
Private key configuration example:
"paymentProcessing": {
"enabled":true,
"minimumPayment": 0.1,
"payoutScheme":"PPLNS",
"payoutSchemeConfig": {
"factor": 2.0
},
"accountPassword":"asd",
"keepTransactionFees":true,
"minimumConfirmations": 1,
"nrgFee": 0.0001,
"minimumPeerCount": 1,
"privateKey":"0xd5eb17ee2caf92f207735344332c4f369b8ddac2da4daed695b2434a9627aca
046e01cd1f9a3ea325e6a47f0c3facf3a00797adb614c3ce61910a5716977d923",
"sendTransactionsUsingPrivateKey":true
Configuring multiple kernels can be done by adding multiple daemons in the configuration file. The way this works is that it's sending commands to all daemons configured and whichever one responds first, it will mark that as finished.
Example
"daemons": [
{
"host": "127.0.0.1",
"port": 8545,
"user": "",
"password": ""
},
{
"host": "127.0.0.1",
"port": 8546,
"user": "",
"password": ""
}
],
In the above example two AION daemons are running on localhost on port 8545 and 8546 respectively.
NOTE:
-
If using more than one aion kernel configured, the payout sending method of using unlock account (with password) might fail from time totime. Use the private key method.
-
The kernel consensus section (config.xml) must have the mining disable as show in the example:
<consensus>
<mining>false</mining>
<miner-address>0xa0a51ca53bd44ce95f73786fc6bd40d0f531b0ec3a639890d8e864a8c2c68e37</miner-address>
<cpu-mine-threads>1</cpu-mine-threads>
<extra-data>AION</extra-data>
<nrg-strategy>
<clamped-decay upper-bound="20000000" lower-bound="15000000"></clamped-decay>
</nrg-strategy>
</consensus>
Minimum payment is the amount which is used as a threshold for sending payout to miners. AION Pool offers the possibility to configure the (absolute) minimum payment in aion_pool.json (configuration file). Miners are also allowed to configure a higher minimum payment than the one defined by the pool. This would be set using the connection string to the pool.
Example
./miner --algo aion --server localhost --port 3333 --user0xa058a3d6d1594b380c5ed0ddb01330fd5806855aff68a8db221d89812d8e081b.miner1.10
(it is port of --user param describer as address
.workerName
.minPayment
)
In order for the miner minimum payment setting to work the following configuration needs to be changed:
enableMinerMinimumPayment: true
minimumPayment: 0.1
(this is the absolute minimum payment)