Add parasite block template analysis #58
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
haspr
help wanted
invalid
javascript
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
parasitepool/parastats!58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "parasite-stratum"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements live block template analysis from Parasite pool.
Key Features
parasite.wtf:42069with auto-reconnection/templatepage displaying latest mining notificationsTechnical Changes
lib/stratum-collector.ts- TCP client with exponential backoffapp/template/page.tsx- Live block template viewerapp/api/stratum/route.ts- REST API for stratum datastratum_notificationstablebitcoinjs-libfor transaction parsingComponents Added
Database Schema
added the db directory to be able to use env variable to help with issue #57
@ -0,0 +13,4 @@```typescriptconst authorizeMsg = {method: "mining.authorize",params: ["1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", "x"] // Bitcoin address + "x"x is 'password' not concatenated with username. No change required, just documenting for future reference.
@ -0,0 +1,408 @@import net from 'net';If you move the notification.id to a field other than id you could use a SERIAL type for id and forgo needing an index on created_at. Also, aren't notifications a bit spammy, how much traffic and deletion records were you seeing with this, does it impact performance since it is only working in-memory?
@ -0,0 +1,408 @@import net from 'net';okay, that makes sense. I pushed some changes, but don't have time to test right now. Will try to do so tomorrow
@ -0,0 +1,410 @@"use client";If this is our testing placeholder address
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNawe should replace it with some indicator that this will be the users address. Currently it isn't intuitive that their output is being paid directly to the user.Same for our lightning deposit address
bc1qkgef7pl8vdrtuc4wk8fssycz366xp5ukzsm8gpwhich should be appended with(lightning deposit address)@ -0,0 +1,410 @@"use client";Took me awhile to figure out what is going on here, but I see now. So that address is actually whatever address is used to connect to the stratum server. I am using 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa or satoshi's address just to connect, while it looks like like stratum.work uses 1FfmbHfnpaZjKFvyi1okTjJJusN455paPH which is silk road...what its really saying is the address that is connected would get the 1btc reward if it found it, so I will update that and actually not show the address. I understand now
okay, i think i have those changes in there now
@ -0,0 +1,410 @@"use client";Exactly! It can be a bit disorienting at first as you have to remember that the template you receive is based on your username that you send us. :D
lgtm, may have a few nits for another time, but it appears to be rtm