Bitcoin Forum
May 29, 2024, 01:35:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Re: Looking for Blockchain developer - new/experience/work for coin on: September 05, 2020, 07:45:07 AM
Hi  Cool
That's interesting for me. I've 2+ years of experience with a different crypto projects. One of them is blockchain application which is PoA based.
Tried to write in PM, but can't with my status.
If interesting details you can ask in telegram @andrew_andrew12
2  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][ICO]Emiba - high-profitable synthesis of diamond raw on: October 19, 2018, 01:08:26 PM
Very interesting project, I wish you the best  Wink
3  Bitcoin / Development & Technical Discussion / Re: Error while sending transaction with own script on: August 26, 2018, 10:22:57 AM
I see this input script:
Code:
4C141F8B0800FFC1765400038D78055C545DF3FF5D4A4C141F8B0800FFC1765400038D78055C545DF3FF5D4A4C141F8B0800FFC1765400038D78055C545DF3FF5D4AA94C141C18EB2E89217B39A344622D3EAF2368F220674788A94C141C18EB2E89217B39A344622D3EAF2368F220674788A94C141C18EB2E89217B39A344622D3EAF2368F220674787

4C is OP_PUSHDATA, saying next byte is # of bytes that go onto stack. Next byte is 14, which is decimal 20 bytes on stack... you say you want to push DATA1 (520 bytes) on stack?
520 bytes is hex 0x208, so maybe you want to say PUSHDATA 0x208 <520 bytes>?
520 bytes written from the source of the script. But I use three identical parts of 20 bytes to make it easier. They are also the same to make it easier to replace the hash because it's not entirely clear how to get the hash160. I know that first I need to hash in sha256 and then in RIPEMD160 but there are different values depending on the case of letters after hashing in sha256 and I do not know what case exactly is needed. For example hash160 of OP_TRUE should be da1745e9b549bd0bfa1a569971c77eba30cd5a4b but when I'm hashing 51 with sha-256 I get 031b4af5197ec30a926f48cf40e11a7dbc470048a21e4003b7a3c07c5dab1baa ripemd160 of which d3212ee812e38323ebb60b193c5d54bd55728b38 and what's wrong?



And: "Data push larger than necessary" indicates a situation, where you use 2 opcodes, whereas a single one would be fully sufficient. Hence when pushing 20 bytes (hex 14) to stack, a single command "0x14" is sufficient (https://en.bitcoin.it/wiki/Script).
From another thread, I copied this comment into one of my scripts:
# 1.) OP_PUSHDATA1 and even OP_PUSHDATA2 are allowed inside P2SH scripts fine.
# However, there is another policy in Bitcoin Core to require that all pushes
# are minimal in standard transactions. That means you can only use
# OP_PUSHDATA1 when a direct push is not possible (up to 75 bytes), and only
# use OP_PUSHDATA2 when an OP_PUSHDATA1 is not possible (up to 255 bytes).
This is very useful, thank you.
But for now I have transaction:
Quote
020000000001019e1ab6b4683d58a37f969991304798bbbf7687599f057de0ae61f92945fd12160 000000085141f8b0800ffc1765400038d78055c545df3ff5d4a141f8b0800ffc1765400038d7805 5c545df3ff5d4a141f8b0800ffc1765400038d78055c545df3ff5d4a45a9147348ade0b3cbbc86a 50396bfdccb047525ee890288a9147348ade0b3cbbc86a50396bfdccb047525ee890288a9147348 ade0b3cbbc86a50396bfdccb047525ee890287ffffffff02801d2c040000000017a9141a75cd53e 9740caadbf83cbefdd087cdceb978a48760F590000000000017a914ceb069bfa77f4a589e63eb4a d022ef122100453887024830450221008cf6b0c4741be13e058e33123b337836da4eb487dde98da 9adc7a26cf3b7b6f10220369d85d178a2af9b34af8104c46822b353e59371ebe8310e1095ad96f9 c128cc012102ada9884dbd1e8bd90968ba66256f017cd77d83595027f7929ae3537f98c92d4a000 00000
Input script of which
Quote
141f8b0800ffc1765400038d78055c545df3ff5d4a141f8b0800ffc1765400038d78055c545df3f f5d4a141f8b0800ffc1765400038d78055c545df3ff5d4a45a9147348ade0b3cbbc86a50396bfdc cb047525ee890288a9147348ade0b3cbbc86a50396bfdccb047525ee890288a9147348ade0b3cbb c86a50396bfdccb047525ee890287
In this script I perform: OP_PUSHDATA < Data 1 (20 bytes) >OP_PUSHDATA < Data 2 (20 bytes) > OP_PUSHDATA < Data 3 (20 bytes) > OP_PUSHDATA < RedeemScript > where RedeemScript pattern as in first my message. And for now I get error code=-26, message=16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack element).

Also I have one more question. As I understand hash of RedeemScript should be equal output of previous transaction. So in my case should I firstly create transaction with output which equals of hash160(a9147348ade0b3cbbc86a50396bfdccb047525ee890288a9147348ade0b3cbbc86a50396bfdccb0 47525ee890288a9147348ade0b3cbbc86a50396bfdccb047525ee890287)?
4  Bitcoin / Development & Technical Discussion / Error while sending transaction with own script on: August 24, 2018, 01:35:25 PM
I want to send transaction with some data with using p2sh.
But when I inserting my own script in a transaction I'm getting error from my bitcoind client: "code=-26, message=16: mandatory-script-verify-flag-failed (Data push larger than necessary)".
Script has been written according to the Working Paper Data Insertion in Bitcoin's Blockchain. Which says that I can store with P2SH with using this script:
Quote
Input Script: OP_PUSHDATA < Data 1 (520 bytes) > OP_PUSHDATA < Data 2 (520 bytes) > OP_PUSHDATA < Data 3 (520 bytes) > < RedeemScript >
Redeem Script: OP HASH160  OP_PUSHDATA< Data3Hash > OP EQUALVERIFY OP HASH160 OP_PUSHDATA< Data2Hash > OP EQUALVERIFY OP HASH160 OP_PUSHDATA < Data1Hash > OP [/sup]EQUAL

This is example of my signed raw transaction with script written according to that manner. And I'm trying to insert less than 520 bytes, only 20.
Quote
020000000001019e1ab6b4683d58a37f969991304798bbbf7687599f057de0ae61f92945fd12160 00000008a4c141f8b0800ffc1765400038d78055c545df3ff5d4a4c141f8b0800ffc1765400038d 78055c545df3ff5d4a4c141f8b0800ffc1765400038d78055c545df3ff5d4aa94c141c18eb2e892 17b39a344622d3eaf2368f220674788a94c141c18eb2e89217b39a344622d3eaf2368f220674788 a94c141c18eb2e89217b39a344622d3eaf2368f220674787ffffffff02BB51D9000000000017a91 4182fd008c33ac992bda3bac7e09297ebe8639aca87800bb2030000000017a914182fd008c33ac9 92bda3bac7e09297ebe8639aca87024730440220110ff8ea143c0e1b14da35103ee285be9c0729a 79a1e70c543627da58c07947c02204afd8d5a29d50d3519735b33ada00a09fbf379e424b137f547 d3f5cd9db24f62012102ada9884dbd1e8bd90968ba66256f017cd77d83595027f7929ae3537f98c 92d4a00000000

I'll be thankful for any help and sorry for my English. 
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!