-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Dealocate unused memory when queuing transactions #6115
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
base: master
Are you sure you want to change the base?
Conversation
Added memory management for transaction queuing in GovernorTimelockCompound.
|
WalkthroughThe GovernorTimelockCompound._queueOperations function is updated with memory management modifications. The change imports Memory.sol and implements pointer-based memory operations: it retrieves a free memory pointer before the loop, and resets the pointer after each duplicate-queue check to deallocate memory reserved by abi.encode calls. No public function signatures or external interfaces are altered. Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (1)
Comment |
ernestognw
left a comment
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.
Seems like this is more costly than the initial version according to the gas report
| $GovernorTimelockCompoundMock | queue(address[],uint256[],bytes[],bytes32) | 116561 | +28 | +0.03% ❌ | 151116 | +10 | +0.01% ❌ | 120111 | +25 | +0.03% ❌ |
|---|
Added memory management for transaction queuing in GovernorTimelockCompound.
Fixes #????
PR Checklist
npx changeset add)