Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testnet.programmingbitcoin.com is down #151

Open
steelsparrow opened this issue Jun 21, 2019 · 17 comments
Open

testnet.programmingbitcoin.com is down #151

steelsparrow opened this issue Jun 21, 2019 · 17 comments

Comments

@steelsparrow
Copy link

Like mainnet, the testnet block explorer appears to be down. Would it be possible for you to note the explorer you are running so users can bring up private instances to continue working through the exercises in the book?

@chanhosuh
Copy link
Contributor

I suspect he's just RPC'ing to his own full node. It might be nice for the next edition for Jimmy to show readers how to setup a full node (pretty easy now using Docker) and RPC to it.

@MichelKansou
Copy link

MichelKansou commented Sep 29, 2019

@steelsparrow I used blockstream API and it works fine

        if testnet:
            return 'https://blockstream.info/testnet/api/'
        else:
            return 'https://blockstream.info/api/'

@MichelKansou
Copy link

@chanhosuh I'm currently in chapter 10 where you need to make a network handshake with testnet.programmingbitcoin.com but I guess the server is still down do you think I need a local full node to test this ?

@chanhosuh
Copy link
Contributor

@MichelKansou you can find someone's node to connect to, but in the end, you'll just be spamming them (especially if you aren't doing the handshake correctly!), so it's better to just run your own node. I think it's probably also more useful as a developer to run your own node anyway.

It's not difficult to run a local node using Docker, exposing ports 8333 / 18333. Then connect a socket to localhost:8333 (or 18333) by initializing SimpleNode appropriately.

You can use this docker setup: https://github.com/chanhosuh/docker-bitcoin

@MichelKansou
Copy link

@chanhosuh thank you I already have a full node running so I will use it 😁

@MichelKansou
Copy link

@chanhosuh yesterday I was trying to use my remote full node but I'm getting a RuntimeError Connection reset! which mean my stream is empty or my full node can't be reached do I need to provide rpcuser & rpcpassword ?

@MichelKansou
Copy link

@chanhosuh I just found out I needed to configure my router to enable 8333 Port Forwarding and also add upnp=1 in my bitcoin.conf 😅
https://bitcoin.org/en/full-node#port-forwarding

@marcdk
Copy link

marcdk commented Jul 16, 2020

Hi guys, I noticed that the testnet param is missing - adding that solved the problem for me

#193

@joelklabo
Copy link
Contributor

#202

@lucidprojects
Copy link

lucidprojects commented Jan 23, 2021

I've been trying to get a alternative testnet going for the last week. finally got a testnet node running in docker. How do I access it and substitute it in get_urls?

like this http://127.0.0.1:8332 ?

Is not accessible in a browser but don't know if it should be

this is what docker container inspect says my exposed ports are

"ExposedPorts": {
                "18332/tcp": {},
                "18333/tcp": {},
                "18443/tcp": {},
                "18444/tcp": {},
                "8332/tcp": {},
                "8333/tcp": {}
            },

any help appreciated

@marcdk
Copy link

marcdk commented Jan 25, 2021

Hi @lucidprojects

Port 8333 is used by nodes to communicate according to the P2P protocol and port 8332 is typically configured for JSON-RPC. The node doesn't expose a web interface (via these two, or any other port).

IIRC, at the least the one exercise was to communicate according to the P2P protocol

@lucidprojects
Copy link

Thanks @marcdk

I'm clear on the port to use.

I'm more asking how to use it. specifically for the last exercise Chapter12 exercise 6. It connects with

node = SimpleNode('testnet.programmingbitcoin.com', testnet=True, logging=False)

which doesn't work

changing to

node = SimpleNode('https://blockstream.info/testnet/api', testnet=True, logging=False)

gives me the below get address error which is why I'm trying to connect to my own testnet node

---------------------------------------------------------------------------
gaierror                                  Traceback (most recent call last)
<ipython-input-16-faf9611714a8> in <module>
     43 
     44 
---> 45 node = SimpleNode('https://blockstream.info/testnet/api', testnet=True, logging=False)
     46 
     47 # bf = Bloomfilter(size=30, function_count=5, tweak=90405)

~/Documents/programmingbitcoin/code-ch12/network.py in __init__(self, host, port, testnet, logging)
    361         # connect to socket
    362         self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
--> 363         self.socket.connect((host, port))
    364         # create a stream that we can use with the rest of the library
    365         self.stream = self.socket.makefile('rb', None)

gaierror: [Errno 8] nodename nor servname provided, or not known

I'm also getting this from my docker so I don't think the port is being exposed properly

error: Could not connect to the server 127.0.0.1:8332
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

appreciate any help

@marcdk
Copy link

marcdk commented Jan 25, 2021

Just a couple of things from my understanding that can hopefully help:

  • SimpleNode is trying to create a socket connection in the constructor: self.socket.connect((host, port)). The host can't contain an endpoint because this isn't HTTP. I think Jimmy recently switched to using https://blockstream.info/testnet/api only to fetch transactions
  • I've tested testnet.programmingbitcoin.com without an issue. Here's the code https://github.com/marcdk/programmingbitcoin/blob/master/ex12.6.py

Hope this helps

@GKenu
Copy link

GKenu commented May 7, 2022

Reference in ne

Would you still have this code? I've been trying everything I found to fix this but couldn't.

The link you shared is not working anymore. Tkws

@marcdk
Copy link

marcdk commented May 10, 2022

Hi @GKenu, I've just had a look, but I don't have the code anymore. Sorry about that!

@GKenu
Copy link

GKenu commented May 10, 2022 via email

@seccobit
Copy link

seccobit commented Apr 7, 2024

I think the node is still down, I tried to connect from a new node but connection is not stable. Any indication of what can be wrong would be much appreciated.

https://bitcoin.stackexchange.com/questions/122126/intermittent-connection-issues-datastreamread-end-of-data-unspecified-i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants