Bitcoin Forum
May 11, 2024, 11:37:50 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Where does the 40Byte OP_RETURN Restriction Exist in the Code?  (Read 1905 times)
SilentCicer0 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
November 08, 2014, 05:48:11 PM
Last edit: November 08, 2014, 06:18:39 PM by SilentCicer0
 #1

Where in the Bitcoin wallet code is the 40byte restriction for OP_RETURN transactions enforced?

So far, I've found material in the code on lines:
328 **src/script/script.h
, 678 **src/main.cpp
, 57 **src/script/standard.cpp

Is the 40byte restriction enforced in the code, or is there something I'm missing here?


... Answered my own question again... I think I found it here:
https://github.com/bitcoin/bitcoin/pull/3737/files


For anyone else who wants to read about OP_RETURN, this post was pretty sweet:
http://bitcoin.stackexchange.com/questions/29554/explanation-of-what-an-op-return-transaction-looks-like


Cheers,
SC.


References:
https://github.com/bitcoin/bitcoin/search?utf8=%E2%9C%93&q=OP_RETURN
https://en.bitcoin.it/wiki/Script
http://coinsecrets.org/
http://bitcoin.stackexchange.com/questions/23024/op-return-data-transaction
1715470670
Hero Member
*
Offline Offline

Posts: 1715470670

View Profile Personal Message (Offline)

Ignore
1715470670
Reply with quote  #2

1715470670
Report to moderator
1715470670
Hero Member
*
Offline Offline

Posts: 1715470670

View Profile Personal Message (Offline)

Ignore
1715470670
Reply with quote  #2

1715470670
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715470670
Hero Member
*
Offline Offline

Posts: 1715470670

View Profile Personal Message (Offline)

Ignore
1715470670
Reply with quote  #2

1715470670
Report to moderator
1715470670
Hero Member
*
Offline Offline

Posts: 1715470670

View Profile Personal Message (Offline)

Ignore
1715470670
Reply with quote  #2

1715470670
Report to moderator
1715470670
Hero Member
*
Offline Offline

Posts: 1715470670

View Profile Personal Message (Offline)

Ignore
1715470670
Reply with quote  #2

1715470670
Report to moderator
instagibbs
Member
**
Offline Offline

Activity: 114
Merit: 12


View Profile
November 08, 2014, 09:02:23 PM
 #2

https://github.com/bitcoin/bitcoin/pull/3737

Should be everything needed.
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
November 09, 2014, 02:32:15 PM
 #3

If you actually look a bit closer, 6-7 guys are responsible for whatever gets in the client.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
altcoinex
Sr. Member
****
Offline Offline

Activity: 293
Merit: 250


Director - www.cubeform.io


View Profile WWW
December 06, 2014, 04:47:56 PM
 #4

https://github.com/bitcoin/bitcoin/pull/3737/files#diff-4f6d60b6976522cec2974a0aea9a5ab3R296 In specific should show the code in question...


                                     ╓╢╬╣╣╖
                                   ┌║██████║∩
                                   ]█████████
                                    ╜██████╝`
                                      ╙╜╜╜`
                                   ╓╥@@@@@@╥╓
         ╓╖@@╖,                 ,@║██████████╢@,                 ,╓@@╖╓
       ╓╢██████╢.              ╓╢███████████████╖               ║╢█████║╓
       ║█████████    ,,╓╓,,   ┌║█████████████████┐   ,,╓╓,,    ]█████████
       └╢██████║` ╓╢║██████╢║∩``╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙╙`»╢╢██████╢║╖  ║███████╜
         "╜╜╜╜` ╖╢█████████╣╜                      └╢██████████@ `╜╜╜╜╜
               ║██████████╜                          ╙╢██████████
              ┌█████████╜                              ╙╢█████████
              └███████╨`                                 ╜████████
               ║████╨╜                                    `╢█████
                ╙╢╣╜                                        └╢█╜
                ,,                                            ,,
             ╓@║██┐                                          ┌██║@╓
            ╢██████                                          ]█████H
           ╢███████∩                                        ┌████████
  ╓@@@@╓   █████████                                        ║████████`  ╓@@@@╖
╓╢██████║. █████████∩                                      ┌█████████ ,║███████╖
██████████ └█████████                                      ██████████ ]█████████
`║██████╜`  └╢████████                                    ┌███████╣╜   ╙██████╨`
  `╙╜╜╙`      `╙╨╢████                                    █████╝╜`       `╙╜╜`
                      ]@╓                              ╓╖H
                      ███╢║@╓,                    ,╓@╢╢███`
                      ████████╢@╖╓.           ╓╖@║████████`
                      ]███████████╢║@╓,  ,╓@╢╢████████████
                       ╙╢█████████████╨` ╜██████████████╜
                         ╙╝╢███████║╜`    `╜║████████╝╜`
                     ,╓@@@╓  `²╙``             `╙²`  ╓@@@╖,
                    ║╢█████╢H                      ╓╢██████H
                    █████████                      █████████`
                    ╙╢██████╜                      ╙╢██████╜
                      └╨╩╝┘                          └╨╩╝╜
WINFLOW.
██
██
██
██
██
██
██
██
██
██
██
██
██
..
██
██
██
██
██
██
██
██
██
██
██
██
██
.
dexX7
Legendary
*
Offline Offline

Activity: 1106
Merit: 1024



View Profile WWW
December 08, 2014, 04:04:25 PM
 #5

If you actually look a bit closer, 6-7 guys are responsible for whatever gets in the client.

Likewise, there are a few open PRs addressing this topic:

Relay up to two (2) OP_RETURN outputs as IsStandard
https://github.com/bitcoin/bitcoin/pull/5075

Accept any sequence of PUSHDATAs in OP_RETURN outputs
https://github.com/bitcoin/bitcoin/pull/5079

Change the default maximum OP_RETURN size to 80 bytes
https://github.com/bitcoin/bitcoin/pull/5286

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!