Clarification on OP_RETURN size limit.

The MetaVerse MetaNet Talk Development Clarification on OP_RETURN size limit.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1831
    Anonymous
      • Novice

      Hello,

      Right now I am setting an 83 byte limit to my OP_RETURN data fields, and I wanted to check if that is correct as to being the maximum limit for a transaction to propagate under standard consensus? I’m having some trouble exactly confirming this and figured I would just ask here anyway in case there were some kind of developments around that at all that I should be aware of, as I’m writing some more APIs. ( I see that many state the length being 80 however because of the way text compresses into 7 bit fragments I read that it lets you get away with 83?)

      I figured I’d ask this here just to save time as well as get any feedback or corrections to my assumptions.

      Thanks!

      #1847
      Anonymous
        • Novice

        FYI, for anybody using the default 400 satoshi fee that Datapay defaults to, the maximum length message you can propagate out is 196 characters long in UTF-8.

        #1875
        BrendanBrendan Lee
          • Novice

          Hi WR, love your work lately.
          The current consensus limit is 223 bytes in an OP_RETURN script, but this includes the OP_RETURN opcode, and the push instruction which is 1 byte for less than 73 bytes and 2 bytes (OP_PUSHDATA <datalength>) for anything more, so is fundamentally limited to 220B of actual data. That limit also includes any push instructions that you might include to help explorers parse your data. This was a limitation we hit a lot at Tokenized.
          Ping me if you want more info. I can show you how we use the data carrier in our protocol.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.