Bitcoin Forum
May 04, 2024, 07:28:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core won't send Tx (but testnet will) Error: scriptpubkey (code -26)  (Read 98 times)
FractalEncrypt (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 11


View Profile
January 09, 2021, 03:10:15 AM
Last edit: January 09, 2021, 03:41:22 AM by FractalEncrypt
Merited by ABCbits (1)
 #1

I have created a transaction with some null data and it sends fine on testnet, but on mainnet I am getting and error scriptpubkey (code -26)

I did some searching this seems to be an error for a non-standard transaction, but I don't see anything in the Debug log showing why the error.

Using Bitcoin Core QT GUI Console 0.20.1
Windows 10

This is the Transaction template

Code:
 createrawtransaction \
'[{"txid": "txid1", "vout": vout1},
{"txid": "txid2", "vout": vout2},
{"txid": "txid3", "vout": vout3},
{"txid": "txid4", "vout": vout4}]' \
'{"address1": Amount,
"address2": Amount,
"address3": Amount,
"address4": Amount,
"data": ""}'

This is the data I want to include
492c204672616374616c456e6372797074206365727469667920746861742074686520426974636 f696e2046756c6c204e6f6465205363756c707475726520342e3020776173206372656174656420 6f6e204a616e7561727920332c203230323120746f20636f6d6d656d6f726174652074686520313 2207965617220616e6e6976657273617279206f66205361746f736869206d696e696e6720746865 2047656e6573697320426c6f636b2e205468697320434f41207761732063726561746564206f6e2 04a616e7561727920382c203230323120746f20636f6d6d656d6f726174652074686520616e6e69 76657273617279206f6620746865206d696e696e67206f6620426c6f636b20312e0a

Here's the testnet transaction with this data included
https://live.blockcypher.com/btc-testnet/tx/04e4a0d8cdaba44bf34525d361b15e7ffdc69d2e12f4f3d3b3e1ae0e31b394ed/


EDIT: Maybe I am exceeding the OP_RETURN byte limit?
If so, is there a way to include my full data in a single or batched transaction somehow?

EDIT 2: I came across this, is there a way I can change my conf (OP_RETURN data size) to allow me to relay to tx to the network?
Standards
https://bitcoin.stackexchange.com/questions/78572/op-return-max-bytes-clarification
Quote
These rules are enforced during mempool acceptance. Each node can decide to implement different rules, provided they follow consensus rules, but many just accept the Bitcoin-core defaults upon installation. In this case 80 bytes is the default setting for OP_RETURN data size.
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714850907
Hero Member
*
Offline Offline

Posts: 1714850907

View Profile Personal Message (Offline)

Ignore
1714850907
Reply with quote  #2

1714850907
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
January 09, 2021, 03:49:53 AM
Merited by ABCbits (1), nc50lc (1)
 #2

Your OP_Return has to be below 80 bytes (or a little less) or it'll be rejected by the relaying nodes as it is non-standard. Testnet is able to relay the transaction because the standardness rules are disabled there.

To increase the limit, run Bitcoin Core with -datacarriersize=X, where X is the size in bytes. Note that this only ensures that your own node is able to relay or mine transactions with OP_Return greater than X. It does not mean that the other nodes will relay or any miners will mine your transaction.

Each standard transaction can only contain a single OP_return script so you're out of luck there.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
January 09, 2021, 03:53:13 AM
 #3

EDIT: Maybe I am exceeding the OP_RETURN byte limit?
If so, is there a way to include my full data in a single or batched transaction somehow?
Not in a single transaction, you're only allowed a single OP_RETURN. So, you'd need to create multiple transactions, each with an OP_RETURN.


EDIT 2: I came across this, is there a way I can change my conf (OP_RETURN data size) to allow me to relay to tx to the network?
The issue  you're going to face with that "solution" is that while your node would then ignore the OP_RETURN data size and try to send the transaction out, every other node would reject it... unless you could find a friendly miner that agreed to manually include the transaction directly into a block, your transaction would not propagate across the network well (or at all) and would not be seen by any miners.


ps. The Bitcoin blockchain is not really designed for storing "arbitrary" data like this... it's borderline "spam" Tongue

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
FractalEncrypt (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 11


View Profile
January 09, 2021, 03:58:33 AM
 #4

EDIT: Maybe I am exceeding the OP_RETURN byte limit?
If so, is there a way to include my full data in a single or batched transaction somehow?
Not in a single transaction, you're only allowed a single OP_RETURN. So, you'd need to create multiple transactions, each with an OP_RETURN.


EDIT 2: I came across this, is there a way I can change my conf (OP_RETURN data size) to allow me to relay to tx to the network?
The issue  you're going to face with that "solution" is that while your node would then ignore the OP_RETURN data size and try to send the transaction out, every other node would reject it... unless you could find a friendly miner that agreed to manually include the transaction directly into a block, your transaction would not propagate across the network well (or at all) and would not be seen by any miners.


ps. The Bitcoin blockchain is not really designed for storing "arbitrary" data like this... it's borderline "spam" Tongue

I...understand. And I appreciate your help and guidance.
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5588


Self-proclaimed Genius


View Profile
January 09, 2021, 04:50:12 AM
 #5

If it's worthy enough, try to contact Poolin's operator, I think he's open for non-standard transactions for a price.
Reference post is in the link.

However, if you want to go for multiple transactions, it's best to make it a set of transactions which the second spends the change of the first and the third spends the change of the second and so forth.
The transaction fees should be in ascending order, the first having the least transaction fee rate, lastly, the first-few's fee rates shouldn't be enough to be mined before the last one is broadcasted.
It is to ensure that all will be included in a single block and in the correct order (through CPFP).

BTW, I have posted recently but I've deleted it because I'm minutes later than the reply with the same info.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
FractalEncrypt (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 11


View Profile
January 14, 2021, 08:54:46 PM
 #6

This is all super info, really appreciate it!!!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!