Bitcoin Forum
May 27, 2024, 02:44:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »  All
  Print  
Author Topic: Re: How (and why) to use the Relay Network  (Read 609 times)
Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 13, 2014, 04:54:21 PM
 #81

Under the C++ folder I see a make script for 5 components (including a windows client).  I am happy with how the client is used and managed to get it going.

Can you perhaps share how the other components could be used to build a relay network? I am not really proficient at reading c++.

My guesses:
relaynetworkproxy -> Connects two relay nodes (both on port 8336).
relaynetworkterminator -> Seems to provide the 8334 and 8335 tx and block only feeds?
relaynetworkoutbound -> Connects a bitcoind and a something on port 8334?
relaynetworkserver -> connects to a trusted bitcoind? Also serves clients?  Also connects to something local on port 8334? I kept getting connection refused to the local bitcoind when I ran it.


Happy to assist with a readme on your github if needs be.

proxy/terminator are correct.
outbound connects to terminator on 8334 and a remote (untrusted) bitcoind.
server connects to a trusted bitcoind to decide which txn to relay, connects to terminator to get/private a data feed from untrusted bitcoinds and also listens on 8336 for relay clients.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
naplam
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250

Coin Developer - CrunchPool.com operator


View Profile WWW
October 13, 2014, 09:16:05 PM
 #82

Having issues with the c++ client receiving anything in the last day connecting to us-west without any other changes. Tried restarting and getting repeated
Code:
Closing relay socket, failed to read message header (104: Connection reset by peer)
Same here with us-east now. Us-west seems to work fine at this time.

Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 13, 2014, 11:34:30 PM
 #83

Same here with us-east now. Us-west seems to work fine at this time.
Now?

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
norgan
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250

Decentralize your hashing - p2pool - Norgz Pool


View Profile WWW
October 14, 2014, 07:57:17 AM
 #84

Same here with us-east now. Us-west seems to work fine at this time.
Now?
yup same with Singapore node. both my p2pool nodes have out of cache errors as well.

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
PatMan
Hero Member
*****
Offline Offline

Activity: 924
Merit: 1000


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


View Profile WWW
October 14, 2014, 09:00:11 AM
 #85

EU node trotting along nicely.......

"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/
spin
Sr. Member
****
Offline Offline

Activity: 362
Merit: 261


View Profile
October 14, 2014, 01:18:19 PM
 #86

So to build a relaynetwork between two nodes one could do the following:

Node 1: 10.0.0.1
bitcoind
relaynetworkserver
relaynetworkproxy 127.0.0.1 10.0.0.2


Node 2: 10.0.0.2
bitcoind
relaynetworkserver 127.0.0.1 8333


On node 2 I could also just run the relaynetworkclient also.
On node 1 (or 2) I could also add a relaynetworkproxy 127.0.0.1  public.REGION.relay.mattcorallo.com to connect to your network?

Questions:
Would the server also updated the local bitcoind with new tx/blocks?
Do I need the terminator at each node also?  The servers shows less errors when it is running?
Also let me know if you are not happy with me trying this out.

If you liked this post buy me a beer.  Beers are quite cheap where I live!
bc1q707guwp9pc73r08jw23lvecpywtazjjk399daa
Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 14, 2014, 08:03:37 PM
 #87

yup same with Singapore node. both my p2pool nodes have out of cache errors as well.
Seems to be a bug when run for too long they start disconnecting new peers with that...I'm trying to figure out why, but, for now, they should all work atm.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 14, 2014, 08:07:06 PM
 #88

So to build a relaynetwork between two nodes one could do the following:

Node 1: 10.0.0.1
bitcoind
relaynetworkserver
relaynetworkproxy 127.0.0.1 10.0.0.2


Node 2: 10.0.0.2
bitcoind
relaynetworkserver 127.0.0.1 8333


On node 2 I could also just run the relaynetworkclient also.
On node 1 (or 2) I could also add a relaynetworkproxy 127.0.0.1  public.REGION.relay.mattcorallo.com to connect to your network?

Questions:
Would the server also updated the local bitcoind with new tx/blocks?
Do I need the terminator at each node also?  The servers shows less errors when it is running?
Also let me know if you are not happy with me trying this out.

Why not just run two relay node clients from your different nodes? If they're on the same network (or very close to each other, ie you can just be running a regular bitcoin p2p connection between them, try the branch at https://github.com/TheBlueMatt/RelayNode/tree/for-w, which has code to connect to multiple local mining pool instances and relay between them and to the relay network, with a full bitcoind receiving blocks/txn from the network.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
DrHaribo
Legendary
*
Offline Offline

Activity: 2730
Merit: 1034


Needs more jiggawatts


View Profile WWW
October 14, 2014, 08:51:58 PM
 #89

Will new versions of the relay client be announced somewhere? (here maybe?)

▶▶▶ bitminter.com 2011-2020 ▶▶▶ pool.xbtodigital.io 2023-
Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 14, 2014, 09:02:33 PM
 #90

Will new versions of the relay client be announced somewhere? (here maybe?)
Major updates will, yes.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
norgan
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250

Decentralize your hashing - p2pool - Norgz Pool


View Profile WWW
October 15, 2014, 02:48:33 AM
 #91

yup same with Singapore node. both my p2pool nodes have out of cache errors as well.
Seems to be a bug when run for too long they start disconnecting new peers with that...I'm trying to figure out why, but, for now, they should all work atm.

it seems to cause p2pool to fall over as well. thats anecdotal of course so can't say for sure but the syptoms seem to line up on both nodes.

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
Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 15, 2014, 03:53:16 AM
 #92

yup same with Singapore node. both my p2pool nodes have out of cache errors as well.
Seems to be a bug when run for too long they start disconnecting new peers with that...I'm trying to figure out why, but, for now, they should all work atm.

it seems to cause p2pool to fall over as well. thats anecdotal of course so can't say for sure but the syptoms seem to line up on both nodes.
This one makes no sense...The way it was integrated into p2pool was to just kick off a thread and let it connect to bitcoind (not even to p2pool). Unless it hung python or hung your bitcoind, I dont see how this is possible.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
norgan
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250

Decentralize your hashing - p2pool - Norgz Pool


View Profile WWW
October 15, 2014, 03:55:13 AM
 #93

yup same with Singapore node. both my p2pool nodes have out of cache errors as well.
Seems to be a bug when run for too long they start disconnecting new peers with that...I'm trying to figure out why, but, for now, they should all work atm.

it seems to cause p2pool to fall over as well. thats anecdotal of course so can't say for sure but the syptoms seem to line up on both nodes.
This one makes no sense...The way it was integrated into p2pool was to just kick off a thread and let it connect to bitcoind (not even to p2pool). Unless it hung python or hung your bitcoind, I dont see how this is possible.
yeah liek i said anecdotal, i wanted to be clear on that. I'll do some more testing.

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
-ck
Legendary
*
Offline Offline

Activity: 4116
Merit: 1635


Ruu \o/


View Profile WWW
October 15, 2014, 09:25:18 AM
 #94

Running of the c++ client now fails to run on linux due to the position of the -pthread linking with the error:
Code:
terminate called after throwing an instance of 'std::system_error'
what():  Enable multithreading to use std::thread: Operation not permitte

Repositioning the -pthread here makes it work:
Code:
g++ -std=c++11 -Wall -I. -I/usr/include ./client.cpp -pthread ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -o relaynetworkclient

Probably should at least add -O2 to default build too

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
naplam
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250

Coin Developer - CrunchPool.com operator


View Profile WWW
October 15, 2014, 12:15:04 PM
 #95

yup same with Singapore node. both my p2pool nodes have out of cache errors as well.
Seems to be a bug when run for too long they start disconnecting new peers with that...I'm trying to figure out why, but, for now, they should all work atm.
Are you hitting the maximum sockets limit or something? maybe you could restart them automatically every day or so for the time being

Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 16, 2014, 02:31:25 AM
 #96

Are you hitting the maximum sockets limit or something? maybe you could restart them automatically every day or so for the time being
No, the issue y'all are seeing is that, if the thread handling the trusted bitcoind hangs or otherwise dies, it cant do its async connection reaping and, thus, people get disconnected as duplicate connections from the same IP if their connection gets reset somehow...Of course to fix this I need to actually figure out why its hanging/deadlocking/dying...

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 16, 2014, 02:43:43 AM
 #97

Running of the c++ client now fails to run on linux due to the position of the -pthread linking with the error:
Code:
terminate called after throwing an instance of 'std::system_error'
what():  Enable multithreading to use std::thread: Operation not permitte

Repositioning the -pthread here makes it work:
Code:
g++ -std=c++11 -Wall -I. -I/usr/include ./client.cpp -pthread ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -o relaynetworkclient

Probably should at least add -O2 to default build too
Huh? Which branch are you building from???
Master is https://github.com/TheBlueMatt/RelayNode/blob/master/c%2B%2B/make.sh which (unless you run with ./make test) has DEFINES set to -O2 and -flto, and -pthread is before any code?

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
-ck
Legendary
*
Offline Offline

Activity: 4116
Merit: 1635


Ruu \o/


View Profile WWW
October 16, 2014, 02:47:30 AM
 #98

Running of the c++ client now fails to run on linux due to the position of the -pthread linking with the error:
Code:
terminate called after throwing an instance of 'std::system_error'
what():  Enable multithreading to use std::thread: Operation not permitte

Repositioning the -pthread here makes it work:
Code:
g++ -std=c++11 -Wall -I. -I/usr/include ./client.cpp -pthread ./flaggedarrayset.cpp ./utils.cpp ./p2pclient.cpp ./crypto/sha2.cpp -o relaynetworkclient

Probably should at least add -O2 to default build too
Huh? Which branch are you building from???
Master is https://github.com/TheBlueMatt/RelayNode/blob/master/c%2B%2B/make.sh which (unless you run with ./make test) has DEFINES set to -O2 and -flto, and -pthread is before any code?
Oops, I didn't spot the defines. However -pthread has to be after client.cpp for it to work.

Developer/maintainer for cgminer, ckpool/ckproxy, and the -ck kernel
2% Fee Solo mining at solo.ckpool.org
-ck
Matt Corallo (OP)
Hero Member
*****
Offline Offline

Activity: 755
Merit: 515


View Profile
October 16, 2014, 03:08:44 AM
 #99

Oops, I didn't spot the defines. However -pthread has to be after client.cpp for it to work.
Oh after, ok, willdo.

Bitcoin Core, rust-lightning, http://bitcoinfibre.org etc.
PGP ID: 07DF 3E57 A548 CCFB 7530  7091 89BB B866 3E2E65CE
naplam
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250

Coin Developer - CrunchPool.com operator


View Profile WWW
October 16, 2014, 11:23:01 AM
 #100

yep, -phread after works

Pages: « 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!