livepeer / livepeer/go-livepeer

Typos in network name should be identified as such

Open
#2,979 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: triage
Dominant language
Go
Stars
586
Forks
226
Avg merge
1d 17h
Merged PRs (30d)
19

Description

I misspelled `arbitrum-one-mainnet` as `arbirum-one-mainnet` and got a cryptic error back:
```
▶ ./bin/livepeer -broadcaster -network arbirum-one-mainnet -ethUrl https://arb1.arbitrum.io/rpc -ethKeystorePath ~/.ethereum/keystore
*-----------------*---------------------------------*
| Network | arbirum-one-mainnet |
| Broadcaster | true |
| EthKeystorePath | /home/iameli/.ethereum/keystore |
| EthUrl | https://arb1.arbitrum.io/rpc |
*-----------------*---------------------------------*
I0314 16:22:56.737971 43218 starter.go:391] ***Livepeer is running on the arbirum-one-mainnet network***
I0314 16:22:56.889897 43218 accountmanager.go:80] Using Ethereum account: 0x648D909D6Ebbbf016f34f9eEBE608Ad62aa225C9
I0314 16:22:57.388705 43218 accountmanager.go:103] Please enter the passphrase to unlock Ethereum account 0x648D909D6Ebbbf016f34f9eEBE608Ad62aa225C9
Passphrase:
I0314 16:23:02.569597 43218 accountmanager.go:114] Unlocked ETH account: 0x648D909D6Ebbbf016f34f9eEBE608Ad62aa225C9
E0314 16:23:02.717474 43218 client.go:199] Error getting LivepeerToken address: no contract code at given address
E0314 16:23:02.717521 43218 starter.go:635] Failed to set gas info on Livepeer Ethereum Client: no contract code at given address
```
We should presumably just exit early if we've never heard of the network you're using; there's not going to be deployed contracts there and stuff, yeah?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the network startup flow in starter.go, especially around lines 391 and 635, then inspect accountmanager.go and client.go where the cryptic contract error appears. Trace how the -network value is accepted and determine where unknown networks should be rejected; done means a misspelled network exits early with a clear error instead of attempting account setup and contract access.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.