question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

separate production vat bootstrap from testing mechanisms

See original GitHub issue

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:

  • setting up zoe
  • setting up the vaults and AMM
    • getBootstrapPayment (note plans to remove this in Agoric/agoric-sdk#4021)
    • for testing: create “fake” price authorities
      • note plans to use something like coinmarketcap in Agoric/documentation#664
    • for testing: setting up liquidity in the AMM
  • setting up dapp facilities including http API endpoints and plugins
  • provisioning user accounts
    • creating vattp and comms remote / egress
    • creating IBC ports
    • creating the home bundle and connecting it to the REPL and http
    • for testing / devnet: minting tokens so that users start with assets to work with

@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: Agoric/agoric-sdk#4347 , Agoric/agoric-sdk#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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
warnercommented, Jan 19, 2022

One tiny note: the need to connect vats.comms and vats.vattp, plus the need to connect devices.mailbox to vats.vattp, are common to all swingset installations, rather than being a specific feature of the Agoric chain or ag-solo instances. I haven’t been able to think of a clean way to have swingset do this wiring itself (#51), so it remains as a “some assembly required” wart that host apps (chain/ag-solo) must deal with.

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.

0reactions
dckccommented, Dec 16, 2022

rather than edit description to re-summarize history back to Dec 2021, let’s make a new issue: #6687

Read more comments on GitHub >

github_iconTop Results From Across the Web

bootstrap methods - and permutation tests - Chris Bilder
The most important new idea is that bootstrap resampling must mimic the “separate samples” design that produced the original data. Given independent SRSs...
Read more >
controller.installBundle() · Issue #3269 · Agoric/agoric-sdk · GitHub
the "core bootstrap" work ( separate production vat bootstrap from testing mechanisms #4165) should have bootstrap() walk namedBundleIDs , convert each ...
Read more >
Introduction to Bootstrapping in Statistics with an Example
Bootstrapping is a statistical method that resamples a dataset many times. Learn about this alternate method for confidence intervals and hypothesis tests.
Read more >
Randomization Tests and Resampling
Bootstrap procedures take the combined samples as a representation of the population from which the data came, and create 1000 or more ...
Read more >
VAT tax gap prediction: a 2-steps Gradient Boosting approach
We use our method to estimate the Italian VAT Gap related to individual firms based on information gathered from administrative sources. Our algorithm...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found