gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source
https://gno.land/
Other
839 stars 342 forks source link

chore: add two new upgrade examples + refactor existing ones #2334

Open moul opened 2 weeks ago

moul commented 2 weeks ago

Depends on #2342

cc @jeronimoalbi

jeronimoalbi commented 1 week ago

I really like the approach taken in upgrade_e and upgrade_f, they are elegant and idiomatic 👍

I'm wondering if it makes sense to eventually have another upgrade example case, where the "home" realm is actually versioned using v1, v2, and so on in the realm path for major versions, where the inner interface implementations from upgrade_e are considered minor versions. If this makes sense, it would allow "home" to eventually be bumped up to a new major version when any public realm functions or the interface changes.

moul commented 1 week ago

I'm wondering if it makes sense to eventually have another upgrade example case, where the "home" realm is actually versioned using v1, v2, and so on in the realm path for major versions, where the inner interface implementations from upgrade_e are considered minor versions. If this makes sense, it would allow "home" to eventually be bumped up to a new major version when any public realm functions or the interface changes.

To be tried!