Skip to content

Conversation

@PhilippeR26
Copy link
Collaborator

Motivation and Resolution

Devs are complaining to have a flood of error messages when using snjs Devnet, integration or Testnet networks.
Estimation of tip is optimized for Mainnet, but is generating a lot of error messages when using other networks, due to a low quantity of transactions per block.
To be less disruptive for devs, I propose to replace the error message by a warning message.

Usage related changes

In node.js, jest tests, browser console, very aggressive error messages are now replaced by warnings.

Development related changes

Note

if (allTips.length < minTxsNecessary) {
logger.error(
`Insufficient transaction data: found ${allTips.length} V3 transactions with tips in ${blocksAnalyzed} blocks ` +
`(block range: ${Math.max(0, startingBlockNumber - maxBlocks + 1)}-${startingBlockNumber}). ` +
`Required: ${minTxsNecessary} transactions. Consider reducing minTxsNecessary or increasing maxBlocks.`
);
return createZeroTipEstimate(blocksAnalyzed, allTips);

I ask me if it's a good idea to return a zero value if not enough txs have been found.
It could be better to respond zero only if nothing has been found, and in other cases, try to calculate the tip.

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • All tests are passing

Copy link
Member

@tabaktoni tabaktoni left a comment

Choose a reason for hiding this comment

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

Sure, it's fine.
It was important when we migrated to the fee mechanism for devs to be aware, but now it is time to switch to warn.

@tabaktoni tabaktoni merged commit 790f926 into starknet-io:beta Nov 20, 2025
2 of 3 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 9.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants