Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scriptsig-not-pushonly (code 64) #242

Open
jsim77 opened this issue Jul 5, 2021 · 2 comments
Open

scriptsig-not-pushonly (code 64) #242

jsim77 opened this issue Jul 5, 2021 · 2 comments

Comments

@jsim77
Copy link

jsim77 commented Jul 5, 2021

I'm using Coinb.in and so far from Create Raw Transaction up to Sign Transaction, everything is okay except for Broadcast Transaction as I received the above-mentioned error code --> scriptsig-not-pushonly (code 64)

Okay this is the encoded bitcoin transaction which I've input under the Broadcast section:

0100000001000000000000000000000000000000000000000000000000000000000000000000000000210330e40ac3f32626310b0c265600d054b554060be3c9512cc0067da60db5353e14feffffff0100c39dd0000000001976a914ddca50bf194b13f3174073790c0fb62d84e3167188ac00000000

scriptsig-not-pushonly (code 64)

Okay before that, I'm creating a New Transaction so which means by logic, I don't have a Transaction ID, which is why I put all zeros. Also, throughout this transaction, I'm using the Segwit and Normal generated address in CoinB.in itself and there is no external wallet or private key here.

Any advice? Appreciate your kind advice to resolve this. Show me the mistakes, thanks in advance.

@junderw
Copy link
Contributor

junderw commented Jul 5, 2021

Your first input's scriptSig is just a raw public key without a push byte, so it is reading the 0x03 at the beginning of the public key as "push 3 bytes", which pushes 0x30e40a to the stack, then it tries reading the next byte as an op code which is 0xc3 which is an invalid op code.

Since scriptSig must only contain push data directives, this causes the error.

That said, an input pointing to a transaction id of all 0s is invalid, since such a transaction does not exist.

In order to send bitcoin you must first RECEIVE bitcoin. The transaction ID you use in your transaction is the ID of the transaction where you RECEIVED bitcoin. You then add an output to send however many bitcoin you want to wherever you're sending it... then you add another output back to yourself (this is known as change).

I highly recommend against using Coinbin with real money if you do not know these very basic things about bitcoin (and related coins)

Please play around with some testnet coins first until you understand how coinbin works. If you lose a bunch of testnet coins at least they're not worth anything.

@jsim77
Copy link
Author

jsim77 commented Jul 6, 2021

Overall, I understand what you meant. Thanks ya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants