benjamin-wilson / public-pool Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
src/services/discord.service.ts:4:38 - error TS2460: Module '"discord.js"' declares 'GatewayIntentBits' locally, but it is exported as 'Snowflake'.
My node version is
v18.16.0
In fact got 2 errors in discord.js:
src/services/discord.service.ts:4:38 - error TS2460: Module '"discord.js"' declares 'GatewayIntentBits' locally, but it is exported as 'Snowflake'.
4 import { Client, Collection, Events, GatewayIntentBits, REST, Routes, SlashCommandBuilder, TextChannel } from 'discord.js';
~~~~~~~~~~~~~~~~~
node_modules/discord.js/typings/index.d.ts:105:3
105 GatewayIntentBits,
~~~~~~~~~~~~~~~~~
'GatewayIntentBits' is declared here.
src/services/discord.service.ts:4:63 - error TS2305: Module '"discord.js"' has no exported member 'Routes'.
4 import { Client, Collection, Events, GatewayIntentBits, REST, Routes, SlashCommandBuilder, TextChannel } from 'discord.js';
~~~~~~
Found 2 error(s).
Thx very much
How can I set a custom Difficulty ? wont let me do it.
Good day,
as someone reported some time ago, some miners, old miners I gather, aren't compatible with this wonderful pool.
In this case I'm talking about bfgminer 5.5.0 which I run on a Onion Omega 2+ (openwrt) with some old USB miners.
The "mining.authorize" message doesn't pass validation. I never used nextjs and not a Stratum expert but the only thing I noticed is that the message id in this case is not numeric, the "subscribe" one is.
What could be wrong with this message?
{"id": "auth", "method": "mining.authorize", "params": ["my Bitcoin address was removed", "x"]}
I tried to check the pool code for the validation performed but so far could only find the validation of the params section, based on the "mining.authorize" method.
In case somebody has an idea.
Thanks for the great work.
Hello Everyone,
I was trying to get this working and it seems like i was 90% there until i started the app using either NPM or Docker. It seems to start OK and i see RPC GetMiningInfo messages on the bitcoind side, which makes it seems like RPC auth is working and its doing something but after about 10 seconds, the process crashes with the below error.
NPM RUN START
DOCKER CONTAINER & DOCKER COMPOSE
When using Docker, the docker container is restarted about the same interval.
For Docker Compose, i also modified the yml to hard code 3333 and 3334 as requested
NPM RUN TEST
When I do an npm run test, i get the following
When I open the file in VS, i get the same error in the IDE
This was done on the latest ISO for Kali Linux, and I thought maybe this as a distro specific thing, so instead i tried it on a RHEL / Rocky 9 system, and it had the exact same issue.
The specs for the above tests are
Linux rocky 5.14.0-427.18.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 27 16:35:12 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
selinux = disabled
firewalld = stopped/disabled
npm = v8.19.4
podman = v4.9.4
bitcoind = v27.0
Is there a known issue with the process crashing after about 10 seconds? Its complaining that 3333 is already in use, but it must be something with the app not closing connections or something, because 3333 is definitely not in use when the pool isnt running. (Nothing else on the system using 3333/3334)
[root@rocky public-pool]# netstat -l
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
TIA!
if clients do not parse a btcaddress there shall be a number until this client gets blocked for a period of time. To reduce server load and potential attacks
I had my pool up and running and my miner was connected fine to it. Around the time my SSL certificate went live it stopped working. The following error now appears in the log:
Error getmininginfo Loading block index…
The website is still accessible and shows the public pool page, but I can't connect my miner to it anymore. Any advice?
Please use tags with version number in repository and make a release for any new tags (it will help debugging and maintain a pool operative)
You should remove your files .pem containing your private keys from the repo.
I noticed that public-pool is rejecting shares shortly after mining.set_difficulty sent to clients.
IMHO it should either accept shares until the current job completed or force clients to clear their queued jobs by sending a mining.notify with clearJobs:true.
It seems public-pool is sending a newMiningJob directly after mining.set_difficult in StratumV1Client.ts but not setting clearJobs always to true?
I (57564) asic_result: Job ID: 08, Nonce: ba25292e, Rolled_version: 038f4000, difficulty: 1008.37 of 1000.
I (57564) stratum_api: tx: {"id": 12, "method": "mining.submit", "params": ["bc1<cut>.Bitaxe", "f5906c", "00000000", "663c8e8a", "ba25292e", "038f4000"]}
I (57784) stratum_task: rx: {"id":12,"error":null,"result":true}
I (57784) stratum_task: message result accepted
I (64484) stratum_task: rx: {"id":null,"method":"mining.set_difficulty","params":[4096]}
I (64494) stratum_task: Set stratum difficulty: 4096
I (64904) stratum_task: rx: {"id":null,"method":"mining.notify","params":["f59542","d8b0073210a83420ef9fa7c03d83f9156570b1eb0002e9350000000000000000","02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1703b2db0c5075626c69632d506f6f6c","ffffffff0274596b1300000000160014979f36b9a92622b82767820f6477bdefc03e86b70000000000000000266a24aa21a9edd9c23bfadacb01ec4f486c637528e6cc443086dbe0050cc081e025140a0e278900000000",["f416380f36320c042e91c9586b548217f3aef77c55100954392148b45bffb5de","7d4f8f9cfba175de654d4e221049e9d9edcdac95ed18cf13bb6c6976273f2975","59432687b61e8a546586b1169e67ad5e717cc9931f9da9a8ccaf5d6fd58dcc6f","920bf1ac9595747fbacfa28648246a85994e9dd933deca79d03b9a40078b0271","bb3a9ea59771da758d84d02cf1c877c550ac0c43409c2146993f319c43260d9f","5ee1787d34a81100f2d96bbc53ba23a8812cd4ee434d2eeecb9bc0a0b5dea719","1a4d7e346cab3076e97d4f87a7dc44593a1b760c8ff332c477bb55ddfba46770","a804510374eb8de396f6b1d0603791b66bd0712d71befa09b99cf59382206b2f","28e37a258dd9a8084a85c86b9ef1bb5a1cb49ebeb62777299f5cb6f2c0d76609","ad7acb86bfefcbe09c0affd2004d78cabf6fba3bb74f1d102a30ea4f875c8547","b5f708bd7dec0e6ea880e2b696fa0aa7fa220f6c69165a9a1cc9a9d58ca3a50a","d656c366adacf3bc43783f760aee2f9cc3c7d8b702b3c8c80ec87baa46925159","707a84dbd2080530afa87583813a615c90b502cab10380478d88895272293902"],"20000000","170331db","663c8ec6",false]}
I (65014) stratum_task: New Work Enqueued f59542 (queue 2/2)
I (71414) asic_result: Job ID: 08, Nonce: cc4f5864, Rolled_version: 047fa000, difficulty: 6774.92 of 1000.
I (71414) stratum_api: tx: {"id": 13, "method": "mining.submit", "params": ["bc1<cut>.Bitaxe", "f5906c", "00000000", "663c8e8a", "cc4f5864", "047fa000"]}
I (71654) stratum_task: rx: {"id":13,"error":null,"result":true}
I (71654) stratum_task: message result accepted
I (83654) asic_result: Job ID: 08, Nonce: a4f52d15, Rolled_version: 05536000, difficulty: 3529.02 of 1000.
I (83664) stratum_api: tx: {"id": 14, "method": "mining.submit", "params": ["bc1<cut>.Bitaxe", "f5906c", "00000000", "663c8e8a", "a4f52d15", "05536000"]}
I (83944) stratum_task: rx: {"id":14,"result":null,"error":[23,"Difficulty too low",""]}
E (83944) stratum_task: message result rejected
I (102244) asic_result: Job ID: 08, Nonce: 944bdabd, Rolled_version: 06956000, difficulty: 5469.68 of 1000.
I (102244) stratum_api: tx: {"id": 15, "method": "mining.submit", "params": ["bc1<cut>.Bitaxe", "f5906c", "00000000", "663c8e8a", "944bdabd", "06956000"]}
I (102474) stratum_task: rx: {"id":15,"error":null,"result":true}
I (102484) stratum_task: message result accepted
I (105524) asic_result: Job ID: 08, Nonce: 6f5f83d7, Rolled_version: 06ce4000, difficulty: 1774.95 of 1000.
I (105524) stratum_api: tx: {"id": 16, "method": "mining.submit", "params": ["bc1<cut>.Bitaxe", "f5906c", "00000000", "663c8e8a", "6f5f83d7", "06ce4000"]}
I (105754) stratum_task: rx: {"id":16,"result":null,"error":[23,"Difficulty too low",""]}
E (105754) stratum_task: message result rejected
adding over all best diff found that persists upon restart of pool
H:\public-pool>npm run test
[email protected] test
jest
FAIL src/models/StratumV1Client.spec.ts
● Test suite failed to run
src/models/StratumV1Client.spec.ts:129:13 - error TS2345: Argument of type 'PromiseSocket<any>' is not assignable to parameter of type 'Socket'.
Type 'PromiseSocket<any>' is missing the following properties from type 'Socket': pause, resetAndDestroy, resume, setNoDelay, and 56 more.
129 promiseSocket,
~~~~~~~~~~~~~
PASS src/models/stratum-messages/MiningSubmitMessage.spec.ts (5.848 s)
PASS src/controllers/address/address.controller.spec.ts (5.933 s)
PASS src/controllers/client/client.controller.spec.ts (7.976 s)
Test Suites: 1 failed, 3 passed, 4 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 8.526 s
Ran all test suites.
H:\public-pool>
Hi,
Since the last downtime of VKBIT I
I'm having issues with the Cloudflare [“Verifying you are human”] . I retrieve the stats via HomeAssistant and it stopped working because of that. Can you maybe adjust the security settings?
is there any block stats from pool?
or if we hit a block , any notify to us?
The pool seems to have crashed after two days of mining.
The nerdminer is in version 1.5.2
Received from 48eeaff9 {"id": 1, "method": "mining.subscribe", "params": ["NerdMinerV2"]}
Received from 48eeaff9 {"id": 2, "method": "mining.submit", "params": ["","adb","","64bf365f","125a5"]}
/home/leo/public-pool/src/models/StratumV1Client.ts:369
console.log(`DIFF: ${submissionDifficulty} of ${this.sessionDifficulty} from ${this.clientAuthorization.worker + '.' + this.extraNonceAndSessionId}`);
^
TypeError: Cannot read properties of undefined (reading 'worker')
at StratumV1Client.handleMiningSubmission (/home/leo/public-pool/src/models/StratumV1Client.ts:369:113)
at StratumV1Client.handleMessage (/home/leo/public-pool/src/models/StratumV1Client.ts:236:47)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Show best difficulty per worker over all sessions and not only per one session
Пожалуйста добавьте в DASHBOARD пула информацию о выплатах (когда она происходят и какая минимальная сумма) , добавить баланс и дату выплат/начислений и калькуляцию для приблизительного подсчёта прибыли.
Some issue with startum method mining.authorize. cpuminer-opt
sends more parameters and is rejected by public-pool.io. I am not sure why it sends more parameters, maybe that is for newer version of stratum protocol.
cpuminer-opt can mine in ckpool.org, it is not rejected...
accepted by all pools:
{"id": 2, "method": "mining.authorize", "params": ["1Bkg23fU9EnazGw2yyYVwQKHmjq1MRsEx4.TEST", "x"]}
rejected by public-pool.io:
{"id": 2, "method": "mining.authorize", "params": ["1Bkg23fU9EnazGw2yyYVwQKHmjq1MRsEx4.TEST", "x", ["s2", "b"]]}
Details are described in this issue
Suggestion to display 2 hour average hash rate for the single workers as it is displayed in the summary graph.
Unfortunately the only log line I got was this repeating endlessly, as everything before it was lost:
Error: Cannot write to closed or ended socket. 1ad1fe36 {"id":93,"error":null,"result":true}
It eventually ended with more standard logs:
public-pool | Error: Cannot write to closed or ended socket. c5b287f0 {"id":86,"error":null,"result":true}
public-pool |
public-pool | Error: Cannot write to closed or ended socket. 2f5c627c {"id":339,"error":null,"result":true}
public-pool |
public-pool | Killing dead clients
public-pool | Killing dead clients
public-pool | Client b5b59ed0 disconnected, hadError?:true
Cause:
Trying to add Public Pool to my node package software (Parmanode)...
I got it working on Mac no problem.
But on a Pi4, same install script, the build command fails.
docker build -t public_pool .
...
...
parman@parmanodl:~/pool $ npm audit fix
up to date, audited 987 packages in 8s
148 packages are looking for funding
run npm fund
for details
request *
Severity: moderate
Server-Side Request Forgery in Request - GHSA-p8p7-x288-28g6
Depends on vulnerable versions of tough-cookie
fix available via npm audit fix --force
Will install [email protected], which is a breaking change
node_modules/request
request-promise-core *
Depends on vulnerable versions of request
node_modules/@cypress/request-promise/node_modules/request-promise-core
node_modules/request-promise-core
@cypress/request-promise *
Depends on vulnerable versions of request-promise-core
node_modules/@cypress/request-promise
node-telegram-bot-api >=0.64.0
Depends on vulnerable versions of @cypress/request-promise
node_modules/node-telegram-bot-api
request-promise-native >=1.0.0
Depends on vulnerable versions of request
Depends on vulnerable versions of request-promise-core
Depends on vulnerable versions of tough-cookie
node_modules/request-promise-native
rpc-request <=4.0.10
Depends on vulnerable versions of request
Depends on vulnerable versions of request-promise-native
node_modules/rpc-request
rpc-bitcoin *
Depends on vulnerable versions of rpc-request
node_modules/rpc-bitcoin
tough-cookie <4.1.3
Severity: moderate
tough-cookie Prototype Pollution vulnerability - GHSA-72xf-g2v4-qvf3
fix available via npm audit fix --force
Will install [email protected], which is a breaking change
node_modules/tough-cookie
8 moderate severity vulnerabilities
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Can I ask you to replace Bitcoin Core with Bitcoin Knots so that mined blocks would not include spam, please?
Bitcoin Knots: https://github.com/bitcoinknots/bitcoin
In order to show all our stats from public pool to the Miningpoolstream website we need the follwing Data available for them to fetch:
pool hashrate , miners , fee , height , blocks_found*
Could the stats page be adjusted in a way to show the historic status for an address when the miner is not mining ? Currently if the miner is offline it is not possible to see the historical mining data for a specific address.
Ist it possible to add TLS 1.3? I opened an issue at cromites repo and they that TLS 1.3 is not active.
im facing problems with CGMiner mining on public-pool.
Problem is a regular session reset on public pool.(see below CGMiner Log).
There is no difference if i try public-pool.io or the pool i run locally.
Problem is not only on the avalon nano its also on a raspi running cgminer.
Other pools are working fine like ckpool.
{'STATUS':[{'STATUS':'S','When':0,'Code':11,'Msg':'Summary','Description':'cgminer 4.11.1'}],'SUMMARY':[{'Elapsed':2974,'MHS av':2910700.26,'MHS 5s':4720809.29,'MHS 1m':4094750.72,'MHS 5m':3410408.06,'MHS 15m':3006414.64,'Found Blocks':0,'Getworks':81,'Accepted':383,'Rejected':0,'Hardware Errors':2,'Utility':7.73,'Discarded':0,'Stale':10,'Get Failures':9,'Local Work':1162,'Remote Failures':0,'Network Blocks':3,'Total MH':8655355512.0000,'Work Utility':40662.01,'Difficulty Accepted':1955840.00000000,'Difficulty Rejected':0.00000000,'Difficulty Stale':75776.00000000,'Best Share':1379356,'Device Hardware%':0.0001,'Device Rejected%':0.0000,'Pool Rejected%':0.0000,'Pool Stale%':3.7298,'Last getwork':
Hello, is there a way to put the hash rate in common rather than solo on your implementation?
Small error, I'm not sure if the error is related to public pool or not.
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
When this error happens, my Bitaxe has restarted as well as the Docker container of the pool server. Cannot tell what is first or what causes this. It happened twice within 2-3 weeks. Maybe this should be catched.
Error getblocktemplate: Error: ESOCKETTIMEDOUT
/public-pool/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js:13
throw err;
^
Error: Error getblocktemplate
at BitcoinRpcService.getBlockTemplate (/public-pool/dist/services/bitcoin-rpc.service.js:114:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.16.1
Description:
To enhance security and align with best practices for bitcoind configurations, the implementation of importing/read the rpccookiefile for bitcoind is preferred over using traditional username/password authentication.
Problem:
Several tools, including corelíghthing, fulcrum, electrs, and others utilized in my Bitcoin full node, employ the rpccookiefile for enhanced security. However, there is an issue with integrating public-pool into this configuration as it lacks support for the rpccookiefile.
Proposed Solution:
Enable public-pool to utilize the rpccookiefile for bitcoind RPC authentication, allowing seamless integration with the security measures employed by other tools in the Bitcoin full node ecosystem.
I would love it if I could add Monero, or have a version for Monero.
:-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.