Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mining pool improvement, part II #100

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Rakni1988
Copy link
Contributor

@Rakni1988 Rakni1988 commented Feb 18, 2024

Current code running here http://yada.steadnet.net/

What's new:

POOL
- new way of calculating payouts for miners, two schemes to choose from (can be set in the configuration file)
PROP: the share sum between blocks found by the pool is calculated, the previous block found +1 to the currently paid block
PPLNS: the share sum is calculated in terms of the index of the paid block - 24 to the index of the paid block
- I added the ability to trigger the payment of a specific block index via HTTP
- I added the ability to set the number of confirmations before the block is paid out (can be set in the configuration file)
- I changed the way of distributing blocks, instead of blocks found by the pool we simply set a time interval (can be set in the configuration file)
- I moved the job refresh mechanism for miners to block_checker
- blocks found by the pool are saved to a separate database
- pool statistics are saved regularly to the database, so access to them via /pool-info is much faster
- I added a mechanism that remove from the database old pool statistics (older than 2 days) and miners' shares (older than 7 days)
- more statistics for miners
- UI update

NODE
- Masternode testing now takes place cyclically in the background, regardless of block generation by the pool, a list of succesyfuly_nodes from the previous test is downloaded for generation
	- the first test runs at node startup and saves the list
	- further tests every hour
	- in the case of a node with "pool" disabled in the configuration, we do not test masternodes at all
	- of course, I secured the testing call with "if LatestBlock.block.index >= CHAIN.PAY_MASTER_NODES_FORK:"
- new blocks are processed faster and sent to other connected nodes faster
	- after receiving a new block, we immediately send it to other connected nodes (blocked in the case of "synced = False")
	- additionally, we resend LatestBlock every 10 minutes
	- an additional condition that checks the index of the block and its hash, if the index is the same but the hash is different, we update the miners and send the updated block to the connected nodes
	- new consensus condition, if a block with the same "index" and "id" is already in the database, we do not process it
- other less significant changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant