Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Do we have a limit for the length of Text fields?Forum ↗

Do we have a limit for the length of Text fields?

App Development5 posts268 views4 likesLast activity Apr 2023
GY
gyorgybalazsiOP
Apr 2023

Do we have a limit for the length of Text fields?

ST
stefanobaghino-da
Apr 2023

Not one specific to those fields in particular, but a very large text field will impact the size of the transaction, which in turn might hit the locally configured maximum size for a gRPC message, leading to unwanted rejections.

GY
gyorgybalazsi
Apr 2023

Thank you!

AN
Andrae
Apr 2023

Also keep in mind that the contents of contracts end up in ACS caches, application databases, participant databases, and need to be loaded into memory in every transaction that fetches the contract.

Store what you need to store on the contract—there is no hard limit—but unless the contents of the data are necessary to manage the control-flow in a choice you don’t need to store it on the contract. If this is something that doesn’t affect control-flow, then I would recommend (URL, SHA256Hash) or (URL, SHA256Hash, AuthToken) as the sort of type you should be storing instead.

GY
gyorgybalazsi
Apr 2023

Yes, thank you!

← Back to Discussions