Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor: cleanup for release #2
Refactor: cleanup for release #2
Changes from 8 commits
1d2a4d0
0e9fe12
f5f85ec
f062efe
8310f46
8eeac41
e4a0cde
b8601a6
cd7db94
9eeb52c
547473e
5d05b7f
a3cd851
6e01020
c095eb0
5ecaf14
82a8eb3
4329683
d1d56af
f369273
7f454e0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
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.
As there are 4 different options to use with 4 different reasons and 2 different set of actions (voting for protego + calling
drop
vs calling for new spell + voting for new spell + callingdrop
), I find it necessary to have a very clear instructions (IF/ELSE, step-by-step) explaining which of the 4 functions to use when and in which order. As in case of emergency:deploy
in order to confuse delegates and don't vote for the protego itself)As the next step, we might even consider writing a script that evaluates currently plotted spells, then fetches required parameters for the specific call and executes it. This way, the choice itself would also be reviewable/auditable in advance.
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.
Fully agree. Part of the deliverable is to provide a long-written post and also train governance facilitators on how to use the tool. We're just not sure the README is the best way to put the content verbatim. Maybe we'll have a link here to these documents once it's finished.
Not sure a script would be good enough in this case. There probably needs to be a UI for that and such feature be included there, however this is out of the scope of this repo.
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.
My main point is: the choice to use one of the four methods could be included in the scope of the repo specifically for it to be audited. This can be done the simplest way possible, for example, using a
s.sol
file or a js-based scriptThere 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.
Just to clarify: when you mention the "four methods", you are referring to:
Protego.drop()
with a spell address (for conforming spells)Protego.drop()
with plot params (for non-conforming spells)Correct?
Do you mean we should include all flows into scripts for auditing?
What kind of additional value do you expect this to bring, given that those flows are already present in the test files?
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.
Correct
Current tests only check listed flows separately, isolated from each other. My proposal is to add usage instruction or (if possible) a script that would explain "how to choose between 4 methods" or directly execute a specific method (e.g. if there are multiple spells plotted and not executed). I propose this because this decision (no matter if described in words or in code) is security-critical (e.g. if a wrong method is used it might not drop the spell) and time-sensitive (highly likely there wouldn't be time to deploy another dropspell as voting also takes time) and therefore would highly benefit from external audit.
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.
I'm hoping that the documentation is now clear enough, since there are only 2 methods left.
Maybe there should be something written in a "decision tree" format, but not sure if it's strictly necessary.
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.
Let's do it in the follow up PR, as part of the script?
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 which case would you prefer using
deploy(DssSpellLike _spell)(address)
overdeploy(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta)(address)
? I understand the problem with non-conformant (or rather malicious) spells, so in my opinion it's always safer to use the second option as it doesn't require an expertise to prove that the spell isconformant
. It's just a bit more complicated to use as it requires parsing calldata of the originalplot
transaction (but that can also be automated outside of the chain)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.
There are cases where a conforming spell might need to be dropped. For instance: some last minute legal issue that was found or a bug in the spell.
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.
I understand that there are conformant spells that might need to be dropped. I rather question why not only have
deploy(address _usr, bytes32 _tag, bytes memory _fax, uint256 _eta)(address)
as it can be used to drop both types of spells and more importantly does not require expertise to decide if the spell is conformant. You can have a script along the repo to fetch all plotted spells and parse required parameters for calling this function no matter if the spell is conformant or not.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.
See the comment for a scenario when calling
deploy(DssSpellLike _spell)(address)
could be weaponisedThere 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.
Agreed, it will make it more difficult instead of easier for users.
Code was updated.
This file was deleted.