-
Notifications
You must be signed in to change notification settings - Fork 48
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
Include periphery in this repo #979
Conversation
ec3ddfb
to
41524b5
Compare
@PaulRBerg and @smol-ninja could you please provide your input on the question raised in the PR comment? |
This is not an easy choice. I need time to review this PR properly before sharing my input, and I don't yet know when I will be able to take a look at it. I'm sorry. |
41524b5
to
9c5bb99
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.
Looks good. Just a note that when we merge these changes into the staging
branch, we should make sure to add all the authors of v2-periphery as co-authors of the commit.
I would rename the PR title to "Merge the Periphery contracts" |
@andreivladbrg I would suggest to keep |
@@ -288,7 +288,7 @@ for chain in "${provided_chains[@]}"; do | |||
if [[ ${DETERMINISTIC_DEPLOYMENT} == true ]]; then | |||
echo -e "${SC}+${NC} Deterministic address" | |||
if [[ ${sol_script} == "" ]]; then | |||
deployment_command+=("script" "script/DeployDeterministicCore.s.sol") | |||
deployment_command+=("script" "script/DeployDeterministicProtocol.s.sol") |
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 this would ever work. We have discussed this previously that deploying the entire protocol in a single tx would cause gas to exceed block limit.
As a solution what we can do is add two new options --core
and --periphery
to select which one to deploy.
But lets create another issue for that.
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 have discussed this previously that deploying the entire protocol in a single tx would cause gas to exceed block limit.
the problem before was not about gas, but about different optimizer runs between core/periphery which lead to a NFTDescriptor and Dynamic contracts being too big, now since we use the same foundry configuration it would work (tested):
Line 18 in a34e528
optimizer_runs = 1000 |
But lets create another issue for that
don't think we need one as per above reason
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.
Oh. I tested it yesterday and it showed gas to be over 30M. How much gas requirement it shows to you?
We should use // This would not be required if we use super.setUp().
function setUp() public virtual override {
Base_Test.setUp();
} You can argue that
PARENT.setup() is useful when we are inheriting multiple contracts which is not case here. @andreivladbrg thoughts? |
b65f89d
to
21d82ad
Compare
no strong opinions on the commit looks good |
21d82ad
to
e8f458c
Compare
feat: add core dir in src refactor: remove redundant imports
refactor: precompile constants test: merge Base_Test contracts for both core and periphery test: add Periphery_Test contract test: add params for create with null broker test: use broker null param functions in batch test: update the starting timestamp test: use recipient0 in core tests test: fix periphery tests test: use recipient0 in core tests test: add an init merkle tree function test: add tranches functions for merkle lockup test: remove unneeded brokerFee declarations test(periphery-fork): use null broker in batch test(fork): make the admin the caller to fix merkle tests test: add caller param in computeMerkleAddress function refactor: remove core and periphery remappings test: replace block.timestamp with getBlockTimestamp test: remove unused imports
feat: add core and periphery dirs under script feat: implement DeployDeterministicProtocol script refactor(shell): update CLI run in generate-svg script refactor(script): use count maps in deploy protocol chore: re-order imports
ci: use JSON inputs in generate svg workflow ci: lower the fuzz runs to 2000 ci: remove periphery path where not needed chore: fix use of fromJSON
refactor(benchmark): use users.recipient0 refactor(benchmark): dry-fy params return chore(benchmark): run benchmark to update results
build(shell): use deploy protocol deployment script
test: rename recipient0 to recipient test: refactor variables in Defaults test(fork): allow leadData to have length 1
e8f458c
to
96e3209
Compare
I have decided to keep |
gud, me like it |
This PR addresses the first point in package tethering issue #808
The idea here is to create multiple PRs, to make the review process easier (some of PRs will have a failing CI, because the fixes are done in the upcoming ones).
Note
This PR is meant to be merged into
staging
after #980 and #981 (and more to come) are merged into it (Merge order: last created –> second last –> … –> first created). The review would be easier if it is done in the order these PRs were created: first 979, second 980, third 981 and so on..Each PR is going to be left as "draft" until the upcoming one is merged into it.
last created (not draft), second last(draft) … first created(draft)
Changes
core
dir insrc
core
periphery
dir insrc
script
import pathsQuestion: I have thought about merging the
Errors
libraries into a single one and adding a dedicatederrors
directory in thesrc
root. Also, I was considering whether we should move all interfaces (both core and periphery) to the rootBut, I consider that it is better to separate them for an easier repo structure to manage (current version), wdyt, do you have a better suggestion on how to structure the
src
?