Skip to content
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

[Bug]: failing tx generation for multisig address with gas=auto #16190

Closed
mircea-c opened this issue May 16, 2023 · 4 comments
Closed

[Bug]: failing tx generation for multisig address with gas=auto #16190

mircea-c opened this issue May 16, 2023 · 4 comments
Labels
C:antehandler Antehandler related T:Bug

Comments

@mircea-c
Copy link

Summary of Bug

Trying to generate a transaction with --gas auto for a multisig address fails with the following error

Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = expected *signing.MultiSignatureData, got, *signing.SingleSignatureData With gas wanted: '0' and gas used: '50955' : unknown request

Version

Tested with multiple v0.45.x minor versions

Steps to Reproduce

Generate a transaction using any multisig address and the command flags from the following example:

gaiad tx distribution withdraw-rewards ${VALOPER} --from ${MULTISIG_ADDR} --generate-only --gas auto
@mircea-c mircea-c added the T:Bug label May 16, 2023
@julienrbrt
Copy link
Member

julienrbrt commented May 16, 2023

Given that v0.45, will not receive any bug fix. Are you able to reproduce with a v0.46+ chain?

@mircea-c
Copy link
Author

Can confirm the bug is still present in 0.46.7

regen tx distribution withdraw-rewards regenvaloper1kl83t6gm2y5lgg5c5h3sz87tt5fg3cmyl2sksd --from regen1kl83t6gm2y5lgg5c5h3sz87tt5fg3cmyrddngu --generate-only --gas auto
Error: rpc error: code = Unknown desc = rpc error: code = Unknown desc = expected *signing.MultiSignatureData, got, *signing.SingleSignatureData With gas wanted: '18446744073709551615' and gas used: '60194' : unknown request
build_tags: '"osusergo,netgo,ledger,static_build"'
commit: c08da230dae102c3051b383e17532e20b238fb71
cosmos_sdk_version: v0.46.7
go: go version go1.20.3 linux/amd64
name: regen
server_name: regen
version: 5.1.0

@alexanderbez
Copy link
Contributor

This is coming from DefaultSigVerificationGasConsumer and most likely due to the fact that the Tx is multi-sig-based. Simulations use a dummy Secp256k1 Pubkey singleton to simulate signature verification cost. So using a multi-sig in the tx won't help you much. I would suggest avoiding signing the tx prior to simulation.

Granted, we should look into this more to maybe do this automatically?

@github-project-automation github-project-automation bot moved this to 👀 To Do in Cosmos-SDK Nov 16, 2023
@tac0turtle tac0turtle added the C:antehandler Antehandler related label Nov 16, 2023
@JulianToledano
Copy link
Contributor

hey guys, I think this could have been solved in #18472

@github-project-automation github-project-automation bot moved this from 👀 To Do to 🥳 Done in Cosmos-SDK Dec 4, 2023
@tac0turtle tac0turtle removed this from Cosmos-SDK Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:antehandler Antehandler related T:Bug
Projects
None yet
Development

No branches or pull requests

5 participants