Skip to content

Conversation

akaladarshi
Copy link
Contributor

@akaladarshi akaladarshi commented Sep 23, 2025

Proposed Changes

  • Use the TipSetKey if it is provided in the API params instead of getting heaviest tipset (only use heaviest if API params doesn't have a TipSetKey)

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

@Copilot Copilot AI review requested due to automatic review settings September 23, 2025 14:58
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Sep 23, 2025
@akaladarshi akaladarshi added the skip/changelog This change does not require CHANGELOG.md update label Sep 23, 2025
Copy link
Contributor

@Copilot 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 fixes the gas premium calculation in the Filecoin API by using the provided tipset-key parameter instead of always defaulting to the heaviest tipset.

  • Updated GasEstimateFeeCap and GasEstimateGasPremium functions to accept and use the TipSetKey parameter
  • Modified API layer to pass the tsk parameter through to the underlying utility functions
  • Changed parameter names from ignored (_) to used (tsk/ts) to reflect actual usage

Reviewed Changes

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

File Description
node/impl/gasutils/gasutils.go Updated core gas estimation functions to accept and use TipSetKey parameter instead of hardcoded heaviest tipset
node/impl/full/gas.go Modified API layer functions to pass through the tipset key parameter and use it in gas estimation calls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@akaladarshi akaladarshi requested a review from rvagg September 23, 2025 15:05
@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
Status: ✔️ Approved by reviewer
Development

Successfully merging this pull request may close these issues.

2 participants