-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add Governor #417
Add Governor #417
Conversation
…o feat/add-governor-#415
@ericglau having the deploy preview for this first round of reviews would be very helpful. |
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.
Great start, Eric! I left some comments and suggestions
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 need to add InternalExtendedImpl
for assert_only_governance
to be in scope for upgrades. We also need to import (and the option to set) ImmutableConfig
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.
Good catch. Added both InternalExtendedImpl and DefaultConfig. I don't think we should add the option for configuring DEFAULT_PARAMS on wizard though, since the format is Span<felt252>
(most probably a serialized struct).
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 don't think we should add the option for configuring DEFAULT_PARAMS on wizard though, since the format is Span (most probably a serialized struct).
Hmm I'm wondering if we should say more about DEFAULT_PARAMS
in the docs (or in a future guide). IMO it's not obvious what this should be and how it should be used. I agree though in that it's prob not an option we need in wizard
Added an |
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.
The changes look good, thanks! Just some minor comments.
…o feat/add-governor-#415
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.
Looks great, thanks!
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.
Improvements look great! I just left a non-blocking question
I'm having issues building the test_project locally (the process exits after a couple of hours of running). Do you guys have a strategy for this? I'm on an M3 MacBook Pro 😢. cc @andrew-fleming @immrsd. Also, @ericglau should I add an entry to the CHANGELOG? If that is so, should it be under Unreleased? I'm not familiar with the wizard release process |
@ericnordelo Can you add to the changelog entries under 0.20.0? I haven't published that version yet so we might as well release these together. We will be looking into a more formal release process going forward. |
Ahh hours!? I unfortunately don't have a strat for this :( I'm on an m2 and the last PR took "only" 30 min to compile |
Compile time seems non-linearly increasing for each added contract. Perhaps try removing the other contract types other than Governor when testing it locally. That might be sufficient for now. |
We could also change the script to generate sources for each contract kind separately, into different projects. There there would be like 6 projects that need to be compiled. That should cut down each project's compile time though. (Does not need to be in this PR) |
With only Governor sources it compiled in two minutes! Update:
|
This PR adds Governor to Cairo, and also refactors some code. Summary below:
Added:
section
member toImpl
andImplementedTrait
interfaces allowing to group in sections under a comment.embed
member toImpl
interface replacing theinternalImpl
mechanism when adding components since there could be multiple internal impls as shown in Governor.addUseClause
logic replacing the way imports were handled, allowing us to group imports.This PR is still missing:
With this said, it is ready for a first round of reviews since the main logic is finished.