-
Notifications
You must be signed in to change notification settings - Fork 7
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
rc-v1.0.1-stable proposed bytecode optimization to merge into stable branch #91
rc-v1.0.1-stable proposed bytecode optimization to merge into stable branch #91
Conversation
@roleengineer I moved this to a new epic #93 because I think that if we propose improvements, we should first setup measurements and CI regression checks, no? |
changed the target branch to |
if #94 is correct and merged then hopefully here we will have the CI activated @roleengineer |
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.
This all looks good to me; I would want to use this opportunity to first get measurements in our CI pipeline so that we have a record of what are improvements, and where are regressions
@@ -114,10 +114,7 @@ abstract contract ERC1155 is DiscountedBalances, Context, ERC165, IERC1155, IERC | |||
* @dev See {IERC1155-safeTransferFrom}. | |||
*/ | |||
function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes memory _data) public { | |||
address sender = _msgSender(); |
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 mentioned before, I tried to not update this forked contract from open zepellin unless where functionally needed. that said, sure this seems like a fair readability improvement.
It would be good to have measurements in place in CI so we can see whether this increases or reduces different metrics. I don't want to walk blind for optimisations
@@ -91,10 +91,7 @@ contract DiscountedBalances is Demurrage { | |||
// revert CirclesDemurrageAmountExceedsMaxUint192(_account, _id, _balance, 0); | |||
revert CirclesErrorAddressUintArgs(_account, _id, 0x81); | |||
} | |||
DiscountedBalance memory discountedBalance = discountedBalances[_id][_account]; |
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.
this is possibly an improvement, but as mentioned some of these changes were done on recommendation of reviewers. so my general comment holds, i would like to start measuring explicitly to see what is an optimisation in numbers
(workflow): update active CI branches
(trying to trigger CI fyi) |
(CI): add bytecode size and gas difference reporting
pull from beta into rc-v1.0.1-bytecode-optimization
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.
LGTM. now with an initial print of gas diffs!
Made a few slight adjustments to optimize bytecode size by consolidating some repeating code patterns. This should help streamline the overall efficiency without impacting functionality.