Skip to content

Conversation

HelloKashif
Copy link
Contributor

@HelloKashif HelloKashif commented Jun 25, 2025

https://chainlink-core.slack.com/archives/C07NRT2P9PG/p1750687199028919

Context: CCIP needs to send fixed gas values instead of estimation but currently it's hardcoded. We will introduce a new EstimateEnergy and EnergyAmount fields and then pass these from core. If EstimateEnergy is false and EnergyAmount specified then the txs will use that fixed amount. If the EnergyAmount is not specified then we fallback to the legacy logic

This would be a backwards incompatible change if we use the core's toml config when initalizing this object since EstimateLimit is set to false by default there. To prevent breaking any nodes we can first go ahead and enable EstimateLimit=true on the DF config (which are the only user atm) and then come back and merge this PR.

func (t *TronTxm) estimateEnergy(tx *TronTx) (int64, error) {

if t.EstimateEnergyEnabled {
if t.Config.EstimateEnergy {
Copy link
Contributor

Choose a reason for hiding this comment

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

this materially changes the estimateEnergy loop. previously t.EstimateEnergyEnabled is set by if the rpc node supports energy estimation, otherwise we fallback

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.

2 participants