pocesar (OP)
|
|
July 26, 2013, 02:20:35 PM Last edit: September 09, 2013, 06:59:50 AM by pocesar |
|
It's built from scratch using dependency injection, D.R.Y. paradigm, event emitters and deferred/promises. https://github.com/pocesar/node-stratum- Defer and promise based code instead of callbacks (avoid callback hell)
- Simple but powerful API for managing both server and client
- Build-in support for spawn coins daemons (bitcoind, litecoind, etc) process and accept RPC calls
- Easy for you to add your own procedures do the RPC server (using expose)
- No need to worry about .conf files for the daemons, everything is passed through command line the best way possible (but you may override arguments)
- Optimized code reuse with class methods and dependency injection
- All classes based on EventEmitter by default (through the Base class)
- The client part make it easy, along with an RPC server, to setup your own farming pool for coins
- You can create a proxy from it using the Client interface, mix up Stratum with your own RPC definition and commands
- It's up to you to choose the logging module (like winston)
It's currently on active development, only missing the bitcoind control from the code, and then creation of the automated mocha tests, and should be ready to go. Preliminar tests showed it to be working well (with cpuminer and bfgminer, for example)
|
|
|
|
Saturn7
|
|
July 26, 2013, 09:04:24 PM |
|
Thank you! Been waiting for this for a while. 1 BTC tip sent!
|
First there was Fire, then Electricity, and now Bitcoins
|
|
|
pocesar (OP)
|
|
July 26, 2013, 09:22:16 PM |
|
Thank you! Been waiting for this for a while. 1 BTC tip sent!
thanks man, really appreciate it. I should finish the coind part by this weekend I think (along with forking the process with the proper command line parameters). after that, I will focus on testing every part of the server, using mocha and sinon (for mocks and stubs), and then try converting some python code for the stratum mine pool from slush to see how well it performs and add a benchmark to it as well. AFAIK, node is pretty good at handling connections, so I'm confident it will handle a large amount of data and connections per 'cluster'
|
|
|
|
|
pocesar (OP)
|
|
July 28, 2013, 01:50:24 PM |
|
hey jgarzik, I'm already following you on github thanks for the links, they are pretty important, mainly for the base58 that I didn't find in npm earlier! I'm at the moment finishing a hash address detector, simple quick and dirty way to detect which addresses belong. I've learned a lot from reading the bitcoinjs-server source, but couldn't make it work on Windows, unfortunately.
|
|
|
|
jgarzik
Legendary
Offline
Activity: 1596
Merit: 1099
|
|
July 28, 2013, 03:38:25 PM |
|
I've learned a lot from reading the bitcoinjs-server source, but couldn't make it work on Windows, unfortunately.
Hopefully node-libcoin will be a full replacement for bitcoinjs-server...
|
Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own. Visit bloq.com / metronome.io Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
|
|
|
pocesar (OP)
|
|
July 28, 2013, 04:27:51 PM |
|
I've learned a lot from reading the bitcoinjs-server source, but couldn't make it work on Windows, unfortunately.
Hopefully node-libcoin will be a full replacement for bitcoinjs-server... nice! the more light weight, the merrier. should focusing in making it modular and independent, but that work well together. I've created a pull request for the gyp binding to build base58 on windows.
|
|
|
|
|
|
Saturn7
|
|
July 31, 2013, 01:23:23 PM |
|
Nice work, gonning to try it out over the weekend.
|
First there was Fire, then Electricity, and now Bitcoins
|
|
|
pocesar (OP)
|
|
September 09, 2013, 06:58:22 AM |
|
Worked a bit on the project on this weekend, after a long pause working on it because of work
|
|
|
|
erk
|
|
January 17, 2014, 10:49:11 AM |
|
Anyone using it on a pool yet?
|
|
|
|
pocesar (OP)
|
|
January 27, 2014, 05:53:22 AM |
|
just updated it, when I have more spare time, I'll make 100% test coverage, only 2 parts to go.
|
|
|
|
|
pocesar (OP)
|
|
January 28, 2014, 01:15:57 AM Last edit: January 28, 2014, 02:18:38 AM by pocesar |
|
hey flangefrog, no idea, didn't even knew the existance of that repo. seems pretty new (first commit 21 days ago), so I'll check it out and report back
EDIT: It is a full fledged stratum pool, instead of stratum server and client module (my library have no pool funcionality whatsoever, its up to the developer to implement them). "stratum-pool" is more of a framework that is focused on building work to deliver to miners. although there are no tests or test coverage data for that library yet.
With my library, you can build pools, proxies, network endpoints for miners, etc, and implement in other types of libraries/frameworks, that aim to provide stratum support along with other functionalities, like a web interface, or other protocols, like X-Pushthrough. And I take stability and code congruence really seriously, along with tests and code coverage.
|
|
|
|
flangefrog
Newbie
Offline
Activity: 56
Merit: 0
|
|
January 28, 2014, 05:31:32 AM Last edit: January 28, 2014, 05:44:51 AM by flangefrog |
|
Thanks for your reply. I am going to start building a pool in a week or two. I am wanting to have multiple nodes in different locations to reduce latency to the miners. I assume I would run your code on each node, but would they be able to work together to solve the same block (so I would get a block more often with a lower hashrate)? I'm still learning how mining works.
I am going to be using CPPSRB for payments and build a custom frontend. Besides stuff like logging shares and making payments is there anything else cryptocoin related that I would need to build the pool? Basicly, can your project allow miners to connect, give me a way to log shares, and solve blocks. I'm a bit too busy right at the moment to try it out.
|
|
|
|
pocesar (OP)
|
|
April 09, 2014, 11:38:48 PM |
|
Soon I'm going to resume my work on the Proof of Concept using a really high performance solo mining endpoint using https://github.com/pocesar/node-stratum as the building block. the project is in https://github.com/pocesar/node-stratum-soloyou'll be able to create your own auto profit switching pool for example, or point all your ASICs to just one computer in the network, distributing correct unique work for your miners (and not dupe extra nonce, for example)
|
|
|
|
arruah
Legendary
Offline
Activity: 1357
Merit: 1004
|
|
April 10, 2014, 01:01:23 PM |
|
is it good to replace eloipool on my pool?
|
BCH
|
|
|
pocesar (OP)
|
|
April 12, 2014, 01:52:33 AM |
|
you could, but you would have to implement the users, shares, etc by yourself. I'm focusing on quality, well tested, stable code instead of feature rich but unstable code. downtime, instability, security and exploitable bugs are my main concerns, see how many exchanges and pools were hacked lately.
|
|
|
|
soulreafer
Full Member
Offline
Activity: 219
Merit: 100
CryptoCombat - Realtime NPC Fight Faucet
|
|
April 17, 2014, 04:05:22 PM |
|
possible that someone can explain how to build up a proxy with the client example. i tryed some with the net lib but i cant get it to work well
|
|
|
|
|