Skip to content

Conversation

@0xh3rman
Copy link
Collaborator

Fixes #908

Changes:

  1. Estimate Jito tip floor based on priority fee
  2. Update gas-bench to test the algorithm
  ┌────────┬──────────────────┬────────────────┬─────────────────────────┐
  │ Level  │   Our Estimate   │   Jito Floor   │          Diff           │
  ├────────┼──────────────────┼────────────────┼─────────────────────────┤
  │ Slow   │ ~1,538 lamports  │ ~1,000         │ +53% (safe margin)      │
  ├────────┼──────────────────┼────────────────┼─────────────────────────┤
  │ Normal │ ~4,614 lamports  │ ~4,000-4,500   │ +3-17% (close!)         │
  ├────────┼──────────────────┼────────────────┼─────────────────────────┤
  │ Fast   │ ~15,381 lamports │ ~14,000-20,000 │ -23% to +10% (in range) │
  └────────┴──────────────────┴────────────────┴─────────────────────────┘

@semanticdiff-com
Copy link

semanticdiff-com bot commented Jan 28, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  gemstone/src/models/gateway.rs  84% smaller
  crates/primitives/src/gas_price_type.rs  61% smaller
  crates/gem_solana/src/provider/preload_mapper.rs  35% smaller
  bin/gas-bench/src/main.rs  8% smaller
  Cargo.lock Unsupported file format
  bin/gas-bench/Cargo.toml Unsupported file format
  bin/gas-bench/src/helius/client.rs  0% smaller
  bin/gas-bench/src/helius/mod.rs  0% smaller
  bin/gas-bench/src/helius/model.rs  0% smaller
  bin/gas-bench/src/jito/client.rs  0% smaller
  bin/gas-bench/src/jito/mod.rs  0% smaller
  bin/gas-bench/src/jito/model.rs  0% smaller
  bin/gas-bench/src/solana_client.rs  0% smaller
  crates/gem_solana/Cargo.toml Unsupported file format
  crates/gem_solana/src/models/jito.rs  0% smaller
  crates/gem_solana/src/models/mod.rs  0% smaller
  gemstone/src/lib.rs  0% smaller
  gemstone/src/models/transaction.rs  0% smaller
  gemstone/src/solana/mod.rs  0% smaller

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @0xh3rman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the gas-bench tool's capabilities by adding support for Solana blockchain fee benchmarking, specifically integrating Jito tip estimation. It allows users to compare estimated Jito tips with actual Jito tip floors, providing valuable insights into transaction prioritization on Solana. Furthermore, the changes ensure that Jito tip information is seamlessly incorporated into Solana transaction metadata, enhancing the overall utility and data richness for Solana transactions within the system.

Highlights

  • Jito Support Integration: Introduced comprehensive support for Jito within the gas-bench tool and the gem_solana crate, enabling estimation of Jito tip floors based on priority fees.
  • Gas Benchmarking Tool Enhancement: The gas-bench CLI tool has been updated to support benchmarking for both Ethereum and Solana, with Solana-specific features including Jito tip estimation and comparison against Jito's official tip floor API.
  • Solana Transaction Metadata Update: Solana transaction metadata now includes estimated Jito tips (slow, normal, fast) derived from recent prioritization fees, making this information accessible for transaction processing.
  • New Jito-related Modules: Added new modules (jito and solana_client) to bin/gas-bench/src for Jito API interaction, fee statistics calculation, and Solana-specific gas client implementation. Also added a jito module to crates/gem_solana/src/models for core Jito logic.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds Jito support to the gas benchmarking tool, including fetching Jito tip floors and estimating tips based on Solana priority fees. The changes are well-structured, introducing new modules for Jito and Solana clients. I've provided some suggestions to improve code robustness, maintainability, and error handling. Key areas for improvement include making error handling more explicit to avoid silent failures, improving module cohesion by relocating some constants, and refactoring a loop to be less dependent on array indexing.

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.

Add Jito tip support

3 participants