-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix(Stamp): Gas golfing #174
Conversation
…tives into gas_golf_stamp
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 gas golfing, but approach with caution: NethermindEth/nethermind#6024
thnx on this info, good to know. hopefully they resolve this fully. |
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.
Overall, great refactor : )
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
|
||
// Price from the last update. | ||
uint256 public lastPrice = 0; | ||
uint64 public lastPrice; |
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 wouldn't narrow this variable that much, who knows!
lastPrice = _price; | ||
lastUpdatedBlock = block.number; | ||
lastPrice = uint64(_price); | ||
lastUpdatedBlock = uint64(block.number); | ||
|
||
emit PriceUpdate(_price); | ||
} | ||
|
||
function setMinimumValidityBlocks(uint256 _value) external { |
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.
why not change the parameter as well?
was overriden in some merge, changes are not in master, will need to reapply |
improv.txt
gas-report.txt
Optimization of PostageStamp contract for less gas usage.
Added improv diff that shows improvements on most counts with Stamp and final gas report.