Skip to content

feat: max tx cost limit for redistribution game#5473

Draft
sbackend123 wants to merge 7 commits into
feat/new-gas-estimationfrom
feat/gas-fee-limit
Draft

feat: max tx cost limit for redistribution game#5473
sbackend123 wants to merge 7 commits into
feat/new-gas-estimationfrom
feat/gas-fee-limit

Conversation

@sbackend123
Copy link
Copy Markdown
Contributor

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Added an option to configure retry delay and max_tx_cost for retry transactions.

For the redistribution game, this enables:

  • Shorter delay only for these transactions — with the default 1-minute delay, you can send only ~3 attempts per phase.
  • Claiming rewards even when the claim transaction cost exceeds the configured max tx cost, if the claim phase is about to end and the expected claim reward covers the claim transaction cost plus prior commit/reveal transactions for that round.

minEstimatedGasLimit was halved; gas price is no longer taken from context for redistribution game transactions.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

A long retry delay can leave the user unable to resend the transaction before the redistribution game phase ends, which means losing the right to participate in that round. For that reason, the delay is shortened for commit, reveal, and claim transactions.

A claim transaction is also roughly 1.5× more expensive than commit and reveal. With a user-configured max tx cost, funds may already be spent on commit and reveal while claim never goes through because of the limit — leaving the user at a net loss. To avoid that, the node is allowed to ignore the configured limit.

Related Issue (Optional)

#5142

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

# Conflicts:
#	cmd/bee/cmd/cmd.go
#	cmd/bee/cmd/start.go
#	pkg/node/node.go
#	pkg/storageincentives/redistribution/redistribution.go
#	pkg/transaction/mock/transaction.go
#	pkg/transaction/transaction.go
@sbackend123 sbackend123 changed the title Feat/gas fee limit feat: max tx cost limit for redistribution game May 21, 2026
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.

1 participant