Skip to content
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

swingset bootstrap config for vaults and oracles for a test network #6957

Closed
1 of 3 tasks
dckc opened this issue Feb 9, 2023 · 4 comments · Fixed by #6960, #7008 or #7016
Closed
1 of 3 tasks

swingset bootstrap config for vaults and oracles for a test network #6957

dckc opened this issue Feb 9, 2023 · 4 comments · Fixed by #6960, #7008 or #7016
Assignees
Labels
cosmic-swingset package: cosmic-swingset enhancement New feature or request vaults_triage DO NOT USE

Comments

@dckc
Copy link
Member

dckc commented Feb 9, 2023

What is the Problem Being Solved?

decentral-devnet-config.json doesn't include oracles.
decentral-core-config.json isn't sufficient to bootstrap vaults without splicing in proposals and addresses.

A nearby problem is a similar configuration for mainnet, but let's leave the details of that until we're closer to being able to test it on emerynet.

Description of the Design

Use fixed addresses with known mnemonics / keys.

Security Considerations

Be sure not to re-use the test accounts in production.

Scaling Considerations

This is sort of an attempt to scale up the number of users who can test our code straightforwardly.

Other than that, none that I can think of.

Test Plan

cc @ivanlei @arirubinstein

@dckc dckc added enhancement New feature or request cosmic-swingset package: cosmic-swingset labels Feb 9, 2023
@dckc dckc changed the title swingset config for vaults and oracles for a test network swingset bootstrap config for vaults and oracles for a test network Feb 9, 2023
@dckc
Copy link
Member Author

dckc commented Feb 9, 2023

committeeSize 1 vs. 3

I have a draft and I'm trying it with agoric start local-chain. It got most of the way thru bootstrap but failed because one thing thought the committee size was 1 and another thought it was 3.

/tmp/x1$ CHAIN_BOOTSTRAP_VAT_CONFIG=@agoric/vats/decentral-test-vaults-config.json agoric start local-chain --reset -v

2023-02-09T01:50:51.135Z SwingSet: vat: v1: RangeError: Expected (a number) is same as (a number)
 at makeError (/bundled-source/.../node_modules/ses/src/error/assert.js:242)
 at fail (/bundled-source/.../node_modules/ses/src/error/assert.js:370)
 at baseAssert (/bundled-source/.../node_modules/ses/src/error/assert.js:391)
 at equal (/bundled-source/.../node_modules/ses/src/error/assert.js:402)
 at inviteCommitteeMembers (.../inter-protocol/src/proposals/committee-proposal.js:21)

I've seen this before... odd... startEconomicCommittee doesn't seem to be part of the same manifest as inviteCommitteeMembers, startEconCharter, and inviteToEconCharter.

@ivanlei ivanlei added this to the Vaults Functional Testing milestone Feb 9, 2023
@ivanlei ivanlei added the vaults_triage DO NOT USE label Feb 13, 2023
@arirubinstein
Copy link
Contributor

Validated the changed in the PR currently on instagoric, however two small tweaks to the bootstrap config will streamline network creation:

  • Allow for initial price to be set in bootstrap for price feed
  • Allow for UI hash to be included as a parameter in bootstrap for vaults

For the UI hash, we can use: bafybeidvpbtlgefi3ptuqzr2fwfyfjqfj6onmye63ij7qkrb4yjxekdh3e
and for the starting ATOM price, I think we can use 1234

@mergify mergify bot closed this as completed in #6960 Feb 15, 2023
@dckc
Copy link
Member Author

dckc commented Feb 16, 2023

hm. I assumed the initialPrice only needed to affect .makeQuoteNotifier . Evidently it needs to get into quoteGiven too.

        async maxDebtFor(collateralAmount) {
          trace('maxDebtFor', collateralAmount);
          assert(factoryPowers && priceAuthority);
          const quote = await E(priceAuthority).quoteGiven(
            collateralAmount,
            debtBrand,
          );

cc @arirubinstein @turadg

@dckc
Copy link
Member Author

dckc commented Feb 16, 2023

oops...

image

Sorry, an unexpected error has occurred.
amount's brand "[Alleged: SEVERED: IbcATOM brand]" must match ratio's denominator "[Alleged: SEVERED: IST brand]"

console shows:

 at multiplyHelper$1 (https://bafybeiam5ccaokbftxs4bhiozarooneuhdti42nnam6fptku36tbdqkghq.ipfs.cf-ipfs.com/assets/index.0265f653.js:156:316199)
  at ceilMultiplyBy (https://bafybeiam5ccaokbftxs4bhiozarooneuhdti42nnam6fptku36tbdqkghq.ipfs.cf-ipfs.com/assets/index.0265f653.js:156:316549)
  at https://bafybeiam5ccaokbftxs4bhiozarooneuhdti42nnam6fptku36tbdqkghq.ipfs.cf-ipfs.com/assets/index.0265f653.js:203:18917

perhaps somewhere around https://github.com/Agoric/dapp-inter/blob/a9ce19316f42aa6562c3d230147e9e0b54ee6d95/src/components/MainContentWrapper.tsx#L58-L60

:published.vaultFactory.manager0.quotes was set to

        amountIn: {
          brand: slot(1,"Alleged: IST brand"),
          value: 1234n,
        },
        amountOut: {
          brand: slot(2,"Alleged: IbcATOM brand"),
          value: 100n,
        },

which looks like 12.34IST will get you 1 ATOM... but I guess the client wants to know how many IST they can get for 1 ATOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment