Skip to content

feat: re-configuring gas limit to 2m on deployment#157

Open
0xHarbs wants to merge 1 commit intodevfrom
fix/deploy-gas-limit
Open

feat: re-configuring gas limit to 2m on deployment#157
0xHarbs wants to merge 1 commit intodevfrom
fix/deploy-gas-limit

Conversation

@0xHarbs
Copy link
Copy Markdown
Collaborator

@0xHarbs 0xHarbs commented May 14, 2025

🤖 Linear

Updated gas limit in initializer from 20m to 2m, resolving gas limit being too high at deployment time.

Copilot AI review requested due to automatic review settings May 14, 2025 14:18
Copy link
Copy Markdown
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 updates the gas limit configuration for deployment by reducing the value from 20m to 2m to prevent excessive gas allocation during contract initialization.

  • Reduced the message gas limit in EverclearSpokeV3.sol
  • Reduced the message gas limit in EverclearSpoke.sol

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/contracts/src/contracts/intent/EverclearSpokeV3.sol Updated gas limit value from 20_000_000 to 2_000_000
packages/contracts/src/contracts/intent/EverclearSpoke.sol Updated gas limit value from 20_000_000 to 2_000_000

callExecutor = _init.callExecutor;
EVERCLEAR = _init.hubDomain;
messageGasLimit = 20_000_000;
messageGasLimit = 2_000_000;
Copy link

Copilot AI May 14, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding an explanatory comment or a named constant to clarify why the gas limit is set to 2,000,000. This will help future maintainers understand the rationale behind the magic number.

Suggested change
messageGasLimit = 2_000_000;
messageGasLimit = DEFAULT_MESSAGE_GAS_LIMIT; // Set the default gas limit for message execution

Copilot uses AI. Check for mistakes.
callExecutor = _init.callExecutor;
EVERCLEAR = _init.hubDomain;
messageGasLimit = 20_000_000;
messageGasLimit = 2_000_000;
Copy link

Copilot AI May 14, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding an explanatory comment or a named constant to clarify why the gas limit is set to 2,000,000. This will help future maintainers understand the rationale behind the magic number.

Suggested change
messageGasLimit = 2_000_000;
// Set the default gas limit for message execution. This value is chosen to ensure
// sufficient gas for most operations while avoiding excessive gas usage.
messageGasLimit = DEFAULT_MESSAGE_GAS_LIMIT;

Copilot uses AI. Check for mistakes.
@0xHarbs 0xHarbs requested review from just-a-node and preethamr May 14, 2025 15:24
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.

2 participants