Some more testing of our stratum server today. Realised our starting difficulty was too low. Fixed that.
Thanks to the tester today who spent an hour on our matrix chat patiently waiting while the starting difficulty issue was discovered.
Our matrix room https://matrix.to/#/#p2poolv2:matrix.org
We are tying some loose ends on the difficulty adjustment algorithm. Aiming to sort this out over the next couple of days.
Then PPLNS!! #hydrapool #p2pool
jungly
jungly.42@iris.to
npub1x0yw...9t7k
Rebooting P2Pool: https://github.com/pool2win/p2pool-v2
Notes (13)
Why #P2Pool? Am infographic by chatgpt


If you want to make profit, build a centralised service.
The corollary is the fun thing: If you are building a centralised service, you will need to make a profit.
The corollary is true because you need cap ex to maintain and secure a centralised service.
I am thinking of mining pools when I am thinking of such services.
Every machine has had the same history – a long record of sleepless nights and of poverty, of disillusions and of joys, of partial improvements discovered by several generations of nameless workers, who have added to the original invention these little nothings, without which the most fertile idea would remain fruitless. More than that: every new invention is a synthesis, the resultant of innumerable inventions which have preceded it in the vast field of mechanics and industry.
The author might as well be talking about #FOSS. But I think he's talking about all machinery, all software!
We have a new stratum server implementation in Rust over at P2Poolv2. Here's why:
1. CKPool is great, but it's complicated and it's written in C.. It is very hard to extend or change. I tried as part of hydrapool effort for 256 Foundation telehash. We ran into issues at load with our changes. Enough to tell me, we need something easier to maintain and extend.
2. C doesn't make it easy to use async programming model where a core is freed while a thread waits for IO. You can do it, but the code gets complicated quick. We wanted to use modern tools like Rust's async/await so we can maintain and extend the server in future.
3. DATUM is again in C. On top of that it's tied to Ocean's model of block template protocols that we don't need in hydrapool or P2Poolv2. Messing with C or to forking the project wasn't a road we wanted to go down on.
4. SV2. This was the closest to our plans and we first tried to use the SV1 components for our user case. However, the code base was more complicated than we expected. There's good reasons for it, SV2 is opinionated to serve the SV2 model and it kind of created issues for us as we wanted to just use the SV1 parts of it. nostr:nprofile1qqspsrz30aj0t9d3u49a9nnh3nxz5443z0j6fv2zd49s5sussvqsmvgppemhxue69uhkummn9ekx7mp0qythwumn8ghj7urvv43x2mtfdejkjunp9eu8j730w7ct6w and @gitgabe helped a lot, but in the end I took the opportunity to just dive in and write our own.
## So where are we now?
We have the server working. It replicates the CKPool behaviour as closely as possible. We have tested with cpuminer and bitaxes.
## Next steps:
We are running some load tests to compare our implementation to CKPool. Results coming soon.
We need to test our implementation with variety of firmware.
## How can you help?
You can help us test by pointing a machine for 5 minutes. That's all we need. We'll log the interaction and if there's any failures we can fix it using the logs. We will set something up soon and invite testers.
BTW, initial load tests are showing we are competitive with CKPool. Rust can be fast! 🚀🚀
The repo is here: https://github.com/pool2win/p2pool-v2/
Stratum server is under the startum crate.
Just want to add that building stratum server has directly informed how we want to disseminate block templates and shares on P2Poolv2. That's another post though.
Rust makes it very easy to write code that will be very hard to understand by someone else, including your future self.
One responsibility we have as rust programmers is to write code that'll be easy to understand.
Think before you write the prompt! Think about what the AI gave you, then have a cup of tea and think some more.
CTV on its own is not the solution P2poolv2 is looking for. It doesn't help in reducing in chain foot print that much and requires miners to exchange extra on chain information.
1. We need log n outputs to create a ctv tree of outputs.
2. When a miner spends his output, it needs to have the rest of the outputs of its siblings as other unspent outputs. The siblings then need to watch the chain to see which utxo they can spend and each utxo spend uses more on chain space as ctv outputs for siblings to spend.
All the of the above is complex and still eats block chain space like a monster.
Meh. We need something better.
As an MVP, p2poolv2 is using simple atomic swaps between sharechain with transactions and BTC.
https://blog.opdup.com/2025/02/04/rebooting-p2pool-for-bitcoin.html
#p2pool
Coming soon - vibe reading!
"Bitcoin is a movement of people" - Matt Odell
Eric Voskuil has something very similar in the past. Bitcoin lets us resist "by other means", where we share the risk.
Go Bitcoiners!
Exploring YakoHonne. Really nice interface, plus the attempts to "verified notes" is interesting too.
https://yakihonne.com/article/naddr1qq252nj4w4kkvan8dpuxx6f5x3n9xstk23tkyq3qyzvxlwp7wawed5vgefwfmugvumtp8c8t0etk3g8sky4n0ndvyxesxpqqqp65wpcr66x
First, a cult is the flipside of a wise crowd. The cult patterns seemed accurate, and I watched people applying the cult model to others over and over.
Any intense group, family, business, or team starts to resemble a cult, in little or larger ways.
It's a matter of degree. However, as soon as you spend your free time on someone else's project, you are essentially starting to slide down that slope.
I watched as entire groups went off the rails, unable to think straight or produce accurate results. There was a straight causal effect: as the group became more cult-like, they became more useless.
https://hintjens.wdfiles.com/local--files/books/social-architecture.pdf
Just asked chatgpt to look up p2pool-v2 repo and write a blog post about changes in the last two weeks.
Pasting verbatim below. The repo is at: https://github.com/pool2win/p2pool-v2
Over the past two weeks, the p2pool-v2 repository has seen significant updates aimed at enhancing its functionality, reliability, and integration with Bitcoin's network. Here's a summary of the key developments:
**1. Enhancements to Bitcoin Integration**
- **Bitcoin Difficulty Assessment**: A new function was introduced to retrieve Bitcoin's current network difficulty. This allows for real-time adjustments to mining operations, ensuring miners are working at appropriate difficulty levels.
- **Share Validation Against Bitcoin Difficulty**: Building upon the difficulty assessment, another function was added to verify if a submitted share meets the Bitcoin network's difficulty criteria. This ensures that only valid shares contribute to the mining process, maintaining the integrity of the pool.
- **Bitcoin Block Verification via RPC**: To bolster security and accuracy, a feature was implemented to verify Bitcoin blocks using Remote Procedure Call (RPC) methods. This allows the system to cross-check blocks against Bitcoin's blockchain, ensuring authenticity and consistency.
**2. Testing and Code Quality Improvements**
- **RPC Error Response Testing**: Comprehensive tests were added to handle potential RPC error responses. This proactive approach ensures that the system can gracefully manage and recover from errors, enhancing overall stability.
- **Configuration Testing**: A dedicated test for configuration settings was introduced. This ensures that any changes to the configuration do not inadvertently disrupt the system's functionality.
- **Dead Code Cleanup**: The codebase underwent a cleanup to remove redundant or unused code segments. This not only streamlines the code but also reduces potential points of failure, leading to a more efficient system.
**3. Network and Connectivity Enhancements**
- **Optional mDNS Implementation**: Multicast DNS (mDNS) was made optional, providing users with flexibility based on their network environments. This is particularly beneficial for setups where mDNS might cause conflicts or is unnecessary.
- **Connection Limits**: To prevent potential overloads and ensure fair resource distribution, connection limits were introduced. This ensures that no single user can monopolize the network resources, promoting a balanced mining environment.
These updates collectively enhance the p2pool-v2's robustness, security, and adaptability, reinforcing its position as a reliable platform for decentralized mining operations.
How is #p2pool managing payouts? The answer - anyway you want. We can say that because p2pool sharechain uses UTXO set, just like bitcoin and the sharechain transactions use bitcoin Script. The p2pool sharechain thus has a fully compatible bitcoin transaction system.
Our first goal is to provide atomic swaps (onchain) between p2pool sharechain and bitcoin. P2Pool pays a handful of miners and market makers from bitcoin coinbase, the other smaller miners sell their shares to the larger miners/market makers. We need this to avoid the coinbase size limit imposed by antminers.
I wrote a blog post describing this approach with some helpful images 😉
https://blog.opdup.com/2025/02/26/trading-shares-for-bitcoin-user-story.html
Potential scalable payout ideas:
1. Atomic swaps on LN a la boltz exchange
2. Swap shares for e-cash?
3. Atomic swaps via Ark providers?
I left the last two with question marks, cause I don't have a solid handle on them yet. Looking for help here to define and implement these! 😃