Giter Club home page Giter Club logo

Comments (10)

mperklin avatar mperklin commented on June 6, 2024 4

I ran into this bug earlier today while trying to sign a multisig transaction with a ledger nano s device, and had an opportunity to do some debugging.

I was able to extract the encoded transaction from the browser debugger, and then decode that transaction back into JSON to inspect it.

I noted that both the chain-id (cosmoshub-4) and the account number were not present in the resultant JSON, but the sequence value was.
After trying to sign in different ways (via webusb and via keplr2) it seemed that signing with keplr2 failed to include those 2 fields, however signing with webusb produced a transaction that correctly included the chainid and account number.

It's my hope that this information may assist some developer in identifying a bug involving this multisig webapp and keplr2.

Good luck!

from cosmos-multisig-ui.

samepant avatar samepant commented on June 6, 2024 2

Ya I'm seeing this as well. Looking into it

from cosmos-multisig-ui.

webmaster128 avatar webmaster128 commented on June 6, 2024

The multisig account has no outgoing transactions, so sequence 0 is correct.

So it can be an signature verification problem, which is very hard to debug.

from cosmos-multisig-ui.

arunsybex avatar arunsybex commented on June 6, 2024

@webmaster128 I'm also facing the same issue.

Can you please share signing multisig tx with mnemonic( using cosmosJs not kepler).

from cosmos-multisig-ui.

webmaster128 avatar webmaster128 commented on June 6, 2024

I don't know what the problem is and don't have and testing keys available. I'm just saying the sequence in the original report looks alright.

from cosmos-multisig-ui.

arunsybex avatar arunsybex commented on June 6, 2024

@webmaster128 instead of Kepler how to sign with mnemonic?

`
const M1 = "swear buyer security impulse public stereo peasant correct cross tornado bid discover anchor float venture deal patch property cool wreck eight dwarf december surface"

const wallet = await Secp256k1HdWallet.fromMnemonic(M1, {
hdPaths: [makeCosmoshubPath(0)],
});

const pubkey = encodeSecp256k1Pubkey((await wallet.getAccounts())[0].pubkey);
const address = (await wallet.getAccounts())[0].address;
const signingClient_w1 = await SigningStargateClient.offline(wallet);

const signerData: SignerData = {
accountNumber: signingInstruction.accountNumber,
sequence: signingInstruction.sequence,
chainId: signingInstruction.chainId,
};

const { bodyBytes: bb, signatures : sig1 } = await signingClient_w1.sign(
address,
signingInstruction.msgs,
signingInstruction.fee,
signingInstruction.memo,
signerData,
);

let ledger = {
"bodyBytes": "CosBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmsKLGZldGNoMXFzOTJkbGpnYWM1cXNlN3VyZXpzMHJ2ZG5lcXU3bG13OW1zaGN3EixmZXRjaDFxcGh4MmtuenJrZ3Z4cWV2NmgzOWRtd2x5aGg0bDl4cnI0d3BsMBoNCghhdGVzdGZldBIBMRIWVXNlIHlvdXIgdG9rZW5zIHdpc2VseQ==",
"signature": "Yi0sC7F8slJLPlVPhLL0gHpMiZvhkQgKSl8I/Pmmv3UAmoiMpgewKdeZp1P5XJTtpHDbw/kJh3M+RefnSQMC7g==",
"address": "fetch1sr4jyvtk4kfwljywdnuzjurqlzlunsmvemhx55"
}
const broadcaster = await StargateClient.connect(data.rpc);
const signedTx = makeMultisignedTx(
multisigPubkey,
signingInstruction.sequence,
signingInstruction.fee,
bodyBytes,
new Map<string, Uint8Array>([
[ledger.address, fromBase64(ledger.signature)],
[address, sig1[0]]
]),
);

const result = await broadcaster.broadcastTx(Uint8Array.from(TxRaw.encode(signedTx).finish()));
console.log(result);

`

I tried form your code but getting signature error :(

from cosmos-multisig-ui.

nooomski avatar nooomski commented on June 6, 2024

Hey @arunsybex , your question isn't really relevant to this issue. I would suggest you learn how to sign with a mnemonic here so that we can keep the discussion about the issue here.

from cosmos-multisig-ui.

webmaster128 avatar webmaster128 commented on June 6, 2024

Also please see https://github.com/cosmos/cosmjs/blob/d63eba99dce35be37d9267899489906ee77d9f3f/packages/stargate/src/multisignature.spec.ts#L172-L274. Feel free to open a ticket in cosmjs if this is not working.

from cosmos-multisig-ui.

arunsybex avatar arunsybex commented on June 6, 2024

@webmaster128 above one is working fine with mnemonics but I'm facing an issue while adding the ledger signature.

from cosmos-multisig-ui.

webmaster128 avatar webmaster128 commented on June 6, 2024

Unclear what the issue was. signature verification failed can have many different reasons such as signed by a wrong signer. Closing for now as it might already be covered.

from cosmos-multisig-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.