How long can the JSON be if using a custom string?
RyanSinger opened this issue · comments
I'm considering using namecoin for purposes other than identity. How long can a custom JSON string be?
R
Nevermind. Found it. 1023 characters.
It's actually 520 bytes as far as I know. Can you provide a link to where we said it was 1023? I'd like to correct that if the documentation is wrong.
1023 is the intended maximum size, and it can be used (once) for a value. (Although I've added a front-end rule that disallows it, but the protocol allows up to 1023 characters.) However, due to the script operand limit in Bitcoin, a name script with values larger than 520 bytes can never evaluate to true. I. e., once you set a name to a value longer than 520 bytes, it can never be updated again and you have to let it expire. That's why the front-end rule has been introduced, since it was a very bad trap to lose your names. (It happened to me personally with id/domob
in 2013, but I was able to re-register the name when it expired.)
It happened to me as well once (but luckily it wasn't an important name).