Skip to content
Discussions/App Development/Max Payload SizeForum ↗

Max Payload Size

App Development6 posts998 views11 likesLast activity Jun 2020
JE
Jean_SafarOP
May 2020

Hi,

Apologies if asked before (I could not find it) … is there a maximum size of data that can be placed in a template?

thanks

GE
gerolf
May 2020

Hi @Jean_Safar,

Welcome to the forum :wave:

There is no limitation as per the DAML ledger model.

There are other technical limitations though. The RPC protocol used for the ledger api (gRPC) specifies a maximum message size that defaults to ~4MB. So both client and ledger need to be configured to accept messages larger than that. (See for example this post).
Additionally one has to consider that DAML contract values need to be serialized, deserialized, sent to the committer for validation, translated for the ledger api, etc, so large values definitely have an impact on performance in one way or another.

I’d be interested in what context you are using DAML? Only if you can share that with us, of course?

JE
Jean_Safar
Jun 2020

Thanks a lot @gerolf,

All my data is indeed serializable … Not being able to store it inside a template complexifies the architecture. I need to Hash the data and store it separately and in essence create an indirection when trying to access the data, which eventually will impact performance.

Best regards-

GE
gerolf
Jun 2020

Bernhard just posted a nice post that might be interesting to you.

JE
Jean_Safar
Jun 2020

Thanks - I did see (word missing :-() this post indeed-

AN
andreolf
Jun 2020

great post indeed @Jean_Safar

← Back to Discussions