Could the info needed be compressed to fit into 40 bytes?
What sort of entropy does the typical XCP OP_RETURN data have?
Depending on the data, it might be possible to create a small customized compress/decompress function
If someone can post an example it would help me analyze this a bit more
Edit: due to the importance of this I think it would even make sense to create a custom "dictionary" of common bit patterns (hopefully there are some) in the desired OP_RETURN data. This would have to be put into the counterpartyd, but doing stuff like this might be what is needed to get 2:1 compression, then again maybe standard compression will just work, but I think some sort of custom code would have a good chance. It all depends on the type of data.
James
What do you mean by "dictionaries for common bit patterns"? To my knowledge XCP transactions use some bits to flag a data package as XCP package and some to define the transaction type, but the rest is acutal transaction field data without OP codes or whatsoever.
1c434e54525052545900000000000000000000000100000045d964b80000000000
20434e5452505254590000001e5329a91040952f00000000000000000033474f4c
20442f55534420505249434520736f757263653a207777772e7175616e646c2e63
106f6d204c6f6e646f6e20466978696e6700000000000000000000000000000000
20434e5452505254590000002800035325c3780000000002faf0800000000002fa
12f08040ae140000000000000013b0000000640000000000000000000000000000
20434e5452505254590000000a00000000000000000000000005f5e10000000000
160000000100000002540be400012c000000000000000000000000000000000000
If this data is representative, 2:1 shouldnt be a problem. "00000000000000000000000" alone saves a lot of space
"20434e545250525459" appears three times, so just using those two as special words in a simple huffman tree you can squeeze this down a lot.
I have no idea what data is in the OP_RETURN, but I am assuming there are things that are globally common, like "0000..", maybe there are other globally common things. Put all those into a dictionary and based on the relative frequency assign a variable length bit pattern to the dictionary words.
However, instead of all this trouble, it seems the trick of storing data in unused multisig outputs will solve it with much less work
James