-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fast-usdc): .exit() all internal temporary seats (#10939)
closes #10890 refs: - #10931 ## Description mainly: - fix: .exit() all internal temporary seats Also, to exercise pruning vstorage: - feat: core eval script to deleteCompletedTxs - expose deleteCompletedTx via creatorFacet To speed up testing and match it with expected deployment: - chore: don't write-chain-info when testing Fast USDC Plus a misc type refinement: - chore: refine return type of Offers.deposit ### Security / Scaling Considerations Reducing leaks improves scalability which improves availability. ### Documentation Considerations I don't think so. ### Testing Considerations Tests are in #10931 ; they're somewhat rough and not included in this PR. ### Upgrade Considerations Some undiagnosed heap growth remains. A fix for that might go out in a future upgrade.
- Loading branch information
Showing
10 changed files
with
183 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// import { E } from '@endo/far'; | ||
/* global E */ | ||
|
||
/** @import {FastUSDCCorePowers} from '../src/start-fast-usdc.core' */ | ||
|
||
const trace = (...args) => console.log('FUPS', ...args); | ||
trace('script starting'); | ||
|
||
/** @param {BootstrapPowers & FastUSDCCorePowers} powers */ | ||
const pruneFastUsdcStorage = async powers => { | ||
trace('pruneFastUsdcStorage'); | ||
const { fastUsdcKit } = powers.consume; | ||
const { creatorFacet } = await fastUsdcKit; | ||
trace(creatorFacet); | ||
// @ts-expect-error core eval scripts get E as an endowment | ||
await E(creatorFacet).deleteCompletedTxs(); | ||
trace('done'); | ||
}; | ||
|
||
trace('script finishing'); | ||
pruneFastUsdcStorage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
143 changes: 143 additions & 0 deletions
143
packages/vm-config/decentral-itest-fast-usdc-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{ | ||
"$comment": "This SwingSet config file (see loadSwingsetConfigFile) is designed to bring up vats to test Fast USDC. Compared to decentral-itest-orchestration-config.json, it lacks write-chain-info.", | ||
"bootstrap": "bootstrap", | ||
"defaultReapInterval": 1000, | ||
"coreProposals": [ | ||
"@agoric/builders/scripts/vats/init-core.js", | ||
"@agoric/builders/scripts/vats/init-network.js", | ||
"@agoric/builders/scripts/vats/init-localchain.js", | ||
"@agoric/builders/scripts/vats/init-transfer.js", | ||
"@agoric/builders/scripts/vats/init-orchestration.js", | ||
{ | ||
"module": "@agoric/builders/scripts/inter-protocol/init-core.js", | ||
"entrypoint": "defaultProposalBuilder", | ||
"args": [ | ||
{ | ||
"econCommitteeOptions": { | ||
"committeeSize": 3 | ||
}, | ||
"referencedUi": "bafybeidvpbtlgefi3ptuqzr2fwfyfjqfj6onmye63ij7qkrb4yjxekdh3e", | ||
"minInitialPoolLiquidity": "0" | ||
} | ||
] | ||
}, | ||
{ | ||
"module": "@agoric/builders/scripts/inter-protocol/add-collateral-core.js", | ||
"entrypoint": "defaultProposalBuilder", | ||
"args": [ | ||
{ | ||
"interestRateValue": 1000, | ||
"interchainAssetOptions": { | ||
"denom": "ibc/toyatom", | ||
"decimalPlaces": 6, | ||
"initialPrice": 12.34, | ||
"keyword": "ATOM", | ||
"oracleBrand": "ATOM", | ||
"proposedName": "ATOM" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"module": "@agoric/builders/scripts/inter-protocol/add-collateral-core.js", | ||
"entrypoint": "psmProposalBuilder", | ||
"args": [ | ||
{ | ||
"anchorOptions": { | ||
"denom": "ibc/toyusdc", | ||
"decimalPlaces": 6, | ||
"keyword": "USDC_axl", | ||
"proposedName": "USD Coin" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"module": "@agoric/builders/scripts/inter-protocol/add-collateral-core.js", | ||
"entrypoint": "psmProposalBuilder", | ||
"args": [ | ||
{ | ||
"anchorOptions": { | ||
"denom": "ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9", | ||
"decimalPlaces": 6, | ||
"keyword": "USDC", | ||
"proposedName": "USDC" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"$comment": "XXX orchesration works without oracles but some test setup dependency fails to resolve without this", | ||
"module": "@agoric/builders/scripts/inter-protocol/price-feed-core.js", | ||
"entrypoint": "defaultProposalBuilder", | ||
"args": [ | ||
{ | ||
"AGORIC_INSTANCE_NAME": "ATOM-USD price feed", | ||
"oracleAddresses": [ | ||
"@PRIMARY_ADDRESS@", | ||
"agoric1dy0yegdsev4xvce3dx7zrz2ad9pesf5svzud6y" | ||
], | ||
"IN_BRAND_LOOKUP": [ | ||
"agoricNames", | ||
"oracleBrand", | ||
"ATOM" | ||
], | ||
"IN_BRAND_DECIMALS": 6, | ||
"OUT_BRAND_LOOKUP": [ | ||
"agoricNames", | ||
"oracleBrand", | ||
"USD" | ||
], | ||
"OUT_BRAND_DECIMALS": 4 | ||
} | ||
] | ||
} | ||
], | ||
"vats": { | ||
"bootstrap": { | ||
"sourceSpec": "@agoric/vats/src/core/boot-chain.js", | ||
"creationOptions": { | ||
"critical": true | ||
} | ||
} | ||
}, | ||
"bundles": { | ||
"agoricNames": { | ||
"sourceSpec": "@agoric/vats/src/vat-agoricNames.js" | ||
}, | ||
"bank": { | ||
"sourceSpec": "@agoric/vats/src/vat-bank.js" | ||
}, | ||
"board": { | ||
"sourceSpec": "@agoric/vats/src/vat-board.js" | ||
}, | ||
"bridge": { | ||
"sourceSpec": "@agoric/vats/src/vat-bridge.js" | ||
}, | ||
"centralSupply": { | ||
"sourceSpec": "@agoric/vats/src/centralSupply.js" | ||
}, | ||
"mintHolder": { | ||
"sourceSpec": "@agoric/vats/src/mintHolder.js" | ||
}, | ||
"priceAuthority": { | ||
"sourceSpec": "@agoric/vats/src/vat-priceAuthority.js" | ||
}, | ||
"provisionPool": { | ||
"sourceSpec": "@agoric/inter-protocol/src/provisionPool.js" | ||
}, | ||
"provisioning": { | ||
"sourceSpec": "@agoric/vats/src/vat-provisioning.js" | ||
}, | ||
"walletFactory": { | ||
"sourceSpec": "@agoric/smart-wallet/src/walletFactory.js" | ||
}, | ||
"zcf": { | ||
"sourceSpec": "@agoric/zoe/contractFacet.js" | ||
}, | ||
"zoe": { | ||
"sourceSpec": "@agoric/vats/src/vat-zoe.js" | ||
} | ||
}, | ||
"defaultManagerType": "xs-worker" | ||
} |