Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 207 forks source link

chore(replace-fee-dist): create upgrade-19 dir, test new feeDistributor, stage in upgrade.go #10453

Closed anilhelvaci closed 1 week ago

anilhelvaci commented 1 week ago

closes: #10393 refs: https://github.com/Agoric/agoric-sdk/issues/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;

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 https://github.com/Agoric/agoric-sdk/issues/8729.

cloudflare-workers-and-pages[bot] commented 1 week ago

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: c3358ef
Status: ✅  Deploy successful!
Preview URL: https://2d75174e.agoric-sdk.pages.dev
Branch Preview URL: https://anil-10393-replace-fee-dist.agoric-sdk.pages.dev

View logs