Standard Transaction Defenitions in params file

+1 vote

What should be the max-std-tx-size if OP_RETURN count = 10 and OP_RETURN size = 8MB?
(I have set max block size to 32 MB, should I decrease OP_RETURN count  if max block size is 32MB? )

following are the entries in the params file:

# Standard transaction definitions

only-accept-std-txs = true              # Only accept and relay transactions which qualify as 'standard'.
max-std-tx-size = 4194304               # Maximum size of standard transactions, in bytes. (1024 - 10000000)
max-std-op-returns-count = 10           # Maximum number of OP_RETURN metadata outputs in standard transactions. (0 - 1024)
max-std-op-return-size = 8388608        # Maximum size of OP_RETURN metadata in standard transactions, in bytes. (0 - 8388608)
max-std-op-drops-count = 5              # Maximum number of OP_DROPs per output in standard transactions. (0 - 100)
max-std-element-size = 600              # Maximum size of data elements in standard transactions, in bytes. (128 - 32768)

 

asked Feb 6, 2017 by sanmadhavan
update : I set a value 83886080 ( 8 MB x 10 ), but multichaind did not start throwing the message :
"Invalid parameter value for max-std-tx-size - too high: 83886080"

the range mentioned in the comment for the std-tx-size is much higher than whats accepted.

1 Answer

+1 vote
The comment gives a maximum of 10000000, i.e. just under 10 MB. The number you tried (83886080) is higher than this.

FYI we are working on growing these limits by the end of the alpha period, to 32 MB or more per transaction.
answered Feb 7, 2017 by MultiChain
oh ok, I thought that if OP_RETURN size is 8 MB, the standard transaction size should be 8 * 10 ( op_return count) hence I put higher value, didn't realize that the max value mentioned was 10000000.

btw, can we have multiple OP_RETURNs in a single transaction? whats  the significance of op return count in standard tranasction?
Yes, you can have multiple OP_RETURNs in a single transaction (unlike in the bitcoin protocol). These can contain raw metadata and/or stream items. The max-std-op-returns-count places a limit on how many OP_RETURNs can appear in a transaction that is considered "standard", meaning that it will be relayed by nodes following the rules. Non-standard transactions can still appear in blocks, and those blocks can remain valid, if a miner chooses to do so. This means that these limits can be increased, creating a "soft fork" only, meaning it's a change that doesn't change the blockchain's consensus rules.
...