Skip to content

fix(Experimental): Cross group validation#1281

Closed
ddeskov-limechain wants to merge 1 commit intohiero-ledger:mainfrom
ddeskov-limechain:fix-cross-group-validation
Closed

fix(Experimental): Cross group validation#1281
ddeskov-limechain wants to merge 1 commit intohiero-ledger:mainfrom
ddeskov-limechain:fix-cross-group-validation

Conversation

@ddeskov-limechain
Copy link
Copy Markdown

Add explicit chunk-count validation in from_bytes()

Summary

  • Adds an explicit check in Transaction::from_bytes() that rejects multi-group TransactionList payloads for non-chunked transaction types
  • Only FileAppendTransaction and TopicMessageSubmitTransaction legitimately use multiple transaction ID groups; all other types now fail early with a clear error message
  • Adds regression tests covering both rejection and acceptance paths

Test plan

  • cargo test cross_group_forgery -- all 5 tests pass
  • cargo test -p hiero-sdk --lib -- full suite (956 tests), 0 failures

Signed-off-by: Dian Deskov <dian.deskov@limechain.tech>
@github-actions
Copy link
Copy Markdown

Hey @ddeskov-limechain 👋 thanks for the PR!
I'm your friendly PR Helper Bot 🤖 and I'll be riding shotgun on this one, keeping track of your PR's status to help you get it approved and merged.

This comment updates automatically as you push changes -- think of it as your PR's live scoreboard!
Here's the latest:


PR Checks

DCO Sign-off -- All commits have valid sign-offs. Nice work!


GPG Signature -- All commits have verified GPG signatures. Locked and loaded!


Merge Conflicts -- No merge conflicts detected. Smooth sailing!


Issue Link -- This PR is not linked to any issue.

Please reference an issue using a closing keyword (e.g. Fixes #123) and ensure the issue is assigned to you. Every PR needs a home!


All checks must pass before this PR can be reviewed. You've got this!

@github-actions github-actions bot added the status: needs revision A pull request that requires changes before merge label Mar 26, 2026
@gsstoykov
Copy link
Copy Markdown
Contributor

@rwalworth Could you ignore this PR for now we are experimenting with some tooling.

@gsstoykov gsstoykov changed the title fix: cross group validation fix(Experimental): Cross group validation Mar 26, 2026
@rwalworth
Copy link
Copy Markdown
Contributor

@gsstoykov @ddeskov-limechain just checking in here, would you like to keep this PR open or can we close?

@ddeskov-limechain
Copy link
Copy Markdown
Author

Not relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs revision A pull request that requires changes before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants