Skip to content

Release 17.03.2025 #194

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

Merged
merged 1 commit into from
Mar 17, 2025
Merged

Release 17.03.2025 #194

merged 1 commit into from
Mar 17, 2025

Conversation

vignesha22
Copy link
Contributor

@vignesha22 vignesha22 commented Mar 17, 2025

Description

  • Fixed a bug to include paymasterData before estimating on bundler

Types of changes

What types of changes does your code introduce?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Further comments (optional)

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced wallet operation stability by refining user process handling and ensuring consistent gas limit management during transactions.
  • Chores
    • Upgraded the application to version 3.1.3, reflecting ongoing bug fixes and improvements as documented in the latest release notes.

Copy link

coderabbitai bot commented Mar 17, 2025

Walkthrough

The pull request updates the backend software version from 3.1.2 to 3.1.3. The changelog now includes a new entry documenting a fix for verifying Paymaster execution on undeployed wallets alongside an earlier cron job fix. Additionally, the signV07 method in the Paymaster class has been enhanced by introducing a defined paymasterPostOpGasLimit constant and modifying user operation processing to consistently apply the correct gas limit.

Changes

File(s) Change Summary
backend/CHANGELOG.md, backend/package.json Updated version information to 3.1.3. The changelog now includes an entry for a fix related to Paymaster execution for undeployed wallets, and the package version is bumped accordingly.
backend/src/paymaster/index.ts Modified the signV07 method by adding logic for enhanced gas limit handling. Introduced the paymasterPostOpGasLimit constant and updated the construction of user operations, including generating updated paymasterAndData and asynchronous paymaster data retrieval.

Sequence Diagram(s)

sequenceDiagram
    participant Client as UserOp Initiator
    participant PM as Paymaster.signV07
    participant Pack as packPaymasterData
    participant GP as getPaymasterData

    Client->>PM: Call signV07(userOp, estimate)
    alt Estimate flag true
        PM->>PM: Set paymaster, verification, and post op gas limits
        PM->>Pack: Generate paymasterAndData using updated gas limit
        Pack-->>PM: Return paymasterAndData
        PM->>GP: Asynchronously fetch paymasterData
        GP-->>PM: Return paymasterData
    else No estimation changes
        PM->>PM: Process userOp normally
    end
    PM-->>Client: Return modified userOp with correct gas limits
Loading

Suggested reviewers

  • kanthgithub
  • cryptonoyaiba
  • nikhilkumar1612
  • ch4r10t33r

Poem

I'm a hopper coding with delight,
Fixes and updates make my day so bright!
Bouncing through versions with a joyful leap,
Paying attention to details, no bug too deep.
Now the gas limit's just right – let's hop and code away!
🐇💻🌟

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vignesha22 vignesha22 changed the title Verifying Paymaster Bug Fix Release 17.03.2025 Mar 17, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ca6f68 and 08073a1.

📒 Files selected for processing (3)
  • backend/CHANGELOG.md (1 hunks)
  • backend/package.json (1 hunks)
  • backend/src/paymaster/index.ts (3 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
backend/CHANGELOG.md

2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)


2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)


3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


4-4: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
backend/src/paymaster/index.ts (3)

115-115: Good: A defined constant for paymasterPostOpGasLimit is now used consistently.

Adding a fixed constant for post-op gas limit (40000) ensures consistent gas limit usage throughout the function, preventing possible inconsistencies in gas limit values.


149-149: Consistent use of paymasterPostOpGasLimit in paymasterAndData packing.

Using the constant paymasterPostOpGasLimit here ensures consistency with the earlier code, replacing what was likely a hardcoded value previously.


163-163: Consistent use of paymasterPostOpGasLimit in return value.

Using the constant paymasterPostOpGasLimit in the return value ensures consistency with the rest of the function, replacing what was previously likely a hardcoded "0x1" value.

backend/package.json (1)

3-3: Version bump corresponds to the bug fix.

The version update from 3.1.2 to 3.1.3 properly follows semantic versioning for a bug fix, matching the entry in the changelog.

Comment on lines +117 to +133
userOp.paymaster = paymasterAddress;
userOp.paymasterVerificationGasLimit = this.EP7_PVGL;
userOp.paymasterPostOpGasLimit = paymasterPostOpGasLimit;
const accountGasLimits = this.packUint(userOp.verificationGasLimit, userOp.callGasLimit)
const gasFees = this.packUint(userOp.maxPriorityFeePerGas, userOp.maxFeePerGas);
const packedUserOp = {
sender: userOp.sender,
nonce: userOp.nonce,
initCode: userOp.initCode,
callData: userOp.callData,
accountGasLimits: accountGasLimits,
preVerificationGas: userOp.preVerificationGas,
gasFees: gasFees,
paymasterAndData: this.packPaymasterData(paymasterAddress, this.EP7_PVGL, paymasterPostOpGasLimit),
signature: userOp.signature
}
userOp.paymasterData = await this.getPaymasterData(packedUserOp, validUntil, validAfter, paymasterContract, signer);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical bug fix: Paymaster data is now correctly included before estimation.

This change fixes the core issue with the Verifying Paymaster by ensuring that when estimate is true, the paymaster data is properly included in the user operation before it's sent to the bundler for estimation. Previously, this data was missing during estimation for undeployed wallets.

The key improvements:

  1. Setting userOp.paymaster to the paymaster address
  2. Adding proper gas limits via paymasterVerificationGasLimit and paymasterPostOpGasLimit
  3. Creating a properly formatted packedUserOp with all required fields
  4. Fetching and applying paymasterData before estimation

This ensures the bundler can correctly estimate gas costs for operations involving undeployed wallets.

Comment on lines +2 to +5
## [3.1.3] - 2025-03-13
### Fixes
- Fixed Verifying Paymaster execution for undeployed wallets

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Changelog properly documents the bug fix.

The changelog entry clearly describes the issue that was fixed: "Fixed Verifying Paymaster execution for undeployed wallets." This aligns with the code changes in the paymaster module.

There are some minor markdown formatting issues though - headings should be surrounded by blank lines according to markdown best practices.

 # Changelog
+
 ## [3.1.3] - 2025-03-13
+
 ### Fixes
+
 - Fixed Verifying Paymaster execution for undeployed wallets
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## [3.1.3] - 2025-03-13
### Fixes
- Fixed Verifying Paymaster execution for undeployed wallets
# Changelog
## [3.1.3] - 2025-03-13
### Fixes
- Fixed Verifying Paymaster execution for undeployed wallets
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)


2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)


3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


4-4: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

Copy link
Member

@ch4r10t33r ch4r10t33r left a comment

Choose a reason for hiding this comment

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

LGTM

@vignesha22 vignesha22 merged commit 7f7af13 into master Mar 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants