Skip to content

Fix/accept signed transaction as input#191

Closed
jk89 wants to merge 4 commits intoRaspberry-Devs:mainfrom
Nori-zk:fix/accept-signed-transaction-as-input
Closed

Fix/accept signed transaction as input#191
jk89 wants to merge 4 commits intoRaspberry-Devs:mainfrom
Nori-zk:fix/accept-signed-transaction-as-input

Conversation

@jk89
Copy link
Copy Markdown
Contributor

@jk89 jk89 commented Apr 6, 2026

Summary

The transaction parser only accepts raw unsigned ZkApp or Legacy transaction JSON. When a FROST signing session completes, it outputs a TransactionSignature wrapper containing the signed payload. This wrapper cannot be fed as input to a subsequent signing session, which prevents chained multi-group signing where one group signs first and the output is passed to the next group.

This PR adds TransactionSignature as a recognized input format. The parser tries it first, extracts the inner payload (which already contains the previous group's injected signature), then falls back to the existing ZkApp and Legacy parsing.

Depends on #190 (serde fix for ZkappUri/TokenSymbol) — the signed fixture contains string-valued zkappUri and tokenSymbol fields which require that fix to deserialize.

Structure

This PR contains two commits designed to be reviewed in sequence:

  1. addf641 test: Adds a failing test using a real admin-group-signed deploy-v0.0.6 fixture, proving the parser rejects TransactionSignature input. Checkout this commit and run cargo test -p mina-tx --lib to see the failure.
  2. d26b83a fix: Adds TransactionSignature parsing to from_str_network, trying it before ZkApp and Legacy. Checkout this commit and run cargo test -p mina-tx --lib to see all tests pass.

jk89 added 4 commits April 6, 2026 12:04
…o parse when set to JSON strings as produced by o1js, because the derived serde on Vec<u8> expects a JSON byte array instead. Added test for the real deploy-v0.0.4-unsigned.json fixture which fails to parse due to the zkappUri string field, a minimal reproduction for zkappUri as a string, a test proving the incorrect 32-character ZkappUri length limit rejects real URLs, and a minimal reproduction for tokenSymbol as a string. All four tests currently fail documenting the limitation.
…ol to accept JSON strings as produced by o1js, removed the incorrect 32-character ZkappUri length limit, and fixed from_str_network to surface actual serde errors instead of swallowing them. Resolves all four failing tests from the previous commit.
…TransactionSignature as input, only raw unsigned ZkApp or Legacy transaction JSON. This means the output of one FROST signing session cannot be fed as input to a subsequent signing session, preventing chained multi-group signing of the same transaction. The test uses a real signed fixture from a deploy-v0.0.6 ceremony and currently fails documenting the limitation.
…FROST signing session) as input to from_str_network, enabling chained multi-group signing where the output of one signing session is fed directly as input to the next. The parser now tries TransactionSignature first and extracts the inner payload which already contains the previous groups injected signature, then falls back to the existing ZkApp and Legacy parsing. Resolves the failing test from the previous commit.
@scaraven
Copy link
Copy Markdown
Member

scaraven commented Apr 8, 2026

Thanks for the PR, I've duplicated the pr to fix the CI errors in #193.

@scaraven scaraven closed this Apr 8, 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