Skip to content

relayer: encode txn bundles with deploy txn as guest module payloads (v3)#344

Closed
patrislav wants to merge 2 commits into
masterfrom
v3-relay-guest-deploy
Closed

relayer: encode txn bundles with deploy txn as guest module payloads (v3)#344
patrislav wants to merge 2 commits into
masterfrom
v3-relay-guest-deploy

Conversation

@patrislav
Copy link
Copy Markdown
Member

@patrislav patrislav commented Mar 13, 2026

This PR fixes v3 transaction bundles that contain a deploy txn. If one is found, it is removed from the bundle, then the remaining bundle is wrapped into a payload of a call to the guest module.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0359e4f65e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread relayer.go Outdated
@patrislav
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 207bbc62e2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread relayer.go Outdated
Comment thread relayer.go Outdated
@patrislav patrislav force-pushed the v3-relay-guest-deploy branch from 207bbc6 to 2101231 Compare March 16, 2026 19:03
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

execdata, err := contracts.V3.WalletStage1Module.Encode("execute", payload.Encode(walletAddress), seqSig)

P1 Badge Re-sign filtered wallet payload before execute encoding

When a bundle includes both a factory call and regular wallet calls, seqSig was produced for the original full payload (see SignTransactions building/signing txns.Payload(...) in wallet.go), but this code verifies that same signature against walletTxns after filtering out factory calls. That makes the nested wallet execute signature invalid, so the guest bundle reverts at the wallet step and post-deploy calls never run. The execute payload here must be signed for the filtered call set (or the transformation must happen before signing).

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@attente attente left a comment

Choose a reason for hiding this comment

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

Hey, thanks for these changes, but I think I need more context here. Why is this change needed? It feels like Codex is correct here that the signature passed in would no longer be valid for the new filtered set of non-factory calls.

Is it because the signature was generated using only the non-factory calls? Where is this issue surfacing?

@patrislav
Copy link
Copy Markdown
Member Author

Hey, thanks for these changes, but I think I need more context here. Why is this change needed? It feels like Codex is correct here that the signature passed in would no longer be valid for the new filtered set of non-factory calls.

Is it because the signature was generated using only the non-factory calls? Where is this issue surfacing?

Yeah, strange it only found the issue on the 3rd try, but it's 100% correct. It works when sending just a deploy txn on its own or just non-deploy txns but fails when mixing the two.

My issue was when using w.Deploy() or when relaying bundles that include a deploy txn, the EncodeTransactionsForRelayingV3 function would always attempt to send the whole bundle to the wallet contract, with seemingly no way to use the guest module (as it would be wrapped anyway.) Am I thinking about it wrong though? I'm not too familiar with the relaying handling so maybe there's something I've missed.

@attente
Copy link
Copy Markdown
Contributor

attente commented Mar 17, 2026

Thanks, but closing in favour of #350.

@attente attente closed this Mar 17, 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