Skip to content
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

fix(zetaclient): increase gas limit for TSS vote #2894

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

kingpinXD
Copy link
Contributor

@kingpinXD kingpinXD commented Sep 18, 2024

Description

  • The gas required for posting TSS votes has increased slightly after changing the key used for the voting ballot , which now includes the TSS pubkey.

Closes : #2893
Related : #2844

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Summary by CodeRabbit

  • New Features

    • Increased gas limit for TSS vote transactions to enhance efficiency and reliability.
    • Introduced a new constant for gas management during TSS key generation voting.
  • Bug Fixes

    • Ongoing improvements and fixes documented in the changelog.
  • Documentation

    • Updated changelog to reflect recent enhancements and changes.

Copy link
Contributor

coderabbitai bot commented Sep 18, 2024

Walkthrough

Walkthrough

The recent changes focus on enhancing the gas limit for TSS vote transactions, specifically by introducing a new constant, PostTSSGasLimit, set to 500,000. This modification updates the gas limit parameter in the PostVoteTSS function, improving transaction efficiency during TSS voting. Additional updates include ongoing improvements and fixes, such as the addition of an end-to-end framework for the TON blockchain and modifications to precompile tests.

Changes

File Change Summary
changelog.md Added an entry for increased gas limit for TSS vote transactions, highlighting transaction efficiency.
zetaclient/zetacore/client_vote.go Updated PostVoteTSS function to use PostTSSGasLimit instead of DefaultGasLimit.
zetaclient/zetacore/constant.go Added new constant PostTSSGasLimit = 500_000 for TSS voting gas management.

Possibly related PRs

  • fix: add pubkey to tss vote #2844: The changes in this PR enhance the TSS voting mechanism by adding a public key, which is directly related to the modifications in gas limits for TSS vote transactions in the main PR.

Suggested labels

TSS_MIGRATION_TESTS, no-changelog

Suggested reviewers


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3bf36b9 and 08ecfe1.

Files selected for processing (3)
  • changelog.md (1 hunks)
  • zetaclient/zetacore/client_vote.go (1 hunks)
  • zetaclient/zetacore/constant.go (1 hunks)
Additional context used
Path-based instructions (2)
zetaclient/zetacore/constant.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

zetaclient/zetacore/client_vote.go (1)

Pattern **/*.go: Review the Go code, point out issues relative to principles of clean code, expressiveness, and performance.

Additional comments not posted (3)
zetaclient/zetacore/constant.go (1)

18-19: LGTM!

The addition of the PostTSSGasLimit constant is a valuable enhancement to the TSS functionality within the codebase. The constant is named appropriately, follows the existing naming convention, and is placed in the correct location within the file. The value of 500,000 for the gas limit seems reasonable, considering the values of other related constants.

This change will allow for better gas management during TSS key generation voting processes and improve the overall functionality related to TSS operations.

zetaclient/zetacore/client_vote.go (1)

92-92: Verify the new gas limit for TSS vote transactions.

The change to use a dedicated PostTSSGasLimit instead of the generic DefaultGasLimit for TSS vote transactions is a good practice. It allows for fine-tuning the gas requirements specific to this transaction type.

However, it's crucial to ensure that the new PostTSSGasLimit value is sufficient for the transaction to be processed successfully under various network conditions. Consider load testing the system with this new limit to verify its adequacy and to prevent any potential transaction failures due to insufficient gas.

changelog.md (1)

29-29: Changelog entry is clear and concise. Verify impact of gas limit increase.

The changelog entry effectively communicates the purpose of the pull request. However, it is crucial to ensure that increasing the gas limit for TSS vote transactions has been thoroughly tested to assess its impact on network performance and transaction fees.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 generate interesting stats about this repository and render them as a table.
    -- @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 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.

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.

@kingpinXD kingpinXD changed the title test(performace) : increase gas limit for TSS vote test(performance) : increase gas limit for TSS vote Sep 18, 2024
@kingpinXD kingpinXD self-assigned this Sep 18, 2024
@kingpinXD kingpinXD added the PERFORMANCE_TESTS Run make start-e2e-performance-test label Sep 18, 2024
@kingpinXD kingpinXD changed the title test(performance) : increase gas limit for TSS vote test(e2e-performance): increase gas limit for TSS vote Sep 18, 2024
@kingpinXD kingpinXD changed the title test(e2e-performance): increase gas limit for TSS vote test(e2e): increase gas limit for TSS vote Sep 18, 2024
@kingpinXD kingpinXD changed the title test(e2e): increase gas limit for TSS vote fix(zetaclient): increase gas limit for TSS vote Sep 18, 2024
Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.86%. Comparing base (3bf36b9) to head (08ecfe1).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2894   +/-   ##
========================================
  Coverage    66.86%   66.86%           
========================================
  Files          378      378           
  Lines        21108    21108           
========================================
  Hits         14113    14113           
  Misses        6330     6330           
  Partials       665      665           
Files with missing lines Coverage Δ
zetaclient/zetacore/client_vote.go 57.54% <100.00%> (ø)

@kingpinXD kingpinXD added this pull request to the merge queue Sep 18, 2024
Merged via the queue into develop with commit ecb328e Sep 18, 2024
39 of 40 checks passed
@kingpinXD kingpinXD deleted the fix-performance-tests branch September 18, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PERFORMANCE_TESTS Run make start-e2e-performance-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nightly performance tests are failing
3 participants