Skip to content

Implement configurable txmv2 fee boosting for Base - #587

Closed
dimriou wants to merge 1 commit into
developfrom
custom_svr_fix
Closed

dimriou wants to merge 1 commit into
developfrom
custom_svr_fix

Conversation

@dimriou

@dimriou dimriou commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dimriou
dimriou requested review from a team as code owners November 4, 2026 19:16
Copilot AI balanced review requested due to automatic review settings November 4, 2026 19:16
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

👋 dimriou, 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!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Converting the fee multiplier to float32 introduces precision loss that can underprice transactions, so decimal precision must be preserved through multiplication and covered by a regression test.

1 open issue
What changed in this PR

Adds configurable fee boosting to TxM v2 for Base, connecting chain configuration to transaction fee calculation.

Changes:

  • Adds FeeMultiplier configuration, validation, and documentation.
  • Scales estimated fees, applies a floor when boosting is enabled, and caps fees at the sender’s maximum.
  • Adds fee-calculation and compatibility tests and updates builder call sites.
File Description
pkg/​txmgr/​builder.go Passes fee configuration into the attempt builder.
pkg/​txm/​txm_test.go Updates transaction-flow tests to the configurable constructor.
pkg/​txm/​integration-tests/​integration_test.go Updates integration setup to pass builder configuration.
pkg/​txm/​attempt_builder.go Implements fee scaling and floors while retaining the existing constructor.
pkg/​txm/​attempt_builder_test.go Tests multipliers, floors, caps, and backward compatibility.
pkg/​config/​toml/​testdata/​config-full.toml Adds a multiplier configuration example.
pkg/​config/​toml/​docs.toml Documents multiplier behavior and constraints.
pkg/​config/​toml/​config.go Adds multiplier parsing, merging, and validation.
pkg/​config/​toml/​config_test.go Tests multiplier validation and configuration merging.
pkg/​config/​config.go Exposes the multiplier through the configuration interface.
pkg/​config/​config_test.go Tests default and configured multiplier values.
pkg/​config/​chain_scoped_transactions.go Implements the chain-scoped multiplier accessor.
CONFIG.md Adds user-facing multiplier documentation.

Review effort: Balanced

Comment on lines +108 to +109
f, _ := t.c.FeeMultiplier.BigFloat().Float32()
return f
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-evm

⚠️ Breaking Changes (1)

pkg/config.TransactionManagerV2 (1)
  • FeeMultiplier — ➕ Added

✅ Compatible Changes (3)

pkg/config/toml.TransactionManagerV2Config (1)
  • FeeMultiplier — ➕ Added
pkg/txm (2)
  • AttemptBuilderConfig — ➕ Added

  • NewAttemptBuilderWithConfig — ➕ Added


📄 View full apidiff report

@dimriou dimriou closed this Nov 5, 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.

2 participants