1

I'm trying to connect to the swarm testnet. I followed the swarmdemo.test tutorial (http://swarm-gateways.net/bzz:/swarmdemo.test/) and I referred to the official documentation (http://swarm-guide.readthedocs.io/en/latest/runninganode.html#connecting-to-the-swarm-testnet) but I'm already not able to connect to the testnet.

First, in the video tutorial when the command "$GOPATH/bin/geth --testnet --datadir=$HOME/Desktop/ethereum account new" is run, a sub-folder "testnet" is created within the datadir folder, in my case it is not. The files are created directly within the datadir folder, but it doesn't matter I think.

The biggest issue is that when I run swarm as followed "$GOPATH/bin/swarm --bzzaccount ADDRESS-GOES-HERE --datadir $HOME/Desktop/ethereum/testnet --ethapi $HOME/Desktop/ethereum/geth.ipc" , I should be connected to the Ropsten testnet right ?

My terminal output :

raucouyo@ubuntu:~$ ./go/bin/swarm --bzzaccount dad7b9c9b1dc38b5bf41a4f9ac0ffc76c233bac6 --datadir /home/raucouyo/Desktop/ethereum --ethapi /home/raucouyo/Desktop/ethereum/geth.ipc
Unlocking swarm account 0xdad7b9c9b1dc38b5bf41a4f9ac0ffc76c233bac6 [1/3]
Passphrase:
INFO [05-05|10:22:28] Starting peer-to-peer node instance=swarm/v1.6.2-unstable/linux-amd64/go1.8.1
INFO [05-05|10:22:29] Starting P2P networking
WARN [05-05|10:22:31] Starting Swarm service
WARN [05-05|10:22:31] Warning: error reading kaddb '/home/raucouyo/Desktop/ethereum/swarm/bzz-dad7b9c9b1dc38b5bf41a4f9ac0ffc76c233bac6/bzz-peers.json' (skipping): open /home/raucouyo/Desktop/ethereum/swarm/bzz-dad7b9c9b1dc38b5bf41a4f9ac0ffc76c233bac6/bzz-peers.json: no such file or directory
INFO [05-05|10:22:31] Swarm network started on bzz address: a3b31ff03db2128b0d4bc70d241e100e85401a4c3c7b63d02966ed64396ce026
INFO [05-05|10:22:31] RLPx listener up self=enode://1c9bdefbe58cbd8429707828933855699c0c365383a5529efa4112451911aee3c89f1b452e45b74fd62199d2d9379ebc46be444d3df9cf192402af32e718e9f9@[::]:30399
INFO [05-05|10:22:31] Swarm HTTP proxy started on localhost::8500
INFO [05-05|10:22:31] IPC endpoint opened: /home/raucouyo/Desktop/ethereum/bzzd.ipc

And I should see in my terminal the connections with other nodes (according to the video tutorial), but nothing happen (after more than 15 minutes). So, I tried to reach the swarm page (theswarm.eth / theswarm.test) from my localhost endpoint (localhost:8500/bzz:/theswarm.test), it doesn't work as well as using the hash (localhost:8500/bzz:/1b5d887cea699d18560ae6dcaf06676f5064f630978b8031d9beb6fbddd82a82). Then, I tried to upload files (swarm up) locally and it works.

Someone can help me ? Kind regards

1 Answer 1

1

Thank you for trying out swarm :)

The video tutorial is from December, and things have changed since then. Firstly, geth no longer creates a 'testnet' directory, so you no longer have to add 'testnet' to the datadir flag. This is good because it removes the confusion in which geth added 'testnet' and swarm didn't.

Secondly, the default logging output no longer includes the kademlia table -- but you say "And I should see in my terminal the connections with other nodes". To see the connections table you can run the command console.log(bzz.hive) in the swarm console:

You must locate the swarm ipc endpoint bzzd.ipc. In your case this is

INFO [05-05|10:22:31] IPC endpoint opened: /home/raucouyo/Desktop/ethereum/bzzd.ipc

Then you can connect to it using geth: geth attach ipc:/home/raucouyo/Desktop/ethereum/bzzd.ipc You are now connected to the swarm console and can issue commands. Try

console.log(bzz.hive)

to see a layout of your peers in the kademlia routing table, or try admin.peers to see a list of connected peers.

You can also add peers manually by issuing commands such as:

admin.addPeer("enode://7e66523bc67f4b2a2237082bb73c59c73c60b8e326c8092ad454224184c51583fe8bc1f12f7ccfa4c3842c[email protected]:30442")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.