Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

fix: sign the speed up transaction #651

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Conversation

rach-id
Copy link
Member

@rach-id rach-id commented Dec 7, 2023

Overview

We weren't correctly signing the speed up transaction and it was passing in the local environment, but after testing on Sepolia, it fails.

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

Summary by CodeRabbit

  • Refactor

    • Enhanced transaction handling with additional configuration options for users.
  • Documentation

    • Updated method signatures in public documentation to reflect new parameters.

@rach-id rach-id added bug Something isn't working relayer relayer related labels Dec 7, 2023
@rach-id rach-id self-assigned this Dec 7, 2023
@rach-id rach-id requested a review from evan-forbes as a code owner December 7, 2023 11:01
Copy link
Contributor

coderabbitai bot commented Dec 7, 2023

Walkthrough

The Go codebase has been updated to enhance the Relayer struct's waitForTransactionAndRetryIfNeeded method. This method now requires an additional parameter, opts *bind.TransactOpts, to presumably provide transaction options during execution. This alteration necessitates changes in the method's calls within the Relayer struct, ensuring the new parameter is included.

Changes

File Path Change Summary
relayer/relayer.go Updated waitForTransactionAndRetryIfNeeded method signature to include opts *bind.TransactOpts and modified its invocations accordingly.

🐇✨
A hop, a skip, a code commit,
The Relayer's dance, a method fit.
With opts in hand, it gracefully bounds,
Through Ethereum's fields, where data abounds. 🌱🚀
🐇✨


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

Copy link
Contributor

@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.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e7f399e and 2832173.
Files selected for processing (1)
  • relayer/relayer.go (3 hunks)
Additional comments: 3
relayer/relayer.go (3)
  • 404-406: The method signature for waitForTransactionAndRetryIfNeeded has been correctly updated to include the opts *bind.TransactOpts parameter, which is used to sign the speed up transactions as per the PR objectives.

  • 139-139: The call to waitForTransactionAndRetryIfNeeded within the Start method correctly passes the new opts parameter.

  • 455-465: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [407-463]

The retry logic within waitForTransactionAndRetryIfNeeded appears to be correctly implemented, with the opts parameter being used to sign the speed up transactions. The method attempts to speed up the transaction by increasing the gas price if it's not mined within the provided timeout, which aligns with the PR objectives.

relayer/relayer.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (e7f399e) 24.55% compared to head (2832173) 24.52%.

❗ Current head 2832173 differs from pull request most recent head 9d9bc30. Consider uploading reports for the commit 9d9bc30 to get more accurate results

Files Patch % Lines
relayer/relayer.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #651      +/-   ##
==========================================
- Coverage   24.55%   24.52%   -0.04%     
==========================================
  Files          29       29              
  Lines        3213     3217       +4     
==========================================
  Hits          789      789              
- Misses       2329     2333       +4     
  Partials       95       95              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rach-id rach-id merged commit 4f82c1c into main Dec 7, 2023
18 checks passed
@rach-id rach-id deleted the sign-speed-up-transaction branch December 7, 2023 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working relayer relayer related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants