Bitcoin Forum
December 03, 2016, 09:39:47 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 7 »  All
  Print  
Author Topic: [ANNOUNCE] ecoinpool - A brand new pool mining software written in Erlang  (Read 26790 times)
p2k
Jr. Member
*
Offline Offline

Activity: 33


Advancing ➤


View Profile WWW
December 30, 2011, 12:31:49 PM
 #1

About two months ago, I started writing my own pool mining software from scratch using Erlang and CouchDB. After hundreds of hours of development, it has finally reached beta-quality and is hereby released open source to the public. ecoinpool moves ahead in a new direction, so I'd like to call it the next generation pool mining software.

Feature headlines

  • Configuration completely through the database
  • No delays, no restarts, no polling, no SQL, no Java
  • Host multiple chains at once (Bitcoin, Namecoin, Litecoin and Fairbrix)
  • Merged mining supported for Bitcoin+Namecoin
  • Fast internal work creation with getmemorypool
  • Fault tolerant, self-restarting on crashes
  • Live shares monitoring through the browser
  • Prepares data for displaying statistics on the fly
  • Integrated web frontend, yet usable in existing websites
  • Built-in Block Monitor and Mini-Blockexplorer
  • Scales across multiple servers
  • Backwards compatibility layer to MySQL

Target audience

ecoinpool tries both to be easy enough for solo-mining setups and scalable and fast enough for large pools with multiple servers around the world.

Main links


About this project and Erlang

I always wanted to implement a large server project with the right tools. Erlang/OTP, a functional programming language and platform developed by Ericsson (nowadays open-source and community-driven), is the ultimate tool for this task. Some things that other languages or platforms can achieve only with tons of libraries are integrated right into the core language. Concurrency and inter-process communication are the pillars of Erlang, combined with a powerful pattern matching implementation which is typical for functional languages. Erlang is dynamically typed and allows reloading modules while the application is still running, allowing rapid development while reducing downtime to zero (if done correctly). A sophisticated error handling mechanism concludes this little features list.

Erlang has two things in common with Java: It is compiled to byte code and runs on a virtual machine. At this point the similarities end. Erlang requires only a fraction of Java's memory and CPU requirements and can scale from a single core desktop up to large clusters of multi-core servers. It has literally been built for that very reason. So, another part why I started this project is that a Java solution already exists and set the standard somewhat high. So I was wondering if I could write a software that can surpass it by using all of Erlang's powers against Java's weaknesses.

Other links


Coming soon

Actually it is "sooner or later", because ecoinpool has already consumed lots of my free time and I got other things to do now.

  • Remove requirement for CouchDB and integrate it's notification and replication features directly into ecoinpool
  • Configurable shares logging, support for other data sources for configuration and workers
  • More documentation
  • Better web frontend for the Mini-Blockexplorer
  • Include payout mechanisms in the software
  • Support for an external Coinbaser
  • Extend Block Monitor to a full Bitcoin client

Changelog

v0.3.10 - Jan 3, 2012
  • Implemented the ebitcoin configuration frontend

v0.3.9 - Jan 1, 2012
  • Added support for Fairbrix (getmemorypool patch required)
  • More dynamic block monitor/explorer to add new chains faster

v0.3.8 - Dec 31, 2011
  • Added support for Litecoin
  • Slightly improved web interface

v0.3.7 - Dec 30, 2011
  • First public release

Closing words

So far I have talked to wtfman/cuqa of btcserv.net (Germany) and Graet of ozco.in (Australia) and they said that they will give it a try within the next weeks. If you are a Bitcoin miner, better keep an eye on those pools.

ecoinpool is successfully running on Elitist Jerks (LiteCoin), set up in cooperation with WKNiGHT (USA).

I'm looking forward to your feedback. If you have questions about some aspects of ecoinpool or need help with installing and setting up, feel free to contact me in #ecoinpool on Freenode.

ecoinpool: AnnouncementHomepageGitHub
Support me: 1p2k1Fo7WzcuuLfFFfszCMhcjfxqevEqo
1480757987
Hero Member
*
Offline Offline

Posts: 1480757987

View Profile Personal Message (Offline)

Ignore
1480757987
Reply with quote  #2

1480757987
Report to moderator
1480757987
Hero Member
*
Offline Offline

Posts: 1480757987

View Profile Personal Message (Offline)

Ignore
1480757987
Reply with quote  #2

1480757987
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480757987
Hero Member
*
Offline Offline

Posts: 1480757987

View Profile Personal Message (Offline)

Ignore
1480757987
Reply with quote  #2

1480757987
Report to moderator
1480757987
Hero Member
*
Offline Offline

Posts: 1480757987

View Profile Personal Message (Offline)

Ignore
1480757987
Reply with quote  #2

1480757987
Report to moderator
shads
Full Member
***
Offline Offline

Activity: 224


View Profile WWW
January 03, 2012, 04:54:47 PM
 #2

Congrats on the release.  I've been out of action for a couple of months due to personal commitments and poolserverj support has suffered quite a bit as a result  and pushpool doesn't seem to be getting a lot of developer love lately either so I'm glad to see the pool engine scene get a bit of new life injected into it. 

Look forward to spending some time running up a test instance and checking it out.  I don't know the first thing about Erlang or CouchDb (actually the first time someone mentioned Erlang to me I thought they were yanking my chain).  Though I've been ass deep in Scala tutorials lately and had a vague idea to rewrite psj v0.5 in Scala to see how I could apply the functional paradigm.  Very interested to get to know the code a bit and investigate how it manages to be so lean on resources without sacrificing performance. 

PoolServerJ Home Page - High performance java mining pool engine

1LezqRatQz7MeNoCVziYwcdwtqeEbvrdAq - http://payb.tc/shads

Quote from: Matthew N. Wright
Stop wasting the internet.
p2k
Jr. Member
*
Offline Offline

Activity: 33


Advancing ➤


View Profile WWW
January 03, 2012, 08:21:37 PM
 #3

Thank you very much. I really like the idea of bringing some life into the scene. It's the competition that takes us to our limits and improves the overall quality of software to the benefit of everyone. You always need a little challenge to advance in your life.

Now, the reason why it's so lean on resources is, well, because it's not Java. And the reason why it performs so nice is because of Erlang's way of handling concurrency. Erlang comes with its own process scheduler; an Erlang process can be seen as a thread but is actually more lightweight than a regular operating system thread. There can be tens of thousands of Erlang processes at the same time without any significant performance loss, whereas on Java, every Thread is a little pain and a few hundred Java Threads can bring a system down to its knees.

Taken all the features of Erlang, the functional programming paradigm is imho more than ideal for developing realtime server applications. Plus, implementing a parser with any functional language is a piece of cake thanks to pattern matching. Erlang finally extends pattern matching to binaries, making it easy to use for any kind of binary network protocol like Bitcoin's. And if you do it right, your code will stay short and crisp and thus easy to maintain. Functional languages can be very powerful and expressive. Every line of code can be worth ten lines in other programming languages. On the other hand, every line will take you ten times as much to think about (well, if you're a perfectionist like me).

It's also worth to say that obeying to some basic programming principles can significantly improve the quality of your software: DRY - Do not Repeat Yourself. Work with encapsulation. Readability counts. Explicit is better than implicit. Flat is better than nested. Modularize where possible. Try unit tests and source code analyzers.

ecoinpool: AnnouncementHomepageGitHub
Support me: 1p2k1Fo7WzcuuLfFFfszCMhcjfxqevEqo
eleuthria
Legendary
*
Offline Offline

Activity: 1750


BTC Guild Owner


View Profile WWW
January 18, 2012, 03:59:59 PM
 #4

I'm going to keep an eye on this, maybe even offer some of BTC Guild's large-scale miners an option to help test it out.  PoolServerJ has worked great for me, but that memory footprint is huge.

R.I.P. BTC Guild, 2011 - 2015.
BTC Guild Forum Thread
rjk
Sr. Member
****
Offline Offline

Activity: 420


1ngldh


View Profile
January 18, 2012, 04:14:41 PM
 #5

If it is truly that scalable, then you could have tiny VPSes all over the world and one big DB server somewhere - thus making DDOS just that little bit harder for the idiot troublemakers that try to pull them off.

20 VPSes each with a gigbit connection somewhere in the world, all on a custom DNS rotation. That sounds like it could be a little fun to manage Grin

Mining Rig Extraordinaire - the Trenton BPX6806 18-slot PCIe backplane [PICS] Dead project is dead, all hail the coming of the mighty ASIC!
eleuthria
Legendary
*
Offline Offline

Activity: 1750


BTC Guild Owner


View Profile WWW
January 18, 2012, 04:52:23 PM
 #6

If it is truly that scalable, then you could have tiny VPSes all over the world and one big DB server somewhere - thus making DDOS just that little bit harder for the idiot troublemakers that try to pull them off.

20 VPSes each with a gigbit connection somewhere in the world, all on a custom DNS rotation. That sounds like it could be a little fun to manage Grin

Sadly that wouldn't stop it Sad.  I tried that in the past.  The problem with it is a VPS is much more likely to get blacklisted and suspended if targetted by an attack.  So the result of the DDoS would be a suspension of your services very quickly.  They wouldn't have to hold all your servers down at once, they'd just have to hold them down long enough for the VPS provider to turn it off, then move to the next one.

Not to mention a gigabit VPS where you're allowed to use the whole gigabit without overage charges is not that cheap ;p

However, that isn't saying that VPSes are bad.  They're quite useful in quickly scaling up/down for legit users.

R.I.P. BTC Guild, 2011 - 2015.
BTC Guild Forum Thread
p2k
Jr. Member
*
Offline Offline

Activity: 33


Advancing ➤


View Profile WWW
January 18, 2012, 08:26:40 PM
 #7

Hi eleuthria, hi rjk,

it's nice to have some discussion going on here. I've been thinking about this "federated" or "distributed" pools idea a lot, also got some input from various chats and other sources. Here are some problems and tentative solutions or thoughts that came up, feel free to add comments:

Workers

  • Sharing workers between servers is no problem if you have a database which offers replication
  • CouchDB is very good at this, syncing up changes in nearly realtime; after a server crashes and recovers, all changes which have been made are grabbed from peer servers; also it offers streaming changes to applications (like ecoinpool)
  • MySQL also has replication features, though I've never tried that out; polling for changes from the application would be required though
  • A custom database and replication engine for ecoinpool could also solve the task of worker sharing and would be even faster

Shares and Statistics

  • Besides worker configuration, all other pool services revolve around shares
  • Large pools have to handle shares in masses
  • CouchDB can easily get to its limit there and I wouldn't recommend it for shares storage anymore
  • Having a central database would produce a bottleneck or single point of failure; only a hidden dedicated server where only the shares database is running would be ok
  • The other option is to store & process shares on each server separately; however, this requires a mechanism to sum up the number of shares from each server and present them correctly to the user
  • Creating long-term statistics out of short-term shares is also not an easy task; yet this could again be achieved with replication-enabled databases like CouchDB as the amount of data is reduced greatly and record sets drop in comparatively slowly
  • Live monitoring is something really cool, everyone who experienced that in ecoinpool's testing phases instantly fell in love with it and wanted to keep it - but it relied on CouchDB which isn't built for monster rigs...
  • Work has started on an alternative way to provide live monitoring without CouchDB, but this gets complicated if multiple servers are involved
  • The current idea is to have a server-to-server protocol for shares announcement; like this, shares could be pushed via HTTP longpolling from any server to the user's browser

Daemons and Block Solves

  • Current pool website software (i.e. cron jobs) detect block solves by querying a coin daemon (bitcoind, namecoind, litecoind...)
  • This requires either to connect to all servers in order or having a central instance of the coin daemon or setting all daemons to the same payout address of the central server (currently not supported for namecoin)
  • ecoinpool, having a built-in block monitor, could do block solve detection by itself and publish the information somewhere (block hash, Tx ID, number of confirmations, etc.) leveraging the requirement of those cron jobs

Payout

  • Payout usually involve processing shares
  • If not done correctly, shares could be paid out more than once
  • First solution is again having a central shares database and payout
  • The alternative is to let each server manage their own presumably partial payout; this is a good decentralized solution but requires some server-to-server communication to make it convenient for the user
  • Different payout mechanisms put different demands on the shares database; not all payout mechanisms can be used in a decentralized way
  • Legacy systems rely on existing structures (e.g. cron jobs working on SQL databases)

ecoinpool: AnnouncementHomepageGitHub
Support me: 1p2k1Fo7WzcuuLfFFfszCMhcjfxqevEqo
rjk
Sr. Member
****
Offline Offline

Activity: 420


1ngldh


View Profile
January 19, 2012, 12:49:17 AM
 #8

Hmmmmm. I wonder how well this might be suited to creating p2pool "supernodes" or "minipools" that link in with p2pool, but provide normal (I.E., diff 1) work.

Mining Rig Extraordinaire - the Trenton BPX6806 18-slot PCIe backplane [PICS] Dead project is dead, all hail the coming of the mighty ASIC!
Graet
VIP
Legendary
*
Offline Offline

Activity: 980



View Profile WWW
January 22, 2012, 05:06:23 PM
 #9

Just started a live test of ecoinpool Cheesy
Huge thanks to p2k - he is a coding machine (and I mean that in the nicest possible way)

Please point some hashes there if you are able
http://test.ozco.in:8332 and http://test.ozco.in:80
shares are being counted in the main db and will be paid out as usual Cheesy

If you are not yet a member of Ozcoin go to https://ozco.in register and create a worker

**Important note** ecoinpool does not yet support merged mining so no NMC will be generated by miners here.

thanks,
Graeme

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
p2k
Jr. Member
*
Offline Offline

Activity: 33


Advancing ➤


View Profile WWW
January 22, 2012, 05:23:52 PM
 #10

Well, technically it does support merged mining but you cannot set a custom payout address for Namecoin yet (the getmemorypool coinbasing has to be implemented for that). Like this, the share processing scripts on ozcoin's main server would not be able to detect Namecoin blocks, because they depend on polling the local namecoind for generate transactions.

It all has to do with the multi-server setup of ozcoin, something that other pools usually don't have. If you run ecoinpool on a single site, merged mining is working fine.

PS: Thanks to all the ozcoin staff for supporting me and helping to set this up. This is the first real test in the Bitcoin world for ecoinpool.

ecoinpool: AnnouncementHomepageGitHub
Support me: 1p2k1Fo7WzcuuLfFFfszCMhcjfxqevEqo
Graet
VIP
Legendary
*
Offline Offline

Activity: 980



View Profile WWW
January 22, 2012, 05:30:21 PM
 #11

Well, technically it does support merged mining but you cannot set a custom payout address for Namecoin yet (the getmemorypool coinbasing has to be implemented for that). Like this, the share processing scripts on ozcoin's main server would not be able to detect Namecoin blocks, because they depend on polling the local namecoind for generate transactions.

It all has to do with the multi-server setup of ozcoin, something that other pools usually don't have. If you run ecoinpool on a single site, merged mining is working fine.

PS: Thanks to all the ozcoin staff for supporting me and helping to set this up. This is the first real test in the Bitcoin world for ecoinpool.
oops my bad, in the excitement of spreading the word Smiley

**Important note** Ozcoin using ecoinpool does not yet support merged mining so no NMC will be generated by miners here.

Cheesy

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
DBordello
Sr. Member
****
Offline Offline

Activity: 350


BTCPak.com - Exchange your Bitcoins for MP!


View Profile WWW
January 24, 2012, 06:41:58 PM
 #12

This looks very promising.  I intend to give it a shot for a small private pool I am setting up.  I will let you know what my experience is. 

www.BTCPak.com - Exchange your bitcoins for MP: Secure, Anonymous and Easy!
Graet
VIP
Legendary
*
Offline Offline

Activity: 980



View Profile WWW
January 25, 2012, 09:52:35 AM
 #13

ecoinpool running on the 2 remote servers - very impressed

Cant wait to get setup on main server

Awesome work p2k - Thank you Cheesy

| Ozcoin Pooled Mining Pty Ltd https://ozcoin.net Double Geometric Reward System https://lc.ozcoin.net for Litecoin mining DGM| https://crowncloud.net VPS and Dedicated Servers for the BTC community
DBordello
Sr. Member
****
Offline Offline

Activity: 350


BTCPak.com - Exchange your Bitcoins for MP!


View Profile WWW
January 26, 2012, 05:37:57 AM
 #14

I set this up today.  Very easy to install and configure.  The whole package is very polished.  I did find one bug, however p2k had it fixed within 5 minutes. 

www.BTCPak.com - Exchange your bitcoins for MP: Secure, Anonymous and Easy!
p2k
Jr. Member
*
Offline Offline

Activity: 33


Advancing ➤


View Profile WWW
February 09, 2012, 04:10:41 PM
 #15

Oh yeah, sorry that I didn't mention it here. Namecoin coinbasing is implemented since two weeks. But I need some more time to fix up the buit-in frontend and update documentation.

ecoinpool: AnnouncementHomepageGitHub
Support me: 1p2k1Fo7WzcuuLfFFfszCMhcjfxqevEqo
EnergyVampire
Full Member
***
Offline Offline

Activity: 210



View Profile
February 11, 2012, 07:17:00 AM
 #16

Hello,

I've been trying to play with this for solo mining.

I get the error "User ID Request Failed: While requesting a new user ID, the pool server did not respond in time. This usually means that the pool server is down or currently unreachable."

The terminel says:
Code:
[default/error] Could not start share logger default_couchdb_share logger, reason: {already_started, <0.157.0>}
[default/error] Could not start share logger default_logfile_share logger, reason: {already_started, <0.161.0}
This is followed by a Crash Report in the terminal.

Also on the ebitcoin page the Last Block is "(not implemented yet)".

Note: bitcoind is up-to-date with the latest block #166291.

Thanks in advance for your reply, Cheers!


p2k
Jr. Member
*
Offline Offline

Activity: 33


Advancing ➤


View Profile WWW
February 11, 2012, 01:59:25 PM
 #17

Hello EnergyVampire,

you need to be able to access the ecoinpool mining port you specified from your browser. The link in that error message should directly take you there (click it!), presenting you a greeting message. If your browser cannot connect to ecoinpool in this way, you either have too restrictive firewall settings (if not running on localhost only) or ecoinpool crashed because of bad configuration or it's unable to connect to bitcoind or bitcoind is still loading the blockchain or ecoinpool is unable to connect to CouchDB and other reasons which are fatal for ecoinpool.

If you get an error message, try to paste it on pastebin.com after you read this guide and send the link as a pm here or contact me on IRC. Maybe I can help you then.

p2k

ecoinpool: AnnouncementHomepageGitHub
Support me: 1p2k1Fo7WzcuuLfFFfszCMhcjfxqevEqo
Tittiez
Hero Member
*****
Offline Offline

Activity: 686



View Profile
February 11, 2012, 03:16:01 PM
 #18

On ubuntu server 11.10:

Code:
root@garrysmod:~/bit/ecoin# ./rebar get-deps
==> ecoinpool (get-deps)
==> ebitcoin (get-deps)
==> rel (get-deps)
==> ecoin (get-deps)
Pulling protobuffs from {git,"git://github.com/basho/erlang_protobuffs.git",
                             "master"}
fatal: read error: Connection reset by peer
Cloning into protobuffs...
ERROR: git clone -n git://github.com/basho/erlang_protobuffs.git protobuffs failed with error: 128 and output:
fatal: read error: Connection reset by peer
Cloning into protobuffs...

Edit:

Nevermind, worked fine the 2nd time!
EnergyVampire
Full Member
***
Offline Offline

Activity: 210



View Profile
February 11, 2012, 03:40:53 PM
 #19

Hello EnergyVampire,

you need to be able to access the ecoinpool mining port you specified from your browser. The link in that error message should directly take you there (click it!), presenting you a greeting message. If your browser cannot connect to ecoinpool in this way, you either have too restrictive firewall settings (if not running on localhost only) or ecoinpool crashed because of bad configuration or it's unable to connect to bitcoind or bitcoind is still loading the blockchain or ecoinpool is unable to connect to CouchDB and other reasons which are fatal for ecoinpool.

If you get an error message, try to paste it on pastebin.com after you read this guide and send the link as a pm here or contact me on IRC. Maybe I can help you then.

p2k


Thanks for the reply p2k,

The link to your guide didn't work for me but I believe I found the guide elsewhere on your site.

When I followed my linked port, I get:
Code:
{"result":"Welcome! This server is running ecoinpool v0.3.17 by p2k. You have reached one of the coin mining ports meant to be used with coin mining software; consult the mining pool's homepage on how to setup a miner.","error":null,"id":1}

at the terminal, I get:
Code:
** Reason for termination ==
** {{case_clause,{error,[],function_clause}},
    [{ecoinpool_db,handle_cast,2,[{file,"src/ecoinpool_db.erl"},{line,213}]},
     {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,597}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}

I hope I followed your instructions correctly. Does my browser make a difference? I use the Gnome webbrowser and Iceweasel.

Tittiez
Hero Member
*****
Offline Offline

Activity: 686



View Profile
February 11, 2012, 03:55:00 PM
 #20

Went to create a worker, but I got this:
Code:
While requesting a new user ID, the pool server did not
respond in time. This usually means that the pool server
is down or currently unreachable.

When I start the pool in general, the console gets this error:
Code:
=SUPERVISOR REPORT==== 11-Feb-2012::19:56:19 ===
     Supervisor: {global,
                                           ecoinpool_server_sup_1360b02e19d98482148d4c6dea0127eb}
     Context:    shutdown
     Reason:     reached_max_restart_intensity
     Offender:   [{pid,<0.753.0>},
                  {name,subpool},
                  {mfargs,
                      {ecoinpool_server,start_link,
                          [<<"1360b02e19d98482148d4c6dea0127eb">>]}},
                  {restart_type,permanent},
                  {shutdown,5000},
                  {child_type,worker}]
Pages: [1] 2 3 4 5 6 7 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!