decentralized-identity / sidetree

Sidetree Specification and Reference Implementation
https://identity.foundation/sidetree/spec
Apache License 2.0
438 stars 112 forks source link

Add size limit for the writer_lock_id field in the anchor file. #759

Closed mudiali closed 4 years ago

mudiali commented 4 years ago

There should be a protocol parameter to enforce the size limit for the writer_lock_id field. Both the batch writer and observer need to enforce this limit.

mudiali commented 4 years ago

The format for the writer lock id: base64encode( . )

An example value: NGJiMjc1ZWE5ZjZlMGZlYmM3NDU2NmI5OTJiNGViNGE5N2FiMDFjZWIxNjgyYTNiMzdmYTU3NGJjZWIwOTZjNC4wMTExYjI3NTc2YTkxNDg5NjA1Yjg2YjdhZDE4NWViYzEwZmU0NTdiOTg3NzY4Mzg5NzJjZjA4OGFj

The example is 164 characters. I think the above script's lock duration is small for testing 2 blocks or so. Even if it is 30 days (4320) the length wouldn't be affected that much. I'd say 200 chars is a good length

thehenrytsai commented 4 years ago

Commit be481c002c fixed the issue.