-
Notifications
You must be signed in to change notification settings - Fork 214
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
feeDistributor vat is not ugpradable #8729
Comments
Um... did we miss this one in the bulldozer planning somehow? No... we decided it was OK:
agoric-sdk/packages/builders/scripts/vats/restart-vats.js Lines 7 to 9 in d3ddae6
I think there are no clients. |
The feeDistributor may only be used by PSM and vat-bank. |
feeDistributor collects from vaultFactory and sends to reserve; so it's a client of those 2. agoric-sdk/packages/inter-protocol/src/proposals/econ-behaviors.js Lines 500 to 502 in 1749514
PSM could generate fees, but it doesn't, so we didn't write it up, AFAICT. feeDistributor 's only client is the time service, I think. |
The feeDistributor does all the work, and knows both the payers and payees. Neither of those has any knowledge of the feeDistributor. The bootstrapSpace has creatorFacets for the payers, which have a To replace (not upgrade) the feeDistributor, just create a new one, and register it as the
The only current provider of fees is
|
…or, stage in upgrade.go (#10453) closes: #10393 refs: #8730 ## Description There is an on going work for making sure all vats must either be upgradable or replaceable safely. In this PR we are focusing on `feeDistributor` for that. As per #8730, we also want to have tests for `feeDistributor` that checks it works properly after a `vat-timer` is upgraded. ### Security Considerations I can' think of any threats that can come out of `feeDistributor` to cause any system level harm. As it's only job is to collect fees from `vaultFactory` and send it to `reserve`. ### Scaling Considerations Making sure the old `feeDistributor` is not collecting fees from the `vaultFactory` is important but I believe to free resources we need to terminate the old instance. ### Documentation Considerations None. ### Testing Considerations Here's the testing scenario implemented; * Write a proposal code where `collectionInterval` is parameterized * Have two scripts originating from the proposal created above. One for testing and one for staging * Test script’s collectionInterval = 5 seconds * Staging script’s collectionInterval = 1 hour * Staging script is placed in `upgrade.go` * Testing script is built as a submission in `p:upgrade-19` * In `TEST` phase of `p:upgrade-19`, this script will override whatever already exists in the bootstrap environment. When testing new `feeDistributer` * Open a few vaults * Use syncTools to wait until `reserve` balance increases #### Note In the original test plan, there was this sentence: "Get the new instance’s terms from zoe and make sure its `collectionInterval` is correct" Which I ended up not implementing because it's not possible to get `zoe` in `a3p` and trying to test this using a core-eval seemed like an anti-pattern. cc @Chris-Hibbert ### Upgrade Considerations `feeDistributor` is not upgradable. There are plans to make it upgradable in the future. See #8729.
@Chris-Hibbert, this looks to me a duplicate of #10393 and as such, should it be closed? |
@LuqiPan It has details that weren't reproduced in #10393 @anilhelvaci, PTAL at this and verify that it doesn't raise any issues that we might have missed in #10453. |
@anilhelvaci ping on above comment/question |
My understanding is that this issue is concerned about any clients of I agree with @dckc 's comment here. With one caveat:
I believe this should be the opposite. agoric-sdk/packages/inter-protocol/src/feeDistributor.js Lines 94 to 97 in 3b478fb
This brings us to the conclusion that
replaceFeeDistributor.test.js produces expected results. I believe it's safe to close this ticket. @LuqiPan @Chris-Hibbert |
While looking at #8499 (comment) . and thinking about how v28-feeDistributor would react under upgrade, we noticed that v28-feeDistributor is not ugpradable.
v23-feeDistributor has code which talks to the timer service and creates a notifier during
startDistributing
. However this function is called only frommakeFeeDistributor
, which creates ephemeralcreatorFacet
andpublicFacet
objects (usingFar()
). So this contract instance is not upgradable: if we were to deploy any new version of v23-feeDistributor, these facets would be abandoned, making them unavailable for clients.Since we can't upgrade v23-feeDistributor, we'll need to replace it, somehow, by convincing any clients to use a different vat, and then terminate the old one.
I didn't find any other tickets describing our plan to replace this code, so I figured I should start a new one.
cc @Chris-Hibbert
The text was updated successfully, but these errors were encountered: