Skip to content

feat: port fee payer policy overrides from mppx#342#229

Merged
brendanjryan merged 5 commits intotempoxyz:mainfrom
evchip:feat/mppx-policy-overrides
Apr 20, 2026
Merged

feat: port fee payer policy overrides from mppx#342#229
brendanjryan merged 5 commits intotempoxyz:mainfrom
evchip:feat/mppx-policy-overrides

Conversation

@evchip
Copy link
Copy Markdown
Contributor

@evchip evchip commented Apr 19, 2026

Ports mppx#342. Adds FeePayerPolicy and FeePayerPolicyOverride types plus ChargeMethod::with_fee_payer_policy_override() so servers can tune fee-sponsorship policy per call: max_gas, max_fee_per_gas, max_priority_fee_per_gas, max_total_fee, max_validity_window_seconds.

Bundled into a single PR per request from @brendanjryan.

evchip added 4 commits April 17, 2026 18:50
…urned from make_cosign_method; undo superfluous diff in test_validate_transaction_transfers_rejects_fee_payer_gas_limit_above_max
…dd check that max priority fee is lower than max fee overall; change defaults to align with what's in mppx
Comment thread src/protocol/methods/tempo/method.rs Outdated
const MAX_FEE_PER_GAS_DEFAULT: u128 = 100_000_000_000;
const MAX_PRIORITY_FEE_PER_GAS_DEFAULT: u128 = 10_000_000_000;
const MAX_VALIDITY_WINDOW_SECS_DEFAULT: u64 = 15 * 60;
const MAX_TOTAL_FEE_DEFAULT: u128 = 50_000_000_000_000_000; // 0.05 ETH — lower than max_gas * max_fee_per_gas
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.

nit: technically this isn't ETH

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed. Force of habit 😄

@brendanjryan brendanjryan merged commit 8a71dd5 into tempoxyz:main Apr 20, 2026
8 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 20, 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