Executing large quantity of upgrade contracts

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

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.

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

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.

1 Like

Thank you