## Description
This adds support for `init` on upgrade according to the following
rules:
1. `init` functions are only called in new modules introduced in that
upgrade;
2. It is an error (now) to add an `init` function to an existing module
during an upgrade;
3. `init` functions in new modules at upgrade are called in the order
they appear in the `Upgrade` command.
Init functions in upgrades introduce restrictions on the global LUMPY
linkage as follows:
1. If the package being upgraded (of any version) doesn't occur in the
PTB then any `Upgrade` commands that have `init` functions introduce
`exact` constraints (just like `Publish`).
2. If package being upgraded (of any version) occurs in the PTB then for
any `(original_id, version_id)` as defined in the `Upgrade` command
either: a. It is not in the existing LUMPY linkage, and a `original_id
-> exact(version_id)` constraint is introduced; or b. It is in the
existing LUMPY linkage, in which case `LUMPY[original_id].id` must equal
`version_id`.
Ignore exact protocol versions -- once we're ready to land this I'll do
that whole song and dance.
## Test plan
Added a bunch of new tests, updated existing tests (and also made these
protocol-versioned tests to memorialize them).
---
## Release notes
Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.
For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.
- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] gRPC:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
- [ ] Indexing Framework: