Skip to content

fix(x/auth/tx): keep nested multisig ModeInfos in GetSigningTxData - #26815

Open
kriss39 wants to merge 1 commit into
cosmos:mainfrom
kriss39:fix/auth-tx-adapt-nested-modeinfos
Open

kriss39 wants to merge 1 commit into
cosmos:mainfrom
kriss39:fix/auth-tx-adapt-nested-modeinfos

Conversation

@kriss39

@kriss39 kriss39 commented Sep 13, 2026

Copy link
Copy Markdown

Description

adaptModeInfo (used by wrapper.GetSigningTxData to convert the gogoproto AuthInfo into the x/tx TxData) allocates the modeInfos slice for a multisig ModeInfo but adapts every nested entry into a throwaway &txv1beta1.ModeInfo{} and never stores it:

modeInfos := make([]*txv1beta1.ModeInfo, len(multiModeInfos))
for _, modeInfo := range multiModeInfos {
    adaptModeInfo(modeInfo, &txv1beta1.ModeInfo{})
}

The converted ModeInfo_Multi therefore carries a slice of nil pointers instead of the sub-signer mode infos. The current sign mode handlers do not read this field (DIRECT uses the raw AuthInfoBytes), so this has been latent since #15910, but any handler or downstream consumer that inspects TxData.AuthInfo.SignerInfos[i].ModeInfo.GetMulti().ModeInfos gets nil entries. Same function as the recent nil Multi/Bitarray fix in #26571.

Changes

  • Store each converted entry in modeInfos[i].
  • Regression test TestGetSigningTxData_MultisigModeInfos: a 2-of-2 multisig signature with a DIRECT and a LEGACY_AMINO_JSON sub-signer; asserts both nested mode infos are present and carry the right modes. Fails on main (Expected value not to be nil).

@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@kriss39
kriss39 force-pushed the fix/auth-tx-adapt-nested-modeinfos branch from 45f8571 to 37083dd Compare September 13, 2026 20:13

@dianab-cl dianab-cl left a comment

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.

Please Sign the commits

adaptModeInfo allocated the modeInfos slice for a multisig ModeInfo but
adapted every nested entry into a throwaway struct, so the converted
ModeInfo_Multi carried a slice of nil pointers instead of the sub-signer
mode infos. Store the converted entries in the slice.
@kriss39 kriss39 closed this Sep 14, 2026
@kriss39
kriss39 force-pushed the fix/auth-tx-adapt-nested-modeinfos branch from 37083dd to 8f265eb Compare September 14, 2026 08:43
@kriss39

kriss39 commented Sep 14, 2026

Copy link
Copy Markdown
Author

Done — replaced the commit with a signed one (ce7b429, same content), now shows as Verified.

@kriss39 kriss39 reopened this Sep 14, 2026
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.99%. Comparing base (8f265eb) to head (ce7b429).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #26815      +/-   ##
==========================================
+ Coverage   64.97%   64.99%   +0.01%     
==========================================
  Files         785      785              
  Lines       55413    55414       +1     
==========================================
+ Hits        36007    36016       +9     
+ Misses      19406    19398       -8     
Files with missing lines Coverage Δ
x/auth/tx/adapter.go 98.87% <100.00%> (+0.01%) ⬆️

... and 6 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kriss39
kriss39 requested a review from dianab-cl September 14, 2026 09:08
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