func Migrated
ActionMigrated is how many records have actually moved over.
untrusted-render: records are seeded in init or derived from lazy/v0's own init; this realm exposes no setter, so no ...
gno.land/r/moul/x/upgrade/lazy/v1Version 1 of the lazy migration pattern (pattern D). Declares a new record
shape and converts each v0 record on first touch.
Migrating writes, and writing means crossing, so Get(cur, key) is a
transaction and is invisible to vm/qeval and to Render. Peek(key) is the
free read-only half: same value, no migration.
See the pattern and the exploration.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
untrusted-render: records are seeded in init or derived from lazy/v0's own init; this realm exposes no setter, so no caller string ever reaches Render.
Package lazy is version 1 of the "lazy migration" upgrade pattern (pattern D of the exploration; see ../README.md).
v1 changes the stored shape (Score widens, Active is new) and migrates one record at a time, on first touch, paid for by whoever touched it. There is no migration transaction and no pause.
The catch on today's gno: migrating on read MUTATES, so the read path has to be a crossing function. Get therefore costs a transaction and is invisible to vm/qeval and to Render. Peek is the honest read-only half, and it reports the pre-migration answer for records that have not been touched yet.
Migrated is how many records have actually moved over.
Pending is how many v0 records have never been touched. It is only a bound: v0 keeps every record it ever had, migrated or not.
Get returns a record, migrating it from v0 on first touch.
Crossing, because the migration writes. That is the cost of the pattern: the cheapest possible read is now a transaction.
Peek is the read-only half: it never migrates, so a record that has not been touched yet reads as its v0 self converted on the fly and NOT stored.
Record is v1's shape: Score widened to int64 and scaled by 1000, plus a new Active flag that migrated records get set to true.