Skip to content

fix(DecodeExecdata): skip recursive bundle decode when result would violate IsValid()#357

Open
ScreamingHawk wants to merge 1 commit intomasterfrom
fix/decode-execdata-nested-guest-module
Open

fix(DecodeExecdata): skip recursive bundle decode when result would violate IsValid()#357
ScreamingHawk wants to merge 1 commit intomasterfrom
fix/decode-execdata-nested-guest-module

Conversation

@ScreamingHawk
Copy link
Copy Markdown
Contributor

I encountered this bug when trying to recover a failed Trails interaction with my V2 Sequence wallet.

Steps to reproduce:

  • Navigate to Trails
  • Connect a Sequence v2 wallet
  • Submit a failing transaction
  • Attempt recovery
  • Sign the data, submit the transaction
  • Transaction fails when calling the relayer as below

When a V1/V2 execute call contains a nested transaction targeting the V3 guest module, DecodeExecdata's recursive loop successfully decoded the packed V3 payload and set Nonce (non-nil) while leaving Signature nil. This violates the invariant in IsValid() — nonce and signature must both be set or both nil — which caused ComputeMetaTxnID to fail with:

"transactions must have both nonce and signature or neither"

Fix: validate the decoded bundle via IsValid() before applying it. If the result is inconsistent (e.g. nonce-without-signature for guest module calls), the transaction is left as calldata rather than promoted to a bundle.

…iolate IsValid()

When a V1 execute call contains a nested transaction targeting the V3 guest
module, DecodeExecdata's recursive loop successfully decoded the packed V3
payload and set Nonce (non-nil) while leaving Signature nil. This violates
the invariant in IsValid() — nonce and signature must both be set or both nil —
which caused ComputeMetaTxnID to fail with:

  "transactions must have both nonce and signature or neither"

Fix: validate the decoded bundle via IsValid() before applying it. If the
result is inconsistent (e.g. nonce-without-signature for guest module calls),
the transaction is left as calldata rather than promoted to a bundle.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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