-
Notifications
You must be signed in to change notification settings - Fork 66
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
Conversation
* 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) |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
plasma_framework/contracts/src/exits/payment/PaymentExitGame.sol
Outdated
Show resolved
Hide resolved
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. |
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. |
plasma_framework/contracts/src/exits/payment/controllers/PaymentProcessStandardExit.sol
Outdated
Show resolved
Hide resolved
@@ -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; |
There was a problem hiding this comment.
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?
There was a problem hiding this 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
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? |
This includes -
Add process exit bounty for SE ([Process Exit Bounty] Implement bounty for processing standard exits #661)
Add process exit bounty for IFE ([Process Exit Bounty] Implement bounty for processing in-flight exits #680)
Static and Updatable Process Exit Bounty ([Process Exit Bounty] Make Bounty updatable through maintainer #685)
Anti-front running ([Process Exit Bounty] Add anti-front_running for process exits #684)