Web: better bounds checking in kill/submit/accept bounty

Created on 14 Feb 2018  路  23Comments  路  Source: gitcoinco/web

what

right now, we don't do a great job of bounds checking in the follow places :

surface area:

  1. kill bounty
  2. submit bounty
  3. accept bounty

if you fail to meet the boundary conditions , youll see a nasty metamask module that shows you using up too much gas : http://bits.owocki.com/0h1R3J3r1j1w

current functionality

upon form submission on these pages, metamask will show this module, which shows that theres too much gas being used: http://bits.owocki.com/0h1R3J3r1j1w

desired functionality

upon form submission on these pages, an _alert is shown telling the user what bounds they crossed (the most common one is likely to be that the bounty has expired)

example error message: "Error: Cannot submit bounty as it has expired. Please contact bounty submitter directly to resolve."

bounds conditions to check

  1. try to submit work on an issue you are the funder
  2. you submit work on an issue that is on a different network than you (mainnet vs rinkeby)
  3. any other conditions enforced in StandardBounties
  4. network of bounty != network that the users current metamask instance is on
Gitcoin Bounties

Most helpful comment

Comically enough, the reason for the manifest error last night was due to a long running Janky Jenkins CI build for the new nodejs 9.10 images. Their build to deploy the new images to docker hub had already been running for over three and a half hours -_- If you attempt to pull the image before the deployment completes the push for any given tag/architecture, you'll be greeted with the manifest error.

See: https://github.com/nodejs/docker-node/issues/675

I pinned our node container entry in docker-compose to node:9.9-alpine in order to temporarily resolve the issue.

All 23 comments

__This issue now has a funding of 0.09 ETH (82.23 USD) attached to it.__

  • If you would like to work on this issue you can claim it here.
  • If you've completed this issue and want to claim the bounty you can do so here
  • Questions? Get help on the Gitcoin Slack
  • $8154.91 more Funded OSS Work Available at: https://gitcoin.co/explorer

Hi @KennethAshley are you planning on tackling this one? Excited to see where it goes! CC @owocki

Had to stop working on this for a bit. Having some issues with my computer.

@owocki Should I pub this one out?

@vs77bb yes pls

@vs77bb have you started on this yet? I may give it a go if not. Thanks!

@GrahamMcBain All you man! Please click 'Start Work' on Gitcoin if you decide to give it a go 馃檪

@GrahamMcBain still interested in this?

__Work has been started on the 0.09 ETH (38.01 USD @ $422.33/ETH) funding by__:

  1. @ryco117

__Please work together__ and coordinate delivery of the issue scope. Gitcoin doesn't know enough about everyones skillsets / free time to say who should work on what, but we trust that the community is smart and well-intentioned enough to work together. As a general rule; if you start work first, youll be at the top of the above list ^^, and should have 'dibs' as long as you follow through.

On the above list? Please leave a comment to let the funder (@owocki) and the other parties involved what you're working, with respect to this issue and your plans to resolve it. If you don't leave a comment, the funder may expire your submission at their discretion.

@ryco117 Thanks for your interest in working on this issue!
Feel free to let us know if you need assistance getting started or have any questions.

@mbeacom Haha, thanks for reaching out! I've actually been fighting for a few hours to get gitcoin to build/launch in my local environment (Fedora, Linux), with both the docker and non-docker options being difficult in different ways

@ryco117 Have you checked out https://github.com/gitcoinco/web/blob/master/docs/RUNNING_LOCALLY_DOCKER.md ?

At minimum, all that should be required is pulling the repo and from within the repo web directory: docker-compose up -d --build will pull necessary images and build the web image followed by launching the containers in detached mode. It might take a little longer the first time (to build and successfully serve requests).

You'll want to perform the additional Github steps found in the local docker documentation in order to enable login/authentication.

You can either launch without -d or docker-compose logs -f web following the build/up step to actively follow the container output.
Feel free to reach out to me on slack directly! https://gitcoin.co/slack

@ryco117 I recommend running docker-compose up without the -d option to check out the logs and see how the compose is going :) process took a bit longer than what I expected and checking out the logs confirmed that.

@mkosowsk Thanks but @mbeacom already helped me solve the issue, and I worked long into the night! Should have a proper PR in a couple days at most.

@ryco117 awesome! What was the issue and the resolution? Might be interesting to share with others out there in the community 馃憤

@mkosowsk The issue was that the Docker install was having trouble finding a Linux manifest file for node during the build. As for the solution, I believe @mbeacom pushed the fix but not sure what

@ryco117 thanks! Been diving a bit into Docker so I'm super interested in learning about using it in different environemts :)

Comically enough, the reason for the manifest error last night was due to a long running Janky Jenkins CI build for the new nodejs 9.10 images. Their build to deploy the new images to docker hub had already been running for over three and a half hours -_- If you attempt to pull the image before the deployment completes the push for any given tag/architecture, you'll be greeted with the manifest error.

See: https://github.com/nodejs/docker-node/issues/675

I pinned our node container entry in docker-compose to node:9.9-alpine in order to temporarily resolve the issue.

__Work for 0.09 ETH (35.95 USD @ $399.4/ETH) has been submitted by__:

  1. @ryco117

Submitters, please leave a comment to let the funder (@owocki) (and the other parties involved) that you've submitted you work. If you don't leave a comment, the funder may expire your submission at their discretion.

@owocki Created PR which should cover all remaining boundaries on the kill/submit/accept/increase bounty operations #748 .

thanks! will check it out today

reviewing PR now

did this ever get payed out @owocki ? seems like the explorer shows this as a rinkeby bounty now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sethmcleod picture sethmcleod  路  4Comments

pelsasser picture pelsasser  路  4Comments

kuhnchris picture kuhnchris  路  4Comments

jasonrhaas picture jasonrhaas  路  4Comments

Skyge picture Skyge  路  3Comments