Bitcoin Forum
June 29, 2017, 02:41:53 PM *
News: Latest stable version of Bitcoin Core: 0.14.2  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 »  All
  Print  
Author Topic: How (and why) pools (and all miners) should use the Relay Network  (Read 224459 times)
DrHaribo
Legendary
*
Offline Offline

Activity: 2128


Bitminter.com Operator


View Profile WWW
September 03, 2014, 10:39:06 AM
 #21

This discussion has been hashed out time and time again so there is no reason to continue it here. Suffice to say, you cannot build on blocks relayed to you by the relay network any more than you can on blocks sent to you from a random peer on the p2p network.

Of course you can. It's a game of probabilities. The probability that your mining effort produces a block that ends up on the blockchain versus the probability that you produce a block that does not (orphaned, invalid, doesn't matter). If you reduce the orphan rate a little at the cost of possibly increasing the invalid rate an extremely tiny bit, then the end result improves. Mining invalid data and orphaned blocks is the same: you end up with nothing.

But even a big pool will only save a couple blocks per year, so it is perhaps not worth discussing further.

I didn't mean to derail the thread.

▶▶▶ Bitminter.com - Your trusted mining pool since 2011.
1498747313
Hero Member
*
Offline Offline

Posts: 1498747313

View Profile Personal Message (Offline)

Ignore
1498747313
Reply with quote  #2

1498747313
Report to moderator
1498747313
Hero Member
*
Offline Offline

Posts: 1498747313

View Profile Personal Message (Offline)

Ignore
1498747313
Reply with quote  #2

1498747313
Report to moderator
1498747313
Hero Member
*
Offline Offline

Posts: 1498747313

View Profile Personal Message (Offline)

Ignore
1498747313
Reply with quote  #2

1498747313
Report to moderator
POLONIEX TRADING SIGNALS
+50% Profit and more via TELEGRAM
ALTCOINTRADER.CO
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1498747313
Hero Member
*
Offline Offline

Posts: 1498747313

View Profile Personal Message (Offline)

Ignore
1498747313
Reply with quote  #2

1498747313
Report to moderator
1498747313
Hero Member
*
Offline Offline

Posts: 1498747313

View Profile Personal Message (Offline)

Ignore
1498747313
Reply with quote  #2

1498747313
Report to moderator
1498747313
Hero Member
*
Offline Offline

Posts: 1498747313

View Profile Personal Message (Offline)

Ignore
1498747313
Reply with quote  #2

1498747313
Report to moderator
Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 03, 2014, 11:27:16 AM
 #22

There were a few major updates and both clients should update...The java client had a rather dumb bug that prevented it from relying outgoing blocks, though it received them fine...the python client was, as is all python, so horrendously non-performant that even a network rtt for a inv->getdata->block process to be faster. With some minor effort the python client now should reliably beat network rtts (seriously python???), though I'd advise using the java client where possible.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
PatMan
Hero Member
*****
Offline Offline

Activity: 924


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
September 03, 2014, 05:57:46 PM
 #23

Damn that java - I just uninstalled it too........

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 03, 2014, 06:02:35 PM
 #24

Damn that java - I just uninstalled it too........
Well, if you really wanted the python version you could use Jython, but then you're stuck with java anyway...I may benchmark pypy later and see if it helps but early testing shows its ~as fast.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
PatMan
Hero Member
*****
Offline Offline

Activity: 924


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
September 03, 2014, 06:06:02 PM
 #25

Really? That surprises me, I've never used pypy but have heard it's much faster than std python.......

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 03, 2014, 06:09:48 PM
 #26

Really? That surprises me, I've never used pypy but have heard it's much faster than std python.......
Well, its a JIT, and my tests may simply not have been long-running enough to give it sufficient warm-up time.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
spiccioli
Legendary
*
Offline Offline

Activity: 1376

nec sine labore


View Profile
September 03, 2014, 07:51:30 PM
 #27

Really? That surprises me, I've never used pypy but have heard it's much faster than std python.......
Well, its a JIT, and my tests may simply not have been long-running enough to give it sufficient warm-up time.

Hi,

I came to the same conclusions running p2pool long ago on pypy, it is as fast as python.

See here, for example.

spiccioli
-ck
Moderator
Legendary
*
Offline Offline

Activity: 2198


Ruu \o/


View Profile WWW
September 03, 2014, 10:07:28 PM
 #28

There were a few major updates and both clients should update...The java client had a rather dumb bug that prevented it from relying outgoing blocks, though it received them fine...the python client was, as is all python, so horrendously non-performant that even a network rtt for a inv->getdata->block process to be faster. With some minor effort the python client now should reliably beat network rtts (seriously python???), though I'd advise using the java client where possible.
Upgraded, thanks. I did notice messages in both directions now instead of before on the java client.

Primary developer/maintainer for cgminer and ckpool/ckproxy.
Pooled mine at ckpool.org Solo mine at solo.ckpool.org
-ck
Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 06, 2014, 06:03:42 AM
 #29

There is now a C++ client. Those who had been using the python client should probably switch to it (its semantics are identical, it runs on Linux and under Wine, so I assume Windows) and it is much, much faster than the python client.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
PatMan
Hero Member
*****
Offline Offline

Activity: 924


Watch out for the "Neg-Rep-Dogie-Police".....


View Profile WWW
September 06, 2014, 10:07:21 AM
 #30

Great stuff Matt! Testing now....... Smiley

"When one person is deluded it is called insanity - when many people are deluded it is called religion" - Robert M. Pirsig.  I don't want your coins, I want change.
Amazon UK BTC payment service - https://bitcointalk.org/index.php?topic=301229.0 - with FREE delivery!
http://www.ae911truth.org/ - http://rethink911.org/ - http://rememberbuilding7.org/
jedimstr
Hero Member
*****
Offline Offline

Activity: 784



View Profile
September 06, 2014, 03:37:13 PM
 #31

There is now a C++ client. Those who had been using the python client should probably switch to it (its semantics are identical, it runs on Linux and under Wine, so I assume Windows) and it is much, much faster than the python client.

Any chance you or someone else could port/compile/brew a Mac C++ version?

I tried porting and compiling myself but all the includes FUBAR'd the attempt. Or, I just need more coffee before I try again.

Been running the Java client for awhile now, but can we get the jar added to the Git Repository too alongside the other clients? It'll make keeping up-to-date much easier.

Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 06, 2014, 08:45:30 PM
 #32

Any chance you or someone else could port/compile/brew a Mac C++ version?

I tried porting and compiling myself but all the includes FUBAR'd the attempt. Or, I just need more coffee before I try again.
Hmm, yea, I assume one or more of the socket calls isnt right? I didnt try it on any BSD. Also, it needs C++11, so if the version of clang OSX ships is particularly out-of-date it may fail there too...I'm happy to help test it if you can get me a list of compile errors.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 06, 2014, 08:59:41 PM
 #33

Been running the Java client for awhile now, but can we get the jar added to the Git Repository too alongside the other clients? It'll make keeping up-to-date much easier.
Done.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
DrHaribo
Legendary
*
Offline Offline

Activity: 2128


Bitminter.com Operator


View Profile WWW
September 06, 2014, 09:14:05 PM
 #34

Is there a maven repo I need to add to build the java client? It's not finding the required bitcoinj version.

Code:
Missing:
----------
1) com.google:bitcoinj:jar:0.12-SNAPSHOT_nodelay

▶▶▶ Bitminter.com - Your trusted mining pool since 2011.
Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 06, 2014, 09:31:56 PM
 #35

Is there a maven repo I need to add to build the java client? It's not finding the required bitcoinj version.

Code:
Missing:
----------
1) com.google:bitcoinj:jar:0.12-SNAPSHOT_nodelay

If you're building the java client direct from source, it wants the branch at https://github.com/TheBlueMatt/bitcoinj/tree/nodelay. The only real difference is it sets TCP_NODELAY.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
IYFTech
Hero Member
*****
Offline Offline

Activity: 686


WANTED: Active dev to fix & re-write p2pool in C


View Profile
September 06, 2014, 11:44:37 PM
 #36

Hi Matt,

Sorry to go a bit off topic, but I was looking at your git repo & noticed you've worked on TextSecure. I've been using it for several weeks now - it's great work! Well done & kudos to you  Smiley

Sorry guys, carry on....... Wink

-- Smiley  Thank you for smoking  Smiley --  If you paid VAT to dogie for items you should read this thread:  https://bitcointalk.org/index.php?topic=1018906.0
DrHaribo
Legendary
*
Offline Offline

Activity: 2128


Bitminter.com Operator


View Profile WWW
September 07, 2014, 07:04:15 PM
 #37

If you're building the java client direct from source, it wants the branch at https://github.com/TheBlueMatt/bitcoinj/tree/nodelay. The only real difference is it sets TCP_NODELAY.

Got it. Had to add _nodelay to the version in core/pom.xml so the RelayClient would find it after "mvn install". Strangely the tests for bitcoinj fail if you run them twice without "mvn clean". At least they did for me. But I guess that's a problem with the tests, not the library itself.

Perhaps it's an idea for pools to set up direct peering? Could shave off a little time.

Is it OK to pass new blocks directly to the RelayNodeClient instead of passing them through the local bitcoind ? Could shave off a little bit more time.

▶▶▶ Bitminter.com - Your trusted mining pool since 2011.
Matt Corallo
Hero Member
*****
Offline Offline

Activity: 754


View Profile
September 08, 2014, 01:16:30 AM
 #38

Got it. Had to add _nodelay to the version in core/pom.xml so the RelayClient would find it after "mvn install". Strangely the tests for bitcoinj fail if you run them twice without "mvn clean". At least they did for me. But I guess that's a problem with the tests, not the library itself.

Perhaps it's an idea for pools to set up direct peering? Could shave off a little time.

Is it OK to pass new blocks directly to the RelayNodeClient instead of passing them through the local bitcoind ? Could shave off a little bit more time.

If you used that branch it should already have had _nodelay added to its version number (and you should probably use that branch of your OS may hold onto data before relaying it for some time).

re: direct peering: sure, pools could do this (most already do afaiu).

Sure, no harm in passing a block out quickly, but this is also why you should treat blocks that come from the relay network identically as some arbitrary blocks you get from an unknown source on the p2p network. See, for example, the for-w branch at https://github.com/TheBlueMatt/RelayNode/tree/for-w/client which I whipped up for another poolop so that they could peer a single relay network client with a ton of local pool daemons and have it properly route blocks that come in from the relay network to their bitcoind and from one of their pool daemons to all the other pool daemons and the relay network all at once.

Bitcoin Ubuntu PPA maintainer - donate to me personally: 1JBMattRztKDF2KRS3vhjJXA7h47NEsn2c
http://bitcoinrelaynetwork.org maintainer
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
DrHaribo
Legendary
*
Offline Offline

Activity: 2128


Bitminter.com Operator


View Profile WWW
September 08, 2014, 09:36:31 PM
 #39

If you used that branch it should already have had _nodelay added to its version number (and you should probably use that branch of your OS may hold onto data before relaying it for some time).

Sorry, I forgot to switch to the nodelay branch.

re: direct peering: sure, pools could do this (most already do afaiu).

Yeah, but I meant with the relay software, running a RelayNode instead of a RelayClientNode. Not sure how much there is to save there, but there may be something.

▶▶▶ Bitminter.com - Your trusted mining pool since 2011.
norgan
Sr. Member
****
Offline Offline

Activity: 308

Decentralize your hashing - p2pool - Norgz Pool


View Profile WWW
September 13, 2014, 08:28:32 AM
 #40

I've downloaded the exe client and am running it with "D:\Temp\relay\relaynetworkclient.exe public.au.relay.mattcorallo.com 127.0.0.1 8333" but I just get the following:

Closing bitcoind socket, failed to connect() (10049: Unknown error)
Closing relay socket, failed to connect() (10049: Unknown error)
Closing bitcoind socket, failed to connect() (10049: Unknown error)
Closing relay socket, failed to connect() (10049: Unknown error)
Closing bitcoind socket, failed to connect() (10049: Unknown error)
Closing relay socket, failed to connect() (10049: Unknown error)
Closing bitcoind socket, failed to connect() (10049: Unknown error)
Closing relay socket, failed to connect() (10049: Unknown error)
Closing bitcoind socket, failed to connect() (10049: Unknown error)
Closing relay socket, failed to connect() (10049: Unknown error)
Closing bitcoind socket, failed to connect() (10049: Unknown error)
Closing relay socket, failed to connect() (10049: Unknown error)
Closing bitcoind socket, failed to connect() (10049: Unknown error)

What am I doing wrong?

Miner, tech geek, operator of NorgzPool - Sydney Australia P2Pool Node creator of p2pool fancy front end

Tips: 1NorganBbymShTN2MMpfGzRYJF8mcPeXjv Exchange BTC locally in Australia or Donate to p2pool miners
Pages: « 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 »  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!