Skip to content

Conversation

@pxrl
Copy link
Contributor

@pxrl pxrl commented Mar 6, 2023

Stack-related concerns are hopefully mitigated by the recent use of an IR during contract compilation.

Stack-related concerns are hopefully mitigated by the recent use of an
IR during contract compilation.
@pxrl pxrl requested review from mrice32 and nicholaspai March 6, 2023 00:23
fillCounter[token] += _computeAmountPostFees(totalFillAmount, realizedLPFeePct);
}

// The following internal methods emit events with many params to overcome solidity stack too deep issues.
Copy link
Contributor Author

@pxrl pxrl Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have removed this comment because I left _emitFillRelay() as a convenience. My thinking is that since it dereferences a lot of members of relayExecution and is called from multiple other functions, it's more practical to keep it as-is.

Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable! But, generally, we aren't supposed to make additions after the audit starts. Thoughts on leaving this out? Or at least asking OZ if they can review as a part of the fixes before merging?

@pxrl
Copy link
Contributor Author

pxrl commented Mar 8, 2023

Seems reasonable! But, generally, we aren't supposed to make additions after the audit starts. Thoughts on leaving this out? Or at least asking OZ if they can review as a part of the fixes before merging?

I haven't quantified the gas impact of the change; I guess it's very small, though it is one of the most heavily used functions.

I think it comes down to OZ and how they're tracking with the existing audit work. If they've got capacity to spare then it might make sense to ask if it can be considered, or perhaps add it as part of any follow-up changes that might be needed following their initial findings. I expect it's a fairly easy change for them to review, but if things are tight then we should leave it out.

Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should merge it and include in list of small PR's that we'd like reviewed in post-fix audit period. I think this will improve readability and have small gas savings

@nicholaspai nicholaspai merged commit 5882c64 into master Mar 22, 2023
@nicholaspai nicholaspai deleted the pxrl/fundsDeposited branch March 22, 2023 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants