Skip to content

fix: reject unbounded f64 raw transaction amounts#137

Merged
storopoli merged 3 commits into
alpenlabs:mainfrom
samsamtrum:reject-nonfinite-output-amounts
Jul 8, 2026
Merged

fix: reject unbounded f64 raw transaction amounts#137
storopoli merged 3 commits into
alpenlabs:mainfrom
samsamtrum:reject-nonfinite-output-amounts

Conversation

@samsamtrum

Copy link
Copy Markdown
Contributor

CreateRawTransactionOutput serialized address amounts with Number::from_f64(...).unwrap(). If a caller passed a nonfinite value such as NaN, serialization could panic.

This returns a serialization error for nonfinite output amounts instead and adds regression coverage.

@storopoli storopoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

small NIT on the error message

Comment thread src/types.rs Outdated
@storopoli storopoli changed the title Reject nonfinite raw transaction amounts fix: reject nonfinite raw transaction amounts Jul 8, 2026
@storopoli storopoli changed the title fix: reject nonfinite raw transaction amounts fix: reject unbounded f64 raw transaction amounts Jul 8, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

storopoli
storopoli previously approved these changes Jul 8, 2026

@storopoli storopoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK 2b2da9d

Comment thread src/types.rs Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@storopoli

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: fd55742810

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@storopoli storopoli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK fd55742

@storopoli
storopoli merged commit 68c865b into alpenlabs:main Jul 8, 2026
14 checks passed
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