Skip to content

eval: call WellFormed from eval.transaction#6450

Merged
algorandskiy merged 3 commits intoalgorand:masterfrom
cce:check-wellformed-eval
Oct 1, 2025
Merged

eval: call WellFormed from eval.transaction#6450
algorandskiy merged 3 commits intoalgorand:masterfrom
cce:check-wellformed-eval

Conversation

@cce
Copy link
Copy Markdown
Contributor

@cce cce commented Sep 29, 2025

Summary

This adds an extra call to WellFormed to transaction evaluation (already run as part of txn validation & signature checking).

Test Plan

Fixed broken tests that were making transactions that failed the WellFormed check.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 29, 2025

Codecov Report

❌ Patch coverage is 7.14286% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.72%. Comparing base (c2bb30f) to head (a1e91f0).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
ledger/testing/testGenesis.go 0.00% 9 Missing ⚠️
ledger/eval/eval.go 20.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6450      +/-   ##
==========================================
- Coverage   50.89%   50.72%   -0.18%     
==========================================
  Files         665      658       -7     
  Lines      111544   111459      -85     
==========================================
- Hits        56767    56532     -235     
- Misses      51904    52045     +141     
- Partials     2873     2882       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread ledger/apptxn_test.go Outdated
@jannotti
Copy link
Copy Markdown
Contributor

I just have the one thing I didn't follow immediately so I added a comment.

Co-authored-by: John Jannotti <jannotti@gmail.com>
Comment thread ledger/apptxn_test.go Outdated
Comment thread ledger/apptxn_test.go
// We're going to test some payout effects here too, so that we have an inner transaction example.
proposer := basics.Address{0x01, 0x02, 0x03}
stateProofPK := merklesignature.Commitment{0x03}
if ver < 31 { // no state proof support
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.

these consensus version numbers getting spread across the codebase so I wonder if we need to name them

@cce cce requested a review from Copilot October 1, 2025 02:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an extra call to WellFormed validation during transaction evaluation, beyond the existing validation that occurs during transaction signature checking. The main code change ensures that transactions must pass WellFormed checks to be included in blocks.

  • Adds WellFormed validation call in the transaction evaluation pipeline
  • Fixes test transactions that were not properly formed according to WellFormed validation rules
  • Adds configuration options for controlling fee sink balance in test genesis

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ledger/eval/eval.go Adds WellFormed validation call during transaction evaluation
ledger/testing/testGenesis.go Adds InitialFeeSinkBalance option for test genesis configuration
ledger/simple_test.go Fixes key registration transaction defaults to handle offline transactions
ledger/eval_simple_test.go Updates test transactions to include required fields like VoteKeyDilution and StateProofPK
ledger/eval/eval_test.go Adds FirstValid field to prevent transaction validation errors
ledger/double_test.go Adds documentation comment for txn method
ledger/boxtxn_test.go Refactors box reference tests and adds TEAL version parameterization
ledger/apptxn_test.go Fixes key registration transactions and application call tests
ledger/acctonline_expired_test.go Adds missing StateProofPK field to key registration transactions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread ledger/simple_test.go
Comment thread ledger/boxtxn_test.go
@algorandskiy algorandskiy merged commit 32ab091 into algorand:master Oct 1, 2025
39 checks passed
@cce cce deleted the check-wellformed-eval branch October 1, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants