livepeer / livepeer/testnet-services

Faucet should not send tx when request is invalid

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

Nobody has claimed this yet.

Dominant language
Go
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

At the moment, the faucet will still send a tx even if the HTTP handler fails to decode the JSON request body: https://github.com/livepeer/testnet-services/blob/master/simple-eth-faucet/faucet.go#L106

The handler should return if the JSON request body decode fails.

Contributor guide

No contributing guide indexed for this repository

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 in simple-eth-faucet/faucet.go around line 106, where the HTTP handler decodes the JSON request body. Verify how decode failure is handled and confirm that the handler returns before sending a transaction. Done means invalid JSON requests no longer trigger a transaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.