npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

handystratum

v0.1.0

Published

Stratum Server for HSD as a plugin

Downloads

9

Readme

HandyStratum

A segwit-capable stratum server on top of [hsd][hsd]. This is a hsd plugin which will run a stratum server in the same process as a hsd fullnode.

HandyStratum implements header generation from hsd.getBlockTemplate as well as the mask feature. Read more about mask in detail within ./docs/README.md

HandyMiner Team Donation Address (HNS): hs1qwfpd5ukdwdew7tn7vdgtk0luglgckp3klj44f8

HandyMiner Team Donation Address (BTC): bc1qk3rk4kgek0hzpgs8qj4yej9j5fs7kcnjk7kuvt

Usage

HandyStratum can be used as a hsd plugin.

Simply npm install handystratum within your hsd directory and run like:

$ hsd --plugins handystratum \
  --stratum-host :: \
  --stratum-port 3008 \
  --stratum-public-host pool.example.com \
  --stratum-public-port 3008 \
  --stratum-max-inbound 1000 \
  --stratum-difficulty 8 \
  --stratum-dynamic \
  --stratum-password=admin-pass
  --daemon

Additional notes on running/configuration can be found in ./docs/README.md and an example shell script is in ./run.sh

Cutting out the middleman

While having a stratum+fullnode marriage violates separation of concerns, it provides a benefit to large competitive miners: because it sits in the same process, there is no overhead of hitting/longpolling a JSON-rpc api to submit or be notified of new blocks. It has direct in-memory access to all of the data it needs. No getwork or getblocktemplate required.

It can also broadcast submitted blocks before verifying and saving them to disk (since we created the block and know it's going to be valid ahead of time).

Single point of failure?

There's nothing to say you can't have multiple hsd-nodes/stratum-servers behind a reverse/failover proxy still. It's only a single point of failure if you treat it that way.

Payouts

Shares are currently tracked by username and will be dumped to ~/.hsd/stratum/shares/[height]-[hash].json when a block is found. A script can parse through these later and either add the user's balance to a webserver or pay directly to an address. Users are stored in a line-separated json file in ~/.hsd/stratum/users.json.

Administration

HandyStratum exposes some custom stratum calls: mining.authorize_admin('password') to auth as an admin and mining.add_user('username', 'password') to create a user during runtime.

Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work. </legalese>

License

Copyright (c) 2017-2018, Christopher Jeffrey (MIT License). Copyright (c) 2019, Handshake Alliance (MIT License). Copyright (c) 2021, HandyMiner: Alex Smith, Steven McKie, Thomas Costanzo (MIT License)

See LICENSE for more info.

hsd: https://github.com/hsd-org/hsd

HandyMiner-Goldshell-CLI: https://github.com/HandyMiner/HandyMiner-Goldshell-CLI HandyMiner-Goldshell-GUI: https://github.com/HandyMiner/HandyMiner-Goldshell-GUI