Bitcoin
A$ 78,687
WINkLink
A$ 0.0007804
Ethereum
A$ 5,341.0

Alt-Stack in Script

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.

Edit:

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

Input as follows:
[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 Extra Bitcoins —And The Funding Is Already Worthwhile
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 Extra Bitcoins —And The Funding Is Already Worthwhile
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,687 0.32 % 3.26 % 10.85 %
Ethereum5,341.0 0.22 % 6.15 % 3.88 %
Binance Coin608.60 0.39 % 5.72 % 9.22 %
Tether1.330 0.14 % 0.07 % 0.02 %
Cardano2.580 0.79 % 10.04 % 11.89 %
Solana253.04 0.98 % 6.62 % 8.14 %
XRP1.350 1.11 % 9.34 % 11.69 %
Polkadot54.78 0.32 % 9.34 % 7.74 %
Shiba Inu0.00009804 3.03 % 36.02 % 151.62 %
USD Coin1.330 0.15 % 0.12 % 0.24 %

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/ [...]