Bitcoin
A$ 78,753
WINkLink
A$ 0.0007796
Ethereum
A$ 5,339.0

Alt Stack is not working as expected

I have a scenario as follows:

  • In a company, there is a manager and three employees. The multisig signature will be redeemed by the manager combined with one of the employees.
  • However, only the manager, or only the employees with enough number of signatures will not be able to redeem the transaction
  • The order of the signatures should not matter
  • Assume my_public_key is manager_public_key

My solution was: [OP_2DUP, my_public_key, OP_CHECKSIG, OP_IF, OP_DROP, OP_ELSE, my_public_key, OP_CHECKSIGVERIFY, OP_SWAP, OP_ENDIF, OP_DROP, OP_1, employee1_public_key, employee2_public_key, employee3_public_key, OP_3, OP_CHECKMULTISIG]

So I tried to shorten the script in order to have less bit in a transaction by using alt-stack.

My suggested solution is just to duplicate the my_public_key and push it into the alt-stack and whenever I need it later, I can pop it from the alt-stack and use it. So by the final script I should deduct the script by one public key.

Suggested solution: [OP_2DUP, my_public_key, OP_DUP, OP_TOALTSTACK, OP_CHECKSIG, OP_IF, OP_DROP, OP_ELSE, OP_FROMALTSTACK, OP_CHECKSIGVERIFY, OP_SWAP, OP_ENDIF, OP_DROP, OP_1, employee1_public_key, employee2_public_key, employee3_public_key, OP_3, OP_CHECKMULTISIG]

My suggested solution gives reference error.
I would be happy if anyone can help me.

Error:
{“error”: “Error validating transaction: Rejected script for input 0 referencing 5f026fb3260c809d446740917bca4aa0e8633f64ec86fc8a4c5e23979f1578ba at 0..”}

Input script:
[OP_0, manager_sig,employee_sig]

Related Posts

Leave a Reply

Subscribe To Newsletter

For updates and exclusive offers, enter your e-mail below.

Donate To Cryptonic Australia


Donate BTC: 1MPYuHUKm3AhNivMSngqLnoEbpNEecHeEK
Donate Doge: DDYybw7H8zx8EYU74JrGW8WwmYh9AGuyMC
Donate WinK: TDiXutqKE3P17LpZMQh3SDBCGSkAC6iEjB




Bitcoin Dives Beneath $60K, Why Bulls Might Battle In Brief-Time period
October 28, 2021
El Salvador Buys The Dip: 420 More Bitcoins —And The Investment Is Already Profitable
October 28, 2021
Assist I need to discover out if i personal bit cash or not [duplicate]
October 28, 2021




Bitcoin Dives Beneath $60K, Why Bulls Might Battle In Brief-Time period
October 28, 2021
El Salvador Buys The Dip: 420 More Bitcoins —And The Investment Is Already Profitable
October 28, 2021
Assist I need to discover out if i personal bit cash or not [duplicate]
October 28, 2021


CryptoCurrencyAUDChange 1hChange 24hChange 7d
Bitcoin78,753 0.34 % 4.37 % 10.78 %
Ethereum5,339.0 0.36 % 6.87 % 3.92 %
Binance Coin608.92 0.46 % 6.66 % 9.18 %
Tether1.330 0.02 % 1.06 % 0.01 %
Cardano2.570 0.47 % 11.08 % 12.19 %
Solana250.35 0.33 % 9.06 % 6.99 %
XRP1.330 0.29 % 11.26 % 12.48 %
Polkadot55.09 0.95 % 9.10 % 7.21 %
Shiba Inu0.0001044 7.93 % 46.80 % 167.87 %
USD Coin1.330 0.12 % 0.57 % 0.19 %

Recent Comments

Allison wick

I was a victim of WDC Markets investment scam some months ago myself. It was...

Greatness

he is the best when it comes to recovery, he helped recover my funds without...

URL

... [Trackback] [...] There you will find 63491 more Infos: cryptonic.com.au/evaluation-suggests-bitcoin-robust-palms-are-shopping-for-this-dip/ [...]