-
Notifications
You must be signed in to change notification settings - Fork 518
Txn: Allow epp and schema change #6446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
76e533c to
939889d
Compare
So you're thinking
This would require a new app param so the updater's account can be known in the even of a delete, correct? |
|
All yes, except here:
After this update, it is likely that Alice gets some of her MBR back. If the original app had a non-zero epp, or a non-zero global schema, the MBR for that stuff all moves over to Bob.
Yes, for lack of a better term, I'll be calling it "Renter". At app creation it is omitted (logically, that means the Renter is the creator). Therefore the entire MBR counts against the creator. In an update that changes sizes, the renter is set to the transaction sender, and MBR for epp and schema is moved (entirely). This will create a new TEAL field for |
And that "some" is to ensure her account has enough MBR to stay in the ledger? In other words, app creators must have 0.1 MBR and the latest account that increased the epp/schema must cover the MBR. Would the creator's 0.1 MBR count towards the app? For example, total app MBR is 0.2 after Bob does an update with an increased epp. A) Alice covers 0.1 and Bob covers 0.1 or B) Bob covers the full 0.2 MBR, but Alice must also keep 0.1 MBR since she's the creator |
|
Alice continues to be responsible for the basic 0.1A required for creating an app. But she's no longer responsible for any of the excess that is added for epp or global schema. (And, of course, still the 0.1 basic account MBR.) In your example, Alice covers 0.1 and Bob covers 0.1. |
|
Ok so Static MBR: Static MBR stays with the creator. Dynamic MBR is paid by the renter. So if Alice creates 10 apps and Bob increases the epp on all of them, Alice's MBR is 1.0 ALGO |
(plus 0.1 for the basic account MBR) |
eb145de to
beb1b6c
Compare
a555e31 to
58e042f
Compare
52f0f94 to
1e862f7
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #6446 +/- ##
=========================================
Coverage ? 46.16%
=========================================
Files ? 662
Lines ? 112095
Branches ? 0
=========================================
Hits ? 51747
Misses ? 57585
Partials ? 2763 ☔ View full report in Codecov by Sentry. |
|
May I suggest using the name "sponsor" for the account that takes over covering MBR for the app's EPP & global schema? I think this better aligns with the economic mechanism of MBR, which is a locked deposit rather than a series of payments over time. |
I do like that better than "renter". Any other ideas? |
1e862f7 to
aab5b76
Compare
8ee020b to
232a50f
Compare
Still need to perform the changes to `counts` and `maxCounts`, as described in the comments.
Also add AVM field, API field, and goal support.
232a50f to
f3b5d85
Compare
Summary
Addresses #6386
Allows an update transaction to change the extra-program-pages and global schema for an app. If epp or schema is non-zero in an update, then they are both updated. Requiring a non-zero in at least one field ensures that existing code will not "stumble onto" this feature. Today, all updates must have 0 epp and 0 schemas. It does mean that the app cannot reduce its epp to 0 and reduce the entire global schema to 0, however. We could use a non-zero local schema field to signal the update, even though updating the local schema is impossible, but that seems gross.
The entire MBR for epp and global schema is moved to the Sender of such an update. That does not include the base MBR (0.1A) for the app creation. We call an account that is responsible for MBR on an app that it did not create the "renter" for that app. I am open to better naming. That field is
zeroAddresswhen the original creator is still responsible for the MBR, or if it becomes responsible again, by updating the app. It is available in AVM withapp_params_get AppRenterThe PR is still a draft until we have a few more tests.
Test Plan
Key tests are
TestSchemaUpdatesandTestExtraPagesUpdateinledger/applications_test.go.A
goaltest/example is inapp-update.shof e2e subs.