From b5d386200b3d8452850eb1bf10bfb3a66ffdaf2c Mon Sep 17 00:00:00 2001 From: Mujahid Khan <106528609+mujahidkay@users.noreply.github.com> Date: Tue, 24 Dec 2024 03:12:13 +0500 Subject: [PATCH] fix discrepancies --- .../a:upgrade-18/test-lib/sync-tools.js | 72 ------------------- .../proposals/z:acceptance/test.sh | 3 - golang/cosmos/app/upgrade.go | 16 +++++ packages/SwingSet/package.json | 1 - packages/benchmark/package.json | 1 + packages/inter-protocol/package.json | 1 - packages/internal/package.json | 2 +- packages/pegasus/package.json | 6 +- packages/smart-wallet/package.json | 2 +- packages/telemetry/package.json | 2 +- packages/vat-data/package.json | 5 +- packages/vm-config/package.json | 1 + 12 files changed, 26 insertions(+), 86 deletions(-) delete mode 100644 a3p-integration/proposals/a:upgrade-18/test-lib/sync-tools.js diff --git a/a3p-integration/proposals/a:upgrade-18/test-lib/sync-tools.js b/a3p-integration/proposals/a:upgrade-18/test-lib/sync-tools.js deleted file mode 100644 index 4a0e727c465..00000000000 --- a/a3p-integration/proposals/a:upgrade-18/test-lib/sync-tools.js +++ /dev/null @@ -1,72 +0,0 @@ -/* eslint-env node */ - -/** - * @file These tools mostly duplicate code that will be added in other PRs - * and eventually migrated to synthetic-chain. Sorry for the duplication. - */ - -/** - * @typedef {object} RetryOptions - * @property {number} [maxRetries] - * @property {number} [retryIntervalMs] - * @property {(...arg0: string[]) => void} log - * @property {(object) => void} [setTimeout] - * @property {string} [errorMessage=Error] - */ - -const ambientSetTimeout = global.setTimeout; - -/** - * From https://github.com/Agoric/agoric-sdk/blob/442f07c8f0af03281b52b90e90c27131eef6f331/multichain-testing/tools/sleep.ts#L10 - * - * @param {number} ms - * @param {*} sleepOptions - */ -const sleep = (ms, { log = () => {}, setTimeout = ambientSetTimeout }) => - new Promise(resolve => { - log(`Sleeping for ${ms}ms...`); - setTimeout(resolve, ms); - }); - -/** - * From https://github.com/Agoric/agoric-sdk/blob/442f07c8f0af03281b52b90e90c27131eef6f331/multichain-testing/tools/sleep.ts#L24 - * - * @param {() => Promise} operation - * @param {(result: any) => boolean} condition - * @param {string} message - * @param {RetryOptions} options - */ -export const retryUntilCondition = async ( - operation, - condition, - message, - { maxRetries = 6, retryIntervalMs = 3500, log, setTimeout }, -) => { - console.log({ maxRetries, retryIntervalMs, message }); - let retries = 0; - - await null; - while (retries < maxRetries) { - try { - const result = await operation(); - log('RESULT', result); - if (condition(result)) { - return result; - } - } catch (error) { - if (error instanceof Error) { - log(`Error: ${error.message}`); - } else { - log(`Unknown error: ${String(error)}`); - } - } - - retries += 1; - console.log( - `Retry ${retries}/${maxRetries} - Waiting for ${retryIntervalMs}ms for ${message}...`, - ); - await sleep(retryIntervalMs, { log, setTimeout }); - } - - throw Error(`${message} condition failed after ${maxRetries} retries.`); -}; diff --git a/a3p-integration/proposals/z:acceptance/test.sh b/a3p-integration/proposals/z:acceptance/test.sh index 60a8e0021fe..78e9c2d09fa 100755 --- a/a3p-integration/proposals/z:acceptance/test.sh +++ b/a3p-integration/proposals/z:acceptance/test.sh @@ -15,9 +15,6 @@ scripts/test-vaults.ts echo ACCEPTANCE TESTING recorded instances yarn ava recorded-retired.test.js -echo ACCEPTANCE TESTING recorded instances -yarn ava recorded-retired.test.js - echo ACCEPTANCE TESTING kread yarn ava kread.test.js diff --git a/golang/cosmos/app/upgrade.go b/golang/cosmos/app/upgrade.go index 58ecf87ba03..db2470bd831 100644 --- a/golang/cosmos/app/upgrade.go +++ b/golang/cosmos/app/upgrade.go @@ -158,6 +158,22 @@ func replacePriceFeedsCoreProposal(upgradeName string) (vm.CoreProposalStep, err ) } +// func upgradeMintHolderCoreProposal(upgradeName string) (vm.CoreProposalStep, error) { +// variant := getVariantFromUpgradeName(upgradeName) + +// if variant == "" { +// return nil, nil +// } + +// return buildProposalStepWithArgs( +// "@agoric/builders/scripts/vats/upgrade-mintHolder.js", +// "defaultProposalBuilder", +// map[string]any{ +// "variant": variant, +// }, +// ) +// } + // upgrade18Handler performs standard upgrade actions plus custom actions for upgrade-18. func upgrade18Handler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgradetypes.Plan, module.VersionMap) (module.VersionMap, error) { return func(ctx sdk.Context, plan upgradetypes.Plan, fromVm module.VersionMap) (module.VersionMap, error) { diff --git a/packages/SwingSet/package.json b/packages/SwingSet/package.json index 2889711acaf..0fa9cea10b0 100644 --- a/packages/SwingSet/package.json +++ b/packages/SwingSet/package.json @@ -36,7 +36,6 @@ "@agoric/swingset-xsnap-supervisor": "^0.10.3-u18.0", "@agoric/time": "^0.3.3-u18.0", "@agoric/vat-data": "^0.5.3-u18.0", - "@agoric/xsnap": "^0.14.3-u18.0", "@agoric/xsnap-lockdown": "^0.14.1-u18.0", "@endo/base64": "^1.0.9", "@endo/bundle-source": "^3.5.0", diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 830a52989c9..0c2b703ddb3 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -31,6 +31,7 @@ "@agoric/zoe": "^0.26.3-u18.0", "@endo/init": "^1.1.7" }, + "devDependencies": {}, "files": [ "CHANGELOG.md", "src/", diff --git a/packages/inter-protocol/package.json b/packages/inter-protocol/package.json index f11ce8c61cb..02c3e2e4c1e 100644 --- a/packages/inter-protocol/package.json +++ b/packages/inter-protocol/package.json @@ -54,7 +54,6 @@ "@agoric/smart-wallet": "^0.5.4-u18.4", "@agoric/swingset-liveslots": "^0.10.3-u18.0", "@agoric/swingset-vat": "^0.33.0-u18.0", - "@agoric/zone": "^0.3.0-u18.0", "@endo/bundle-source": "^3.5.0", "@endo/init": "^1.1.7", "@endo/promise-kit": "^1.1.8", diff --git a/packages/internal/package.json b/packages/internal/package.json index 08c50a9b619..8d16fa7a71c 100755 --- a/packages/internal/package.json +++ b/packages/internal/package.json @@ -20,8 +20,8 @@ "lint:types": "tsc" }, "dependencies": { - "@agoric/base-zone": "^0.1.1-u18.0", "@endo/errors": "^1.2.8", + "@agoric/base-zone": "^0.1.1-u18.0", "@endo/common": "^1.2.8", "@endo/far": "^1.1.9", "@endo/init": "^1.1.7", diff --git a/packages/pegasus/package.json b/packages/pegasus/package.json index 50be9cd9c0c..a7321751cd3 100644 --- a/packages/pegasus/package.json +++ b/packages/pegasus/package.json @@ -38,8 +38,8 @@ "@agoric/vats": "^0.16.0-u18.4", "@agoric/vow": "^0.2.0-u18.0", "@agoric/zoe": "^0.26.3-u18.0", - "@agoric/zone": "^0.3.0-u18.0", "@endo/bundle-source": "^3.5.0", + "@agoric/zone": "^0.3.0-u18.0", "@endo/captp": "^4.4.3", "@endo/far": "^1.1.9", "@endo/init": "^1.1.7", @@ -47,10 +47,10 @@ "@endo/promise-kit": "^1.1.8" }, "devDependencies": { - "@agoric/vat-data": "^0.5.3-u18.0", "ava": "^5.3.0", "c8": "^10.1.2", - "import-meta-resolve": "^2.2.1" + "import-meta-resolve": "^2.2.1", + "@agoric/vat-data": "^0.5.3-u18.0" }, "files": [ "scripts/", diff --git a/packages/smart-wallet/package.json b/packages/smart-wallet/package.json index bc3e7681721..9d36da6ef84 100644 --- a/packages/smart-wallet/package.json +++ b/packages/smart-wallet/package.json @@ -17,6 +17,7 @@ "lint:eslint": "eslint ." }, "devDependencies": { + "@agoric/casting": "^0.4.3-u18.4", "@agoric/cosmic-proto": "^0.5.0-u18.4", "@agoric/swingset-vat": "^0.33.0-u18.0", "@endo/bundle-source": "^3.5.0", @@ -27,7 +28,6 @@ }, "dependencies": { "@endo/errors": "^1.2.8", - "@agoric/casting": "^0.4.3-u18.4", "@agoric/ertp": "^0.16.3-u18.0", "@agoric/internal": "^0.4.0-u18.0", "@agoric/notifier": "^0.7.0-u18.0", diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 91fca504e72..834b9cfb25c 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -30,8 +30,8 @@ "@endo/stream": "^1.2.8", "@opentelemetry/api": "~1.3.0", "@opentelemetry/api-logs": "0.53.0", - "@opentelemetry/exporter-logs-otlp-http": "0.53.0", "@opentelemetry/exporter-prometheus": "~0.35.0", + "@opentelemetry/exporter-logs-otlp-http": "0.53.0", "@opentelemetry/exporter-trace-otlp-http": "~0.35.0", "@opentelemetry/resources": "~1.9.0", "@opentelemetry/sdk-logs": "0.53.0", diff --git a/packages/vat-data/package.json b/packages/vat-data/package.json index f2920d2aa49..3ef74c4b6b3 100644 --- a/packages/vat-data/package.json +++ b/packages/vat-data/package.json @@ -19,12 +19,11 @@ "license": "Apache-2.0", "dependencies": { "@endo/errors": "^1.2.8", - "@endo/nat": "^5.0.13", - "@endo/patterns": "^1.4.7", "@agoric/base-zone": "^0.1.1-u18.0", "@agoric/store": "^0.9.3-u18.0", "@agoric/swingset-liveslots": "^0.10.3-u18.0", - "@endo/exo": "^1.5.7" + "@endo/exo": "^1.5.7", + "@endo/patterns": "^1.4.7" }, "devDependencies": { "@endo/init": "^1.1.7", diff --git a/packages/vm-config/package.json b/packages/vm-config/package.json index 6f4ca43f79a..47197bd054e 100644 --- a/packages/vm-config/package.json +++ b/packages/vm-config/package.json @@ -18,6 +18,7 @@ "keywords": [], "author": "Agoric", "license": "Apache-2.0", + "dependencies": {}, "devDependencies": { "ava": "^5.3.0", "c8": "^10.1.2"