Skip to content

test: sig verification panic on nil pub key #4879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 9, 2025

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented May 26, 2025

Closes #4847

@rootulp rootulp self-assigned this May 26, 2025
@rootulp

This comment was marked as resolved.

@rootulp
Copy link
Collaborator Author

rootulp commented May 27, 2025

Finally able to repro the exact error stack trace

--- FAIL: TestSigVerificationDecorator (0.03s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x1022e76e0]

goroutine 27 [running]:
testing.tRunner.func1.2({0x1044c6a60, 0x106f8d3f0})
	/Users/rootulp/sdk/go1.23.8/src/testing/testing.go:1632 +0x1bc
testing.tRunner.func1()
	/Users/rootulp/sdk/go1.23.8/src/testing/testing.go:1635 +0x334
panic({0x1044c6a60?, 0x106f8d3f0?})
	/Users/rootulp/sdk/go1.23.8/src/runtime/panic.go:791 +0x124
github.com/cosmos/cosmos-sdk/x/auth/tx.(*wrapper).GetSigningTxData(0x14001a24880)
	/Users/rootulp/go/pkg/mod/github.com/celestiaorg/[email protected]/x/auth/tx/adapter.go:63 +0x540
github.com/cosmos/cosmos-sdk/x/auth/ante.SigVerificationDecorator.AnteHandle({{_, _}, _}, {{0x104bc9c30, 0x10706c840}, {0x104be9390, 0x140014c4d00}, {{0x0, 0x0}, {0x0, ...}, ...}, ...}, ...)
	/Users/rootulp/go/pkg/mod/github.com/celestiaorg/[email protected]/x/auth/ante/sigverify.go:322 +0x734
github.com/celestiaorg/celestia-app/v4/app/ante_test.TestSigVerificationDecorator(0x14000492b60)
	/Users/rootulp/git/rootulp/celestiaorg/celestia-app/app/ante/ante_test.go:43 +0x39c
testing.tRunner(0x14000492b60, 0x104b60af0)
	/Users/rootulp/sdk/go1.23.8/src/testing/testing.go:1690 +0xe4
created by testing.(*T).Run in goroutine 1
	/Users/rootulp/sdk/go1.23.8/src/testing/testing.go:1743 +0x314
FAIL	github.com/celestiaorg/celestia-app/v4/app/ante	0.656s
FAIL

@rootulp rootulp changed the title test: repro panic test: sig verification panic on nil pub key Jun 8, 2025
@rootulp rootulp requested review from tac0turtle and julienrbrt June 8, 2025 00:24
@rootulp rootulp added the WS: V4 label Jun 8, 2025
@rootulp rootulp marked this pull request as ready for review June 8, 2025 00:24
@rootulp rootulp requested a review from a team as a code owner June 8, 2025 00:24
@rootulp rootulp requested review from Manav-Aggarwal and cmwaters and removed request for a team and Manav-Aggarwal June 8, 2025 00:24
@rootulp rootulp removed the request for review from cmwaters June 8, 2025 00:31
@rootulp rootulp requested review from damiannolan and removed request for cmwaters, ninabarbakadze and rach-id June 9, 2025 16:49
Copy link
Member

@rach-id rach-id left a comment

Choose a reason for hiding this comment

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

so the plan is to wait and see if the cosmos-sdk's upstream changes this to stop panicking in this case and pull their changes?

what about syncing? if I understand correctly, when syncing with the new sdk, this panics and it shows in the logs, should we document somewhere that these are expected logs (for node operators not to bombard us with questions about this?)

@evan-forbes evan-forbes merged commit c02f2cc into celestiaorg:main Jun 9, 2025
29 checks passed
@rootulp
Copy link
Collaborator Author

rootulp commented Jun 9, 2025

so the plan is to wait and see if the cosmos-sdk's upstream changes this to stop panicking in this case and pull their changes?

Yes.

what about syncing? if I understand correctly, when syncing with the new sdk, this panics and it shows in the logs, should we document somewhere that these are expected logs (for node operators not to bombard us with questions about this?)

I don't think the logs will occur during syncing because a tx with a nil pubkey in the signature data shouldn't be included in any blocks. The log will only appear for new txs that enter a node's mempool. We could still document it somewhere

@rootulp rootulp deleted the rp/invalid-MsgPayForBlobs branch June 9, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid memory address or nil pointer dereference\ncaused by transaction:\n*types.MsgPayForBlobs
3 participants