Skip to content

feat: dynamic gas limit#303

Open
0xHarbs wants to merge 7 commits intodevfrom
feat/dynamicGasLimit
Open

feat: dynamic gas limit#303
0xHarbs wants to merge 7 commits intodevfrom
feat/dynamicGasLimit

Conversation

@0xHarbs
Copy link
Collaborator

@0xHarbs 0xHarbs commented Sep 17, 2025

🤖 Linear

SpokeUpgrade using dynamic gas limit for queue processing and updating deployment script.

Copilot AI review requested due to automatic review settings September 17, 2025 14:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for dynamic gas limits in the EverclearSpoke contract (V5 upgrade). The upgrade allows queue processing functions to accept a custom gas limit parameter that is validated against a maximum limit set by the messageGasLimit field, providing more flexible gas management for cross-chain message operations.

Key changes:

  • Added dynamic gas limit parameter to queue processing functions
  • Implemented gas limit validation against messageGasLimit
  • Updated deployment scripts and safe transaction inputs for the upgrade

Reviewed Changes

Copilot reviewed 46 out of 93 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ISpokeStorageV5.sol New interface version with same structure as previous version
IEverclearSpokeV5.sol Updated interface with dynamic gas limit parameters in queue processing functions
SpokeStorageV5.sol New storage contract version with updated typehashes for relayer functions
EverclearSpokeV5.sol Main upgrade contract implementing dynamic gas limit validation and queue processing
Various test files Updated test infrastructure and safe transaction generation for the upgrade
Deployment scripts New deployment scripts for the dynamic gas limit upgrade
Comments suppressed due to low confidence (3)

packages/contracts/zk/src/contracts/intent/EverclearSpokeV5.sol:1

  • The typehash string signatures include _dynamicGasLimit parameter but don't match the actual function signatures which have _dynamicGasLimit as the 6th parameter. This inconsistency could cause signature verification failures when using these constants.
// SPDX-License-Identifier: MIT

packages/contracts/zk/src/contracts/intent/EverclearSpokeV5.sol:1

  • The new _dynamicGasLimit parameter in these functions lacks documentation explaining its purpose, validation constraints, and relationship to messageGasLimit. Consider adding comprehensive documentation for this critical parameter.
// SPDX-License-Identifier: MIT

packages/contracts/zk/src/contracts/intent/EverclearSpokeV5.sol:1

  • The new _dynamicGasLimit parameter in these functions lacks documentation explaining its purpose, validation constraints, and relationship to messageGasLimit. Consider adding comprehensive documentation for this critical parameter.
// SPDX-License-Identifier: MIT

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +685 to +691
function _checkDynamicGasLimit(
uint256 _dynamicGasLimit
) internal view {
if (_dynamicGasLimit > messageGasLimit) {
revert EverclearSpoke_ProcessQueue_ExceedsGasLimit(_dynamicGasLimit);
}
}
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a minimum gas limit check in addition to the maximum check. A gas limit of 0 or very small values could cause transaction failures and should be validated.

Copilot uses AI. Check for mistakes.
@0xHarbs 0xHarbs changed the title Feat/dynamic gas limit feat/dynamic gas limit Sep 17, 2025
@0xHarbs 0xHarbs changed the title feat/dynamic gas limit feat: dynamic gas limit Sep 17, 2025
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.

3 participants