-
Notifications
You must be signed in to change notification settings - Fork 212
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
Agreement: Implement protocol for disputable apps #1133
Conversation
_acceptChallenge(action, setting); | ||
emit ActionRejected(dispute.actionId); | ||
} else { | ||
_voidChallenge(action, setting); |
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.
In this case, is it possible that Aragon Court could have refunded fees (in case no jurors voted for example) and do we want to handle it?
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.
We shouldn't handle that here cause it will occur when penalties are settled in court. But it's an edge case we should consider somehow.
@izqui thx for the review and the thorough feedback, I addressed almost all your comments. There are a few pending to be discussed |
For the record, the Agreement app contract is super close to size limit, currently it is 23,928 |
f216d85
to
fea4106
Compare
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.
Still haven't looked at the tests in depth. The biggest thing we need to decide on is how to manage the challenge permission
@izqui thx for the review again, I changed the contract to allow having an optional token balance permission for challenges similar to how it was implemented for the signing process |
04474b8
to
471cb06
Compare
bb6a6a9
to
9a253bb
Compare
9a253bb
to
7e90c4f
Compare
c930112
to
5c3cb11
Compare
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.
Looking really, really good! I've pushed a few mostly cosmetic commits to align some of the comments or clarify in places where I could :).
I've left the review comments in order of priority / severity that we may want to look at. For the most part, I'm very comfortable with the current mechanisms and these are just small gaps that I may have noticed.
Finally, I'd like to go through and do a sanity check for the following:
- Add
@dev
notes to our external/public functions to explain why they're implicitly protected againstinitialization
(see Voting as an example—a lot of functions explain how they implicitly don't need anhasInitialized
modifier) - Order our storage setters in generally the same order as they're defined in the struct (can lead to slightly better gas) (e.g. I saw an example with
CollateralRequirements
being in the wrong order)
* Integrate external Staking app * Staking integration: adapt to new names * test: fix wrapper names Also, fix token deposit errors * Upgrade Staking dependency * Fixes after moving moving responsibilities to disputable app - action end date - cannot challenge error * Fixes after rebase on moving responsibilities to disputable app * Update Staking dependency * Fixes after rebase on moving responsibilities to disputable app Address PR #1151 comments. * Clean _unlockAndSlashBalance Fix dependencies (https://github.com/cgewecke/web3-issue-3544) * fixup! Clean _unlockAndSlashBalance Co-authored-by: Facu Spagnuolo <facuspagnuolo@users.noreply.github.com>
@sohkai thanks once again! I addressed most of your comments and answered others, let me know your thoughts! |
@sohkai addressed some last comments and conversations we had off-line, let me know your thoughts! |
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.
Everything's looking good to me; I have a few last notes but I think we're good to go 🚢🛳⛴
@@ -31,7 +31,7 @@ contract('Agreement', ([_, user]) => { | |||
}) | |||
|
|||
context('newAction', () => { |
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.
This is a bit awkward—I was hoping we'd lower the gas costs 😅.
Was this because of the aragonOS beta version or changes to the Agreement app and its ids?
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.
Honestly don't know, I would need to check what change introduce this increase :/
We can create another issue to look into it with fresh eyes :)
* agreements: implement contracts * agreement: init project * agreement: implement happy path tests * agreement: do not allow changing collateral token * agreement: organize errors * agreement: small contract fixes * agreement: complete unit tests * agreement: submit evidence only if there is context on dispute * agreement: implement gas costs tests * agreement: fix authentication logic * agreement: allow challenger to claim settlements * agreements: add settings tests * agreement: model token-balance based permissions * agreements: simplify state assertion logic * agreements: use safe transfers always * agreements: simplify periods validation logic * agreements: use challenge collateral instead of multiplier * agreement: support forwarding interface * agreement: simplify token balance based permissions * agreement: do not allow changing the arbitrator * agreements: add information to emitted events * agreements: improve blacklist for evm scripts * agreements: improve arbitrator fees approval * agreements: implement intergration tests * agreements: add contract inline documentation * agreement: add authentication check when scheduling actions * agreement: update readme * agreement: allow having token balance challenge permissions * agreement: add arapp json file * agreement: add manifest json file * agreement: migrate tests to Truffle v5 * agreements: tell whether a signer must review the content or not * chore: use buidler to run tests * Agreements: Implement disputable app (aragon#1140) * agreements: implement explicit signing process * agreements: implement agreement executors architecture * agreements: remove old executor * agreements: rename "executor" to "disputable" * agreements: migrate back from buidler to truffle * agreements: add test script * agreements: fix clock mocking * agreements: update delay app gas costs * agreements: optimize collateral requirements storage * agreements: use shared staking pool (aragon#1138) * agreements: improve disputable interface naming * disputable: allow setting agreement after initialization * agreements: improve challenge callback * agreements: test disputable voting app * delay: remove embedded token balance permission * agreements: support ACL oracle interface * agreements: implement registration process * disputable: add sample registry app * chore: remove voting app dependency * disputable: add can proceed helper * disputable: supports ERC165 * agreement: multiple enhancements * disputable: allow working without agreement * agreement: optimize bytecode * agreement: remove unregistering state * agreements: support multiple challenges * agreement: add action lifetime config * agreement: allow changing the arbitrator address * agreement: improve architecture naming * agreement: improve dispute metadata * agreement: move disputable base app to aragonOS * agreement: update arapp json file * agreement: fix circular dependency * agreement: skip flaky test * agreement: poc moving responsibilities to disputable app * agreement: poc moving responsibilities to disputable app 2 * agreement: poc moving responsibilities to disputable app 3 * agreement: fix action getter * Agreement: update README and details * Agreement: typo fix in manifest.json * Agreement: cosmetic import re-ordering * Agreement: cosmetic comment rewording/clarification * Agreement: cosmetic code naming clarifications * Agreement: small state optimization in _canProceed() * Agreement: Integrate external Staking app (aragon#1151) * Integrate external Staking app * Staking integration: adapt to new names * test: fix wrapper names Also, fix token deposit errors * Upgrade Staking dependency * Fixes after moving moving responsibilities to disputable app - action end date - cannot challenge error * Fixes after rebase on moving responsibilities to disputable app * Update Staking dependency * Fixes after rebase on moving responsibilities to disputable app Address PR aragon#1151 comments. * Clean _unlockAndSlashBalance Fix dependencies (https://github.com/cgewecke/web3-issue-3544) * fixup! Clean _unlockAndSlashBalance Co-authored-by: Facu Spagnuolo <facuspagnuolo@users.noreply.github.com> * agreement: multiple enhancements * Fix CI (aragon#1167) Broken due to web3 1.2.8 issue and decode events. * Agreement: update comments and docstrings * agreements: follow same ID pattern for all objects * agreements: use aragon os v5 beta * agreements: fix tests * agreements: small enhancements * agreements: optimize disputable activation * agreements: fix gas cost tests Co-authored-by: Brett Sun <qisheng.brett.sun@gmail.com> Co-authored-by: ßingen <bingen@aragon.one>
Fixes #1132
Related PRs
Current version - Rinkeby
agreement.open.aragonpm.eth
0x34c62f3aec3073826f39c2c35e9a1297d9dbf3cc77472283106f09eee9cf47bf
0x1C0032515055387f49053d2A20b5A5a5ef365b94
QmfRrtVfDS2udzeGDhHpfkBSm5AWRr6ANi7EzkkVVEcbEc
Old version - Rinkeby
agreements.open.aragonpm.eth
0x980c281816072b3147b96fa284b7b1e78d51f7df83e33073276b4d7e48b44e8f
0x108D4b8C7FBdFd56065a52cFA698fE26De27c183
QmdoRD25mxmDkrpgEjH9jcgaM1RnwpVxzHVzhfUjrKiHwv