-
Notifications
You must be signed in to change notification settings - Fork 215
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
separate production vat bootstrap from testing mechanisms #4165
Comments
|
The current bootstrap mints 1B RUN out of thin air for a agoric-sdk/packages/vats/src/bootstrap.js Lines 81 to 86 in 71f8101
agoric-sdk/packages/zoe/src/zoeService/feeMint.js Lines 40 to 42 in 71f8101
|
If we need a subsidy to get the chain off the ground, we should find a way to keep it small/limited. As I understand current thinking, at the beginning of the live chain, the only source of capital that's available is BLD tokens. Those could be used to get RUN line of credit, which could be used to pay fees in order to get Vaults (née Treasury) and AMM set up. In order to fund various pools for the AMM, we'd need a source for other tokens. The Vaults really shouldn't be started until their respective AMM pools exist. The hard part about bootstrapping is that the RUN line of credit can't be started without a little bit of RUN to pay for fees, so I think the start-up subsidy is necessary. Luckily, the |
@dtribble notes that genesis for the JS phase may inherit RUN minted during the cosmos-only phase. Should one of the owners spend that to bootstrap the JS components? Or... can we just not charge fees for some stuff? |
another alternative from this morning's #engineering discussion:
|
idea from chat with @michaelfig : CapTP + spawner + bootstrap namehub solo: bootstrap object in web.js |
It looks like I think I fixed it in 71a8b3f, but a bunch of other stuff is mixed in there. |
The lines that seem to be addressing this E(vats.distributeFees)
.buildDistributor(
[treasuryCreator, ammFacets.creatorFacet].map(cf =>
E(vats.distributeFees).makeFeeCollector(zoeWUnlimitedPurse, cf),
),
feeCollectorDepositFacet,
epochTimerService,
harden(distributorParams),
) look right to me. |
@michaelfig I rebased the bootstrap-core branch on |
Idea: mainnet 1 Genesis names privileged modules to install. |
I think that the
"bootstrapCapsules": ["someFunc1", "someFunc2"], where you define the capsules in // Trick to reify capsule async function names as properties we can invoke.
import * as capsules from './capsules.js'
// ... thread through the bootstrapCapsules as part of `vatParameters.argv`, then:
// Run all the bootstrap capsules in parallel.
await Promise.all(
bootstrapCapsules.map(
cname => Promise.resolve().then(() => capsules[cname]({ ....powers, capsules })),
),
); |
further refinement (41b9850): let export const bootstrapManifest = harden({
behaviors: {
connectVattpWithMailbox: true,
buildZoe: true,
},
endowments: {
connectVattpWithMailbox: {
vatPowers: { D: true },
vats: { vattp: true },
devices: { mailbox: true },
},
buildZoe: {
vats: { vatAdmin: true },
devices: { vatAdmin: true },
workspace: true,
},
},
});
export const simBootstrapManifest = harden({
behaviors: { installSimEgress: true, ...bootstrapManifest.behaviors },
endowments: {
installSimEgress: {
vatParameters: { argv: { hardcodedClientAddresses: true } },
vats: {
vattp: true,
comms: true,
},
workspace: true,
},
...bootstrapManifest.endowments,
},
});
|
One tiny note: the need to connect I'd suggest encapsulating that part of the initialization into a separate function, to at least make it clear that this is a part that ought to be swingset's responsibility, but unfortunately is not yet. |
3 chunks recently: |
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
fixes #4165 BREAKING CHANGE: decentral-config.json config file is no longer available. Use decentral-core-config.js, which starts core services by not RUN protocol etc., or decentral-demo-config.js, which does start the RUN protocol and provides demo funds in wallets, AMM.
It looks like we're moving back to using agoric-sdk/packages/vats/src/core/boot.js Line 13 in 416b3e7
|
rather than edit description to re-summarize history back to Dec 2021, let's make a new issue: #6687 |
What is the Problem Being Solved?
The initial conditions for all the vats in our system are in vats/src/bootstrap.js. Currently, it mixes a bunch of testing / demo mechanisms in a way that makes it difficult to be confident that we aren't vulnerable to excess authority.
Description of the Design
bootstrap.js
currently interacts with a large set of features:getBootstrapPayment
(note plans to remove this in Remove getBootstrapPayment() from Treasury #4021)home
bundle and connecting it to the REPL and http@michaelfig @warner what's missing in that list? Can you think of any that we should get rid of?
My inclination is to start with a simple bootstrap that establishes the connections suitable for production and then layer testing mechanisms on top of that. Perhaps more of the functionality should be installed via Zoe? For example, the LINK and ATOM we use for testing could come from a contract that creates a new zcfMint and uses the mint to add liquidity to the AMM and to provide each new user with some funds to play with.
cc @erights @Chris-Hibbert @rowgraus
Security Considerations
Code such as
vat-mints.js
, which mints tokens freely, is useful for demos, but should be clearly segregated from code used in production.cc @jessysaurusrex
Documentation Considerations
The
home
API is somewhat under-documented. (Separate issues: #4347 , #3154).Test Plan
Review the current
bootstrap.js
looking for features that we don't currently have automated tests for and if we want to keep them, add tests.The text was updated successfully, but these errors were encountered: