Transcoder Tip - Geth Light Client


#1

Transcoding nodes need to read data from the Ethereum blockchain and submit transactions. By default, nodes connect to Infura hosted Geth nodes, which is very convenient. Although these connections often fail or timeout, sometimes resulting in missed transactions or log events. Here’s a tip for an approach that’s been running reliably for a few days: Run a Geth Light Client on the same machine as your Livepeer node.

./geth --cache 256 --maxpeers 50 --syncmode light --rpc --rpcapi db,eth,net,web3 --ws --wsorigins "*"

Then when you start your livepeer node, tell it to connect to the local geth node with the --ethUrl flag:

-ethUrl ws://127.0.0.1:8546

Note: the --wsorigins “*” flag opens up your node to connections from any machine, so either set this more specifically to only receive connections from your current machine, or make sure your firewall is configured to prevent inbound traffic to your geth node.


Setting up a Livepeer Transcoder Node (Beginner's Guide)
Transcoder Campaign: Project by Aseralis
Transcoder Campaign: 0xA204 Transcoder - 🇭🇰Asia Hong Kong
#2

I’m seeing the flag to be --ethWsUrl but I may be using an older version of Livepeer.


#3

Yah might be a 0.2.1 update. In livepeer --help I see…

-ethUrl string
geth/parity rpc or websocket url


#4

For me, I had to use --wsorigins "*" instead of --wsorigins *


#5

hm getting

I0515 14:21:11.619131 25013 accountmanager.go:76] Passphrase required to unlock ETH account
Passphrase:
I0515 14:21:17.233468 25013 accountmanager.go:87] ETH account 0x97bF5D1b06EbE4d97A6E53353973205c611B4677 unlocked
I0515 14:21:17.233691 25013 client.go:187] Controller: 0xF96D54E490317c557A967ABfA5d6e33006BE69b3
E0515 14:21:17.235028 25013 client.go:191] Error getting LivepeerToken address: ErrNoResult
E0515 14:21:17.235070 25013 livepeer.go:324] Failed to setup client: ErrNoResult


#6

(never mind it wasn’t synced yet I guess.)

it started now properly, but the tx it is sending doesn’t make it on the eth chain

geht shows:

INFO [05-15|15:15:53] Submitted transaction fullhash=0x54e42732b0915f7cf591125fffd7034c7399463ebacabd97bbaf55a6cec2e1d7 recipient=0x511Bc4556D823Ae99630aE8de28b9B80Df90eA2e

but the tx is never getting there


#7

I suspect it may just have not been synced/had peers yet. Try opening a geth console…

$ geth attach ~/.ethereum/geth.ipcs

admin.peers

eth.blockNumber

Make sure that there are peers listed, and that the block number equals the current block. If it still can’t get transactions out, then that’s weird.


#8

hi… i already run this but when i check for eth.blockNumber it still show 0 … I am new to geth console, how to get the geth start syncing?

update: all solved :heart_eyes:


#9

thanks Doug, this solved the issue I was having the past few weeks. Was running a full geth node and trying to use the ethIpcUrl flag with no luck.