Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Process Exit Bounty] Implement Bounty for Processing Exits consolidated #698

Merged
merged 4 commits into from
Aug 31, 2020

Conversation

souradeep-das
Copy link
Contributor

* feat: add process exit bounty for SE

* fix: pass in msg.sender to exitgame

* style: lint js

* fix: coverage

* revert package.json

* fix: modify LC tests

* style: add newline eof

* fix: modify python tests

* fix: rem gasprice form py tests

* fix: revert plasma_framework.py

* fix: revert plasma_framework.py

* feat: add Bounty lib tests

* style: js lint

* try python tests

* add to python tests

* add w3 python tests

* fix: py tests

* fix: lint py

* fix: lint py

* fix: minor remove unused w3

* style: use gasprice as args in lib

* style: add eof line

* style: remove unused contract

[Process Exit Bounty] Add process exit bounty for IFE (#682)

* feat: add IFE bounty to contracts

* feat: add IFE bounty tests

* feat: add python tests

* fix: lint js

* fix: coverage

* feat: add lib tests

* feat: use safe-math

* style: rename vars

feat: anti-front running

feat: make bounty updatable

fix: py tests

fix: py tests

feat: add updatebounty test

style: update statements
@@ -27,6 +28,7 @@ contract PaymentStandardExitRouter is
using PaymentChallengeStandardExit for PaymentChallengeStandardExit.Controller;
using PaymentProcessStandardExit for PaymentProcessStandardExit.Controller;
using BondSize for BondSize.Params;
using ExitBounty for ExitBounty.Params;

// Initial bond size = 70000 (gas cost of challenge) * 20 gwei (current fast gas price) * 10 (safety margin)
Copy link
Contributor

@thec00n thec00n Aug 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we adjust the value INITIAL_BOND_SIZE similar to INITIAL_EXIT_BOUNTY_SIZE?

@@ -35,6 +36,7 @@ contract PaymentInFlightExitRouter is
using PaymentDeleteInFlightExit for PaymentDeleteInFlightExit.Controller;
using PaymentProcessInFlightExit for PaymentProcessInFlightExit.Controller;
using BondSize for BondSize.Params;
using ExitBounty for ExitBounty.Params;

// Initial IFE bond size = 185000 (gas cost of challenge) * 20 gwei (current fast gas price) * 10 (safety margin)
uint128 public constant INITIAL_IFE_BOND_SIZE = 37000000000000000 wei;
Copy link
Contributor

@thec00n thec00n Aug 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the INITIAL_IFE_EXIT_BOUNTY_SIZE in the same way as INITIAL_IFE_EXIT_BOUNTY_SIZE?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean @thec00n ?
Do you mean update it to use 80 gwei as well?

@thec00n
Copy link
Contributor

thec00n commented Aug 25, 2020

As part of this PR could we document the mechanics around bounties and bonds somewhere and describe the rationale around them? So who pays or receives funds during a specific stage and why.

@boolafish
Copy link
Contributor

As part of this PR could we document the mechanics around bounties and bonds somewhere and describe the rationale around them? So who pays or receives funds during a specific stage and why.

I think it should be separated PR considering the size of PR but should be part of the effort of delivering the bounty I would like to ask for documenting this out too. Unfortunately we did not have any documentation on our bond upgrade mechanism too. If it would not be too much of a burden, it would be nice to have the doc describe both bond and bounty upgrade mechanism at once due to their similarity.

@thec00n
Copy link
Contributor

thec00n commented Aug 25, 2020

I honestly have a hard time to reason about all the different scenarios where funds are transferred and if they are correct. I realize that we stall @souradeep-das pr but I would appreciate that we take more time and have more confidence that all scenarios are covered correctly.

@@ -35,6 +36,7 @@ contract PaymentInFlightExitRouter is
using PaymentDeleteInFlightExit for PaymentDeleteInFlightExit.Controller;
using PaymentProcessInFlightExit for PaymentProcessInFlightExit.Controller;
using BondSize for BondSize.Params;
using ExitBounty for ExitBounty.Params;

// Initial IFE bond size = 185000 (gas cost of challenge) * 20 gwei (current fast gas price) * 10 (safety margin)
uint128 public constant INITIAL_IFE_BOND_SIZE = 37000000000000000 wei;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean @thec00n ?
Do you mean update it to use 80 gwei as well?

Copy link
Contributor

@boolafish boolafish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high level wise LGTM. please fix others comment though

@souradeep-das
Copy link
Contributor Author

Updating it to 80 gwei for the bond will be a bit on the higher side since there is a high offset already. What number should we go for?

@souradeep-das souradeep-das merged commit 5ed5f6b into v2.0.0 Aug 31, 2020
@souradeep-das souradeep-das deleted the souradeep/exit_bounty branch August 31, 2020 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants