Skip to content

fix: default chain_id to 4217 (mainnet), matching mppx and mpp-rs#108

Merged
brendanjryan merged 4 commits intomainfrom
fix/default-chain-id
Apr 1, 2026
Merged

fix: default chain_id to 4217 (mainnet), matching mppx and mpp-rs#108
brendanjryan merged 4 commits intomainfrom
fix/default-chain-id

Conversation

@brendanjryan
Copy link
Copy Markdown
Collaborator

Problem

When chain_id is omitted from tempo(), the challenge's methodDetails lacks a chainId field. The Rust CLI strictly requires it and rejects with:

Malformed payment request: missing chainId

Both mppx and mpp-rs default to 4217 (mainnet). pympp defaulted to None, making it the odd one out.

Fix

  • Default chain_id to CHAIN_ID (4217) in the tempo() factory, consistent with mppx and mpp-rs
  • Servers now work out of the box without explicitly passing chain_id
  • Testnet users still pass chain_id=42431 explicitly

When chain_id was omitted from tempo(), the challenge's methodDetails
lacked a chainId field. The Rust CLI (mpp-rs) strictly requires chainId
and rejects challenges without it: 'Malformed payment request: missing
chainId'.

Both mppx and mpp-rs default to 4217 (mainnet). This makes pympp
consistent so servers work out of the box without explicitly passing
chain_id.
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

github-actions bot and others added 3 commits April 1, 2026 19:28
The DEFAULT_FEE_PAYER_URL (sponsor.moderato.tempo.xyz) was a testnet-only
service silently used as fallback when no fee payer was configured. With
chain_id now defaulting to mainnet (4217), this would route mainnet
transactions to a testnet sponsor.

Align with mppx and mpp-rs: require explicit fee payer configuration
(either a feePayer account on the method, or a feePayerUrl in
methodDetails). Raise a clear error if neither is set.
@brendanjryan brendanjryan merged commit 9238e23 into main Apr 1, 2026
10 checks passed
@github-actions github-actions bot mentioned this pull request Apr 1, 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