Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Executing large quantity of upgrade contractsForum ↗

Executing large quantity of upgrade contracts

App Development5 posts222 views1 likesLast activity May 2022
ST
StephenOTTOP
May 2022

Consider:

https://docs.daml.com/upgrade/upgrade.html#structure-upgrade-contracts

The recommended approach is to use upgrade contracts to move from A to B.
These are per contract ID. Is there a way to batch the approvals within a single contract? The way the docs create the structure it would seem the user could have to potentially approve thousands of individual choices

CO
cocreature
May 2022

You can fairly easily batch them. In that example, that would imply that the Upgrade choice accepts a list of contract ids, archives all of them and recreates the new versions of all of them.

ST
StephenOTT
May 2022

Is there limits on transaction durations, choice execution duration etc?

CO
cocreature
May 2022

The main limit at the moment is the time skew, see Semantics of min_ledger_time - #2 by gerolf. It obviously heavily depends on your specific app but usually I’d recommend to stay well below 1000 events within a single transaction. Here you have 2 events per contract so a batch size of 100 would get you to 200 events which seems reasonable.

ST
StephenOTT
May 2022

Thank you

← Back to Discussions