Executing large quantity of upgrade contracts
- StephenOTTOP
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 - cocreature
You can fairly easily batch them. In that example, that would imply that the
Upgradechoice accepts a list of contract ids, archives all of them and recreates the new versions of all of them. - StephenOTT
Is there limits on transaction durations, choice execution duration etc?
- cocreature 1
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.
- StephenOTT
Thank you