-
Notifications
You must be signed in to change notification settings - Fork 49
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
Enable ETH fees #1087
Enable ETH fees #1087
Conversation
e80b821
to
5a3c721
Compare
Shouldn't this PR be independent of #1084? Both are separate issues. One is related to batch functions which is primarily create related whereas this one is about withdraw function. It's a good practice to create PRs independent of each other. If one takes time or requires more changes after review, the other PR can be reviewed and merged independently. |
not necessarily. it’s not about one issue being directly related to the other, but rather about anticipating potential conflicts to avoid time wasted resolving them. you can see the independent changes related to eth fees, as the base branch is we should merge PRs in chronological order
why? since all will eventually be merged into
since it's just the two of us working on these changes, and there aren't multiple contributors at the same time (where your approach would be preferred), i believe this approach is more efficient. scenario 1 (sequentially dependent PRs)
scenario 2 (independent PRs with higher conflicts)
as you can see, scenario 1 is better |
7506fcf
to
3813020
Compare
5a3c721
to
19a497c
Compare
You made some good points. I gave it more thought, and I think what you said is accurate when the time complexity of reviewing, resolving comments, and merging all PRs is the same. In many cases, the time complexities are different. Making all PRs dependent on each other would mean it disallows us from reviewing, resolving, and merging them asynchronously. Even though some PRs may be reviewed and merged faster, they will continue to be blocked by the base PR, which may take more time than anticipated. Also, in the case of a chain of PRs, when changes are made to the base PR, that means making changes to all subsequent PRs. Your point about rebasing is valid, but in my experience, we can identify such PRs/issues that are truly dependent on each other. In those cases, I agree with you. But generalizing it can slow us down in many cases. As an example, I rebased #1091 from staging in less than 30 minutes, and it can now also be reviewed and merged independently, which otherwise could stay open for as long as the other PRs are open. Another example is that #1087 can be worked upon, reviewed and merged independently of other PRs opened before it. From my experience, its easier to deal with independent PRs which I also prefer as much as possible, which you can review and merge independent of other PRs. This, imo, speeds up closing the issues faster without getting blocked by the base PR. |
3813020
to
adcca88
Compare
a611cb6
to
7b9c4b5
Compare
@smol-ninja i have marked the PR as ready to review, tho the fork tests are failing, we can ignore them for now, since we will remove the "periphery" contract in the upcoming PR (will answer tomorrow to your reply) |
test: update test accordingly feat: implement withdraw fee function refactor: correct the function name test: setSablierFee function test: withdrawFees function test: implement expectRevert_CallerNotAdmin helper function test: move ContractWithoutReceiveEth and ContractWithReceiveEth in Base_Test feat: add feeAmount in withdraw event build: decrease the optimizer runs to not exceed the size limit docs: improve wording in natpsec feat: add zero address check in withdrawFees feat: make all functions payable in SablierLockup refactor: remove sablierFee variable refactor: remove setSablierFee refactor: remove the fee amount from the withdraw event test: add mirror functions in Integration_Test to avoid passing the value in lockup test: dry-fy contract balance test
dc44afa
to
4794c03
Compare
@smol-ninja Thank you for your detailed reply.
Indeed, complexity plays a significant role in this discussion.
You are correct that PR complexities can vary. IMO, the sequential approach works best for handling highly complex PRs, whereas the parallel approach is more suited for small changes.
That's incorrect and I disagree with your assertion regarding the base branch of the PR. As I mentioned in my initial comment, what truly matters is the base branch the PR is raised against. For example, if I start from
I don’t quite understand why this point is relevant. Whether a PR is merged into staging after 1 day or after 5 days doesn’t seem to matter as long as all PRs ultimately need to be merged into Let me give an example: Suppose everything must be merged into staging. I create branches A and B, both involving complex changes and targeting the same files and lines (guaranteeing conflicts). Branch B is created after Branch A, but the PR for Branch B is raised first. The review processes for both start simultaneously. If PR A takes 1 day for review and changes, and PR B takes 2 days, merging PR A immediately upon completion would require PR B to be rebased and conflicts resolved, adding another day (3 days total). In contrast, if Branch B were created sequentially from Branch A, rebasing the review changes of PR A into Branch B would only take half a day. In this case, having both branches on staging would take 2.5 days instead of 3 days. For more complex PRs, I still believe the sequential method is more efficient. Another argument is that, for us (contract development), we don’t need specific features merged into the
As mentioned above, in the end, it might take more time to have all changes (what really matters) merged into staging
This is a small PR, and it’s understandable that it didn’t take much time (which I agree is not that relevant to handle in sequence). However, I come from the singleton and unlock amounts PR, where rebasing took a lot of time (1 day).
IMO, as said above, that's not that relevant when we merge it if we don't have all changes ready for auditing. But I understand the argument since it is a small PR
And from my experience, when it comes to more complex PRs, it’s generally easier to handle them sequentially.”
not necessarily PS: You don’t need to reply to this now. We already discussed on Slack using the parallel option |
I will investigate. Feel free to go to bed :)) |
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 work @andreivladbrg. Left some comments below. I have also included a commit similar to sablier-labs/airdrops@0611cf9 which renamed sablier fee to simply fee.
test/core/integration/concrete/lockup-base/withdraw-multiple/withdrawMultiple.tree
Show resolved
Hide resolved
test/core/integration/concrete/lockup-base/withdraw/withdraw.t.sol
Outdated
Show resolved
Hide resolved
Closing in favor of #1093. |
Depends on #1084
Closes #1076 and #1090