Skip to content

Added gas shifting from billing service provided values - #23393

Open
russell-stern wants to merge 2 commits into
developfrom
billing_gas_shift
Open

Added gas shifting from billing service provided values#23393
russell-stern wants to merge 2 commits into
developfrom
billing_gas_shift

Conversation

@russell-stern

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

👋 russell-stern, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

pavel-raykov
pavel-raykov previously approved these changes Aug 12, 2026
@trunk-io

trunk-io Bot commented Aug 12, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@cl-sonarqube-production

Copy link
Copy Markdown

}

report.rateCard, err = toRateCard(resp)
report.rateCard, report.gasPrecision, err = toRateCard(resp)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

report.rateCard and report.gasPrecision are initialized above, and here they are overwritten with the toRateCard result. In case of error, gasPrecision is set to nil, but later it's accessed as if it was initialized.


// default to 18 (EVM) if not provided by the billing service.
// a value of 0 means the capability already emits fixed-point integers and no shift is needed.
precision := uint32(18)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It does not seem safe to use 18 as the default if we do not have a value.
If an error occurred during fetching the map will be nil.
Or even worse resp will be nil

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.

3 participants