Giter Site home page Giter Site logo

multisig's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multisig's Issues

Custom program error: 0xa5

the log is below

Program 11111111111111111111111111111111 invoke [1]
Program 11111111111111111111111111111111 success
Program msigmtwzgXJHj2ext4XJjCDmpbcMuufFb5cHuwg6Xdt invoke [1]
Program log: Custom program error: 0xa5
Program msigmtwzgXJHj2ext4XJjCDmpbcMuufFb5cHuwg6Xdt consumed 3591 of 200000 compute units
Program msigmtwzgXJHj2ext4XJjCDmpbcMuufFb5cHuwg6Xdt failed: custom program error: 0xa5

i have tested on local test validator, all works well.

then failed on mainnet, please help

Instruction passed to inner instruction is too large (18446744073709551615 > 1280)' while ExecuteTransaction

let execute_tx;

try {
  execute_tx = await `program.methods`
    .executeTransaction()
    .accounts({
      multisig: multisigAccount.publicKey,
      multisigSigner: multisigSigner,
      transaction: transaction.publicKey,
    })
    .remainingAccounts(
      accounts
        // Change the signer status on the vendor signer since it's signed by the program, not the client.
        .map((meta) =>
          meta.pubkey.equals(multisigSigner)
            ? { ...meta, isSigner: false }
            : meta
        )
        .concat({
          pubkey: pid2,
          isWritable: false,
          isSigner: false,
        })
    )
    // .signers([transaction, owner1])
    .rpc();
    
   
    error whiuile executing transaction SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to complete.

    logs: [
'Program 5ehzd27DGK9cs1XHnpLVSPBFpNvaZYfNWFENEoU9h1s4 invoke [1]',
'Program log: Instruction: ExecuteTransaction',
'Program 5ehzd27DGK9cs1XHnpLVSPBFpNvaZYfNWFENEoU9h1s4 consumed 8979 of 200000 compute units',
'Program 5ehzd27DGK9cs1XHnpLVSPBFpNvaZYfNWFENEoU9h1s4 failed: Instruction passed to inner instruction is too large (18446744073709551615 > 1280)'

],

anchor -V
anchor-cli 0.29.0
I'm able to create multisig account, create raw tx and even sign the transaction but the execute transaction fails

i'm using the devnet, i see solutions to downgrade the version of solana like here:- https://solana.stackexchange.com/questions/6835/program-failed-to-complete-instruction-passed-to-inner-instruction-is-too-large
but i dont see a point as how would the cli version affect me calling methods using anchor.

although i did downgrade the version but still no luck

anchor build err

error: failed to download `solana-frozen-abi v1.7.11`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/Users/tpkeeper/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-frozen-abi-1.7.11/Cargo.toml`

Caused by:
  feature `resolver` is required

  consider adding `cargo-features = ["resolver"]` to the manifest

Atomically changing the owners of a unanimous multisig

Suppose you create a multisig where the threshold is equal to the number of owners, and you want to add an owner (and bump the threshold by one).

At this point, I don’t think there is a way to do this atomically, is there? Because a transaction only holds one Instruction, you need to issue two calls, one for set_owners and one for change_threshold. If you bump the threshold first it can never be satisfied any more, so the new owner must be added before changing the threshold, which means there is a window of time in between where a non-unanimous subset of owners can execute a transaction. This set of owners can be different from the initial owners: if the new owner approves, then the transaction can be executed without consent from one of the initial owners.

This problem is not limited to the case where the number of owners is equal to the threshold, but it’s most apparent there.

One solution would be to merge set_owners and change_threshold into a single function. Another solution would be to allow multiple instructions in a single transaction.

How to send the versioned transaction using address lookup table through safe address

I want to send the versioned transaction through a safe address like first creating the transaction through multisig and then making this transaction object as a versioned transaction (V0) using address lookup table to send on-chain but getting the error of signature verification failed.
Please provide the example about sending the version transaction using address lookup table through safe address

Purpose of `remainingAccounts` in `executeTransaction`?

Thanks for writing the multisig program (and sorry if this is the wrong venue for my question). I'm trying to understand the part where remainingAccounts are passed to executeTransaction:

https://github.com/project-serum/multisig/blob/c33b4286d5b930f090431d2290f4fdb0fb0b427f/tests/multisig.js#L110

What is the purpose of this argument? The accounts have already been set in createTransaction and it looks like they're simply being passed again here. Could you explain the purpose of this parameter wrt to this call, and remainingAccounts in general?

πŸ™Œ

anchor test: Transaction simulation failed: Error processing Instruction 0: Program failed to complete

git clone https://github.com/coral-xyz/multisig
cd multisig/
cargo install --git https://github.com/coral-xyz/anchor --tag v0.28.0 anchor-cli --locked
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y pkg-config build-essential libudev-dev
anchor --version
anchor-cli 0.28.0

anchor build
anchor test                
    Finished release [optimized] target(s) in 0.15s

Found a 'test' script in the Anchor.toml. Running it as a test suite!

Running test suite: "/home/andrey/valory/multisig/Anchor.toml"



  multisig
    1) Tests the multisig program
    βœ” Assert Unique Owners (62ms)


  1 passing (1s)
  1 failing

  1) multisig
       Tests the multisig program:
     Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Program failed to complete
      at Connection.sendEncodedTransaction (node_modules/@solana/web3.js/lib/index.cjs.js:7339:13)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Connection.sendRawTransaction (node_modules/@solana/web3.js/lib/index.cjs.js:7300:20)
      at async sendAndConfirmRawTransaction (node_modules/@project-serum/anchor/dist/cjs/provider.js:172:23)
      at async AnchorProvider.sendAndConfirm (node_modules/@project-serum/anchor/dist/cjs/provider.js:88:20)
      at async Object.rpc [as executeTransaction] (node_modules/@project-serum/anchor/dist/cjs/program/namespace/rpc.js:15:24)
      at async Context.<anonymous> (tests/multisig.js:104:5)

Changing owner set is insecure w.r.t. previous transactions

Changing the owner set might change the order of the owners or removes some owners entirely, which causes the signers vec to be incorrect.

Solution: invalidate all previous transactions whenever the owners set changes. This can be done with an owner set sequencer that gets incremented everytime it changes. Each transaction can have a tagged sequence and if it doesnt match the current owner set, the transaction is deemed invalid.

try to send transfer tx in multisig way but appears Translating error Error: Signature verification failed

here is main code

    const data = anchor.web3.SystemProgram.transfer({
      fromPubkey: multisigSigner,
      toPubkey: ownerA.publicKey,
      lamports: new anchor.BN(1000000000),
    }).data
    const transferPid = anchor.web3.SystemProgram.programId

    const transaction = anchor.web3.Keypair.generate();
    const txSize = 1000; // Big enough, cuz I'm lazy.
    await program.rpc.createTransaction(transferPid, accounts, data, {
      accounts: {
        multisig: multisig.publicKey,
        transaction: transaction.publicKey,
        proposer: ownerA.publicKey,
        rent: anchor.web3.SYSVAR_RENT_PUBKEY,
      },
      instructions: [
        await program.account.transaction.createInstruction(
          transaction,
          txSize
        ),
      ],
      signers: [transaction],
    });

await program.rpc.executeTransaction({
      accounts: {
        multisig: multisig.publicKey,
        multisigSigner,
        transaction: transaction.publicKey,
      },
      remainingAccounts:
        [{
          pubkey: multisig.publicKey,
          isWritable: true,
          isSigner: false,
        }, {
          pubkey: anchor.web3.SystemProgram.programId,
          isWritable: true,
          isSigner: false,
        }, {
          pubkey: multisigSigner,
          isWritable: true,
          isSigner: false,
        }, {
          pubkey: ownerA.publicKey,
          isWritable: true,
          isSigner: false,
        }, {
          pubkey: program.programId,
          isWritable: true,
          isSigner: false,
        }],
    });

Program {program id} failed: custom program error: 0x1778

Thanks for putting this together!

I'd like to run it locally but am having an issue getting it to work.

I don't understand the error I received while running this multisig example test run:

Transaction simulation failed: Error processing Instruction 1: custom program error: 0x1778 
    Program 11111111111111111111111111111111 invoke [1]
    Program 11111111111111111111111111111111 success
    Program 6tbPiQLgTU4ySYWyZGXbnVSAEzLc1uF8t5kJPXXgBmRP invoke [1]
    Program log: Instruction: CreateMultisig
    Program log: Custom program error: 0x1778
    Program 6tbPiQLgTU4ySYWyZGXbnVSAEzLc1uF8t5kJPXXgBmRP consumed 4765 of 200000 compute units
    Program 6tbPiQLgTU4ySYWyZGXbnVSAEzLc1uF8t5kJPXXgBmRP failed: custom program error: 0x1778

I followed the instructions on the README page.

If I'm doing something wrong please let me know.

Please advise, thanks.

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.