How to restart a transcoder and verify it's active?


#1

I’m a bit stuck w/my transcoder. I think the transcoder died yesterday. It looks like I was able to restart it, because it’s showing active in the Explorer.

Here’s the output of the ./livepeer command I ran -

liveuser01@localhost:~/livepeer_linux$ ./livepeer —transcoder -ethUrl ws://127.0.0.1:8546 -publicIP 139.162.151.186
I0804 06:08:40.631581 6225 livepeer.go:144] Livepeer is running on the Ethereum main network: 0xf96d54e490317c557a967abfa5d6e33006be69b3
E0804 06:08:43.634353 6225 livepeernode.go:121] Current node cannot connect to any neighbors
I0804 06:08:45.089995 6225 accountmanager.go:76] Passphrase required to unlock ETH account
Passphrase:
I0804 06:08:51.696487 6225 livepeer.go:390] Livepeer Running in Broadcaster Mode
I0804 06:08:51.697050 6225 livepeer.go:391] Video Ingest Endpoint - rtmp://127.0.0.1:1935
I0804 06:14:11.369877 6225 base.go:207]

My transcoder’s current state in the Explorer shows the last reward round as 1055 and that I didn’t claim it.

https://explorer.livepeer.org/accounts/0xd0aa1b9d0cd06cafa6af5c1af272be88c38aa831/transcoding

I’m trying to figure out what to do next -

1 - How can I confirm the transcoder is active, is seeing the explorer indicate “active” enough?

2 - Is there anything I can do to claim past rewards?

3 - How can I get my transcoder claiming automatically claiming rewards again?

I hope this topic will be helpful for others. In addition to recovering from a failure, I imagine it would be helpful when bringing a transcoder back online after schedule downtime too.

Thanks!


#2

Great questions.

As a background, read this post on the difference between reward() and claimEarnings(): Difference between Reward() and ClaimEarnings()

1 - How can I confirm the transcoder is active, is seeing the explorer indicate “active” enough?

If the transcoder shows as “active” in the explorer, that means it is in the active set for the current round (top 15 delegated stake currently). It does not necessarily mean that your node is running correctly. That requires your own monitoring.

2 - Is there anything I can do to claim past rewards?

I think the above post should shed some light on what it means to claim past rewards. In short, your node must invoke the reward() txn every round. If it misses one, there’s no way to go back to invoke it retroactively.

As far as claimEarnings() it’s just an accounting artifact of the protocol. You have to call it once per round to actually move your earnings from the pending pool into your account, however there’s no time requirement for doing this. And you can call it for up to 20 rounds in one transaction, so best to just do it once every twenty rounds, or just submit a couple transactions down the line if you’re changing bonding status.

And the one mistake you can make is claiming earnings for the current round before reward is called, because then you miss the chance to re-allocate the rewards for the current round into your account.

3 - How can I get my transcoder claiming automatically claiming rewards again?

If the node is running, and connecting to a synced geth node, it should automatically call reward. If it’s not, try restarting it, or making sure the geth node is synced. In the meantime, I suggest you manually invoke the reward() function for the current round.

I think the automatic call loop checks every 30 minutes or so, so you may not see it call reward immediately upon a restart.


#3

Thanks, this is helpful. Regarding our own monitoring, what can/should we monitor to -

1 - Confirm ./livepeer is running correctly and

2 - The transcoder is active?