sendrawtransaction tx decode failed
./ipchain-cli createrawtransaction "[{"txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a9
error code: -8 error message: Invalid parameter, txid can't found but,My txid is there in the exploer :http://exploer.qingdoutech.com/insight/address/ZCBQz2e1a62zw7HvhqzcYxsxdE7Gz4aGK2Bu
i just want to known the reason.
./ipchain-cli createrawtransaction "[{"txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.0999}"
I don't know what do you want to? txid is exist in the block chain, why do you want to createrawtransaction use same id? why? If you want to get the tx information, you should use gettransaction RPC function.
i just want to use that output to make the other transaction's input,I am assembling a transaction.So use this “ createrawtransaction”command to sign。
IPC is based on the UTXO model. So txid is needed to create new transactions. If ZCBQz2e1a62zw7HvhqzcYxsxdE7Gz4aGK2Bu is yours, you can use "Vout": 0. If ZCBhQ9JkxMKDkUmsAVuaMdPGuNFBsFMXVUPh is yours, you can use "Vout": 1.
Are you sure your wallet correct private key exist or offline to create transaction? (If you change your wallet keys?) This RPC need your wallet to sign use your private key! Otherwise, you couldn't get good information.
@FlyLiuYan Could you provide a example to use "createrawtransaction" to Rui2guo? Thanks!
If I am offline signing,using the “createrawtransactionForIsolation” what does the scriptPubKey mean? ./ipchain-cli createrawtransactionForIsolation "[{"amount":1.10000000 ,"scriptPubKey":"483045022100def21cb3d4f7677ad36f089796c72f983261291da653a559ff0b92f93a6a7b3f022046e6e39d6139954bafa89bad847e33b6a18500b30a92a1c7b354358c06a8bcc4012102ce974af73878658cec43cd05d581603725280d25b851258ddd27353b80bd095a","txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.099}" I got the scriptPubKey from the exploer . it does not work error code: -8 error message: ProduceSignature DummySign error!
@FlyLiuYan yeah ZCBQz2e1a62zw7HvhqzcYxsxdE7Gz4aGK2Bu is mine,and i use the "vout": 0.instead of"Vout": 0.
@Rui2guo You should use "46c90258ad23c2db1b1bba2c7e89cde145494bb0" as your scriptPubKey if you use last TX vout 0 as your New Tx Input. Good luck!
@xiaohq002 Thank you for your help, but it does not work !./ipchain-cli createrawtransactionForIsolation "[{"amount":1.10000000 ,"scriptPubKey":"46c90258ad23c2db1b1bba2c7e89cde145494bb0","txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.099}" error code: -8 error message: ProduceSignature DummySign error!
could you teil me that What is this script, and where can I get it?
@Rui2guo :Hi! OP_DUP OP_HASH160 46c90258ad23c2db1b1bba2c7e89cde145494bb0 OP_EQUALVERIFY OP_CHECKSIG
OP_DUP : 0x76 OP_HASH160 : 0xa9 OP_EQUALVERIFY : 0x88 OP_CHECKSIG : 0xac
so script pubkey is :”76a946c90258ad23c2db1b1bba2c7e89cde145494bb088ac” You can try again!
Your transaction format is correct. But createrawtransaction is online .
If offline you need have a online node. 1 At the online node use importaddress to add the address. 2 At the online node use listunspent to find the vout info. 3 At the offline node use createrawtransactionForIsolation to create transaction.
@xiaohq002 oh god!!
./ipchain-cli createrawtransactionForIsolation "[{"amount":1.1,"scriptPubKey":"76a946c90258ad23c2db1b1bba2c7e89cde145494bb088ac","txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.099}" error code: -8 error message: ProduceSignature DummySign error!
I really don't know where there is the problem.
See these:
"Your transaction format is correct. But createrawtransaction is online .
If offline you need have a online node. 1 At the online node use importaddress to add the address. 2 At the online node use listunspent to find the vout info. 3 At the offline node use createrawtransactionForIsolation to create transaction."
@Rui2guo Have you solved your problem? ./ipchain-cli createrawtransactionForIsolation "[{"amount":1.1,"scriptPubKey":"76a946c90258ad23c2db1b1bba2c7e89cde145494bb088ac","txid":"2657d54951c6e96f92862afa2c48ddcd3b6a40ec5b2652e99eda2a916f526d23","vout":0}]" "{"ZCBKie4ejr9a6ZH37B1uTXJiAfeYJqLGcETc":1.099}"
Your scriptPubkey field is OK with the corresponding field in ListunpentNormal.
it does not work ,Why didn’t your project party develop the sdk corresponding to the signature?It is much more convenient for others to use. I understand that IPC's signature is similar to bitcoin, it is not clear what I want to sendrawtransaction is not working, therefore, I want to createrawtransaction--signrawtransaction to compare hexstring to known the reason.Can you help me find out which segment of hexstring is incorrect? my hexstring:"0100000001236d526f912ada9ee952265bec406a3bcddd482cfa2a86926fe9c65149d5572600000000fc0047304402204dac94acb35ee80681f6c37524ffc19b5572caf17ea18726b8233e37141fa2f50220271c4c9a58b2c4b7efea770d85421b7cbb36809755203bf670a7d0abac054d5901473044022021b3b3f067c07c492335ecfc373b48433f5ea72c865e67ef66616504abeea2470220244f583f33db060f44697228875c3086ca7464903fba300f637425d36adc1409014c69522102c5e5562c3ad429f4c29a802e89caa0df6c5916a60180ff8918f0250d036374bc2103ffffd432c4526a635598366dd056719443b8a3b19c4c090dbab4f4db7698dcca210316f564435a9a76daeaf645619e7423be8beb8ab3838457aa98efb3d2d71efeac53aeffffffff01e0f08c06000000001976a9140d074bc86bd388a45f1c8911a41b8f0705d9058b88ac00000000"
@Rui2guo I'd like to know how you can create a transaction with the creatrawtranaction interface, because the hexstring you're sending is in the wrong format and parsed incorrectly。
Yes, I just want to know why hexstring is the wrong format.My hexstring is a string structure generated by bitcoinj (bitcoin's signature algorithm),and I want to know what the correct IPC signature hexstring should look like.
Sure。“02000000017d5ef292b16a02631ddf8322c70982c5f4e05c34a918387c1d48af27a2bd2000000000006a4730440220654e1346ccac668db898ffe7c2d11381825b0d60a9fafc47f0acf660d83a69780220539ea55ad134fd79db746ab41a60792aec5298b6018bc9b594ac203d04cee28801210244de9ab8e30fc4b311ae1f27e0fc0eb0e0d335041fae7d8f53937b7539c7d4ccfeffffff020010a5d4e800000000001976a9149838c6db130ca27dc19241252ad0071360e1eab988ac0060c549a9d101000000001976a91457ddaf97efe60bd0c7b985f52a9d0f17866235c088ac00964f1500”。 This is a deal in our test network.
@Rui2guo Our signature algorithm is consistent with bitcoin, but there is an increase in transaction structure.
@summerxue1992 What changes have been made,
@Rui2guo It is recommended that we first look at the transaction structure in the source code.The transaction structure is modified in part Vout.
@summerxue1992 I wonder if you can help me to modify the ipc's SDK for offline signing.I really don't know what you serialized, when assembling txhash,I don't know much about c++ 。i can give you my git url : https://github.com/Rui2guo/IPCcoinj.git i already have modified the param, you can also watch it.
@Rui2guo Sorry, I can't help you. I don't understand java.