Skip to content

Commit

Permalink
base upgrade-next on top of latest (use-upgrade-14) (#9204)
Browse files Browse the repository at this point in the history
closes: #9206 

## Description

With Agoric/agoric-3-proposals#141 `a3p:latest`
now includes `dev-upgrade-14` branch's upgrade handler. This removes the
redundant parts from the UNRELEASED upgrade handler and its tests in
a3p-integration.

It also introduces a convention `initial.test.js` to make clear what
tests are of the post-upgrade state, to be run before tests that can
modify the state. Another option is to number the tests so they run in
order. I figure this can happen when needed; the test.sh allows any
logic.

### Security Considerations

n/a
### Scaling Considerations

n/a

### Documentation Considerations

no

### Testing Considerations

Tests
### Upgrade Considerations

Upgrade tests
  • Loading branch information
mergify[bot] authored Apr 18, 2024
2 parents e6cde48 + fb74bbd commit d95c80d
Show file tree
Hide file tree
Showing 22 changed files with 66 additions and 248 deletions.
6 changes: 3 additions & 3 deletions a3p-integration/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"agoricSyntheticChain": {
"fromTag": "use-upgrade-13"
"fromTag": "latest"
},
"scripts": {
"build": "yarn run build:sdk && yarn run build:submissions && yarn run build:synthetic-chain",
Expand All @@ -12,8 +12,8 @@
"doctor": "yarn synthetic-chain doctor"
},
"dependencies": {
"@agoric/synthetic-chain": "^0.0.7"
"@agoric/synthetic-chain": "^0.0.10"
},
"packageManager": "[email protected].0",
"packageManager": "[email protected].1",
"license": "Apache-2.0"
}
2 changes: 2 additions & 0 deletions a3p-integration/proposals/a:upgrade-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ in `agoric-sdk/golang/cosmos/app/app.go`.
This test also includes a core proposal in its `upgradeInfo`. This is executed
after the core proposals defined in the software's upgrade handler. See `agoricProposal`
in `package.json`.

The "binaries" property of `upgradeInfo` is now required since Cosmos SDK 0.46, however it cannot be computed for an unreleased upgrade. To disable the check, `releaseNotes` is set to `false`.
74 changes: 0 additions & 74 deletions a3p-integration/proposals/a:upgrade-next/ante-fees.test.js

This file was deleted.

19 changes: 19 additions & 0 deletions a3p-integration/proposals/a:upgrade-next/initial.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import test from 'ava';

import { getVatDetails } from '@agoric/synthetic-chain';

const vats = {
network: { incarnation: 0 },
ibc: { incarnation: 0 },
localchain: { incarnation: 0 },
walletFactory: { incarnation: 2 },
zoe: { incarnation: 1 },
};

test(`vat details`, async t => {
await null;
for (const [vatName, expected] of Object.entries(vats)) {
const actual = await getVatDetails(vatName);
t.like(actual, expected, `${vatName} details mismatch`);
}
});

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions a3p-integration/proposals/a:upgrade-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"agoricProposal": {
"releaseNotes": "TBD",
"releaseNotes": false,
"sdkImageTag": "unreleased",
"planName": "UNRELEASED_UPGRADE",
"upgradeInfo": {
Expand All @@ -14,7 +14,7 @@
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@agoric/synthetic-chain": "^0.0.7",
"@agoric/synthetic-chain": "^0.0.10",
"ava": "^5.3.1"
},
"ava": {
Expand All @@ -27,5 +27,5 @@
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops"
},
"packageManager": "[email protected].0"
"packageManager": "[email protected].1"
}
30 changes: 0 additions & 30 deletions a3p-integration/proposals/a:upgrade-next/post.test.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,4 @@ test('upgrade Zoe to verify ZcfBundleCap endures', async t => {
detailsBefore.incarnation + 2,
'wf incarnation must increase by 2',
);

// The test restarts the WalletFactory, so it'll use the recently assigned
// ZCF bundle. It then restarts Zoe, so it'll revert to whichever ZCF bundle
// made it to persistent store. We then restart the Wallet Factory and see if
// it's gone back to the ZCF that Zoe initially knew about. If we could get the
// ZCF bundleID here from the probe, we'd explicitly check for that. Instead,
// we have to be content that it did indeed use the newly assigned bundle in
// manual tests.
t.not(detailsAfter.bundleID, detailsBefore.bundleID);
});
4 changes: 2 additions & 2 deletions a3p-integration/proposals/a:upgrade-next/provisioning.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const replaceTemplateValuesInFile = async (fileName, replacements) => {
await writeFile(`${fileName}.js`, script);
};

test(`provisioning vat was upgraded`, async t => {
test.serial(`provisioning vat was upgraded`, async t => {
const incarnation = await getIncarnation('provisioning');

t.is(incarnation, 1);
});

test(`send invitation via namesByAddress`, async t => {
test.serial(`send invitation via namesByAddress`, async t => {
const addr = await getUser('gov1');

await replaceTemplateValuesInFile(`${SUBMISSION_DIR}/send-script`, {
Expand Down
9 changes: 6 additions & 3 deletions a3p-integration/proposals/a:upgrade-next/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Place here any test that should be executed using the executed proposal.
# The effects of this step are not persisted in further proposal layers.

yarn ava post.test.js
GLOBIGNORE=post.test.js
yarn ava *.test.js
# test the state right after upgrade
yarn ava initial.test.js

# test more, in ways that changes system state
GLOBIGNORE=initial.test.js
yarn ava ./*.test.js
46 changes: 0 additions & 46 deletions a3p-integration/proposals/a:upgrade-next/wallet-repairs.test.js

This file was deleted.

10 changes: 5 additions & 5 deletions a3p-integration/proposals/a:upgrade-next/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ __metadata:
version: 8
cacheKey: 10c0

"@agoric/synthetic-chain@npm:^0.0.7":
version: 0.0.7
resolution: "@agoric/synthetic-chain@npm:0.0.7"
"@agoric/synthetic-chain@npm:^0.0.10":
version: 0.0.10
resolution: "@agoric/synthetic-chain@npm:0.0.10"
dependencies:
"@endo/zip": "npm:^1.0.1"
better-sqlite3: "npm:^9.4.0"
chalk: "npm:^5.3.0"
execa: "npm:^8.0.1"
bin:
synthetic-chain: dist/cli/cli.js
checksum: 10c0/ae53a9c4837eecc7db5020c8e0ac46f02a5a8ae6679adfe5e32365d6895f8ca8eb1da2dad3b3dc7a545ec801275b1a53d68bb0737db462ec9ea82bbcffe37374
checksum: 10c0/c75308830cbe879ba865e285a20529ac82da1434c778046b27c790e426a8139369c3ef904939905ad73109202a336925733448109a85bc19aa2d350ebdb2a520
languageName: node
linkType: hard

Expand Down Expand Up @@ -1820,7 +1820,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@agoric/synthetic-chain": "npm:^0.0.7"
"@agoric/synthetic-chain": "npm:^0.0.10"
ava: "npm:^5.3.1"
languageName: unknown
linkType: soft
Expand Down
4 changes: 2 additions & 2 deletions a3p-integration/proposals/b:localchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@agoric/synthetic-chain": "^0.0.7",
"@agoric/synthetic-chain": "^0.0.10",
"ava": "^5.3.1"
},
"ava": {
Expand All @@ -19,5 +19,5 @@
"!submission"
]
},
"packageManager": "[email protected].0"
"packageManager": "[email protected].1"
}
10 changes: 5 additions & 5 deletions a3p-integration/proposals/b:localchain/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ __metadata:
version: 8
cacheKey: 10c0

"@agoric/synthetic-chain@npm:^0.0.7":
version: 0.0.7
resolution: "@agoric/synthetic-chain@npm:0.0.7"
"@agoric/synthetic-chain@npm:^0.0.10":
version: 0.0.10
resolution: "@agoric/synthetic-chain@npm:0.0.10"
dependencies:
"@endo/zip": "npm:^1.0.1"
better-sqlite3: "npm:^9.4.0"
chalk: "npm:^5.3.0"
execa: "npm:^8.0.1"
bin:
synthetic-chain: dist/cli/cli.js
checksum: 10c0/ae53a9c4837eecc7db5020c8e0ac46f02a5a8ae6679adfe5e32365d6895f8ca8eb1da2dad3b3dc7a545ec801275b1a53d68bb0737db462ec9ea82bbcffe37374
checksum: 10c0/c75308830cbe879ba865e285a20529ac82da1434c778046b27c790e426a8139369c3ef904939905ad73109202a336925733448109a85bc19aa2d350ebdb2a520
languageName: node
linkType: hard

Expand Down Expand Up @@ -1820,7 +1820,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@agoric/synthetic-chain": "npm:^0.0.7"
"@agoric/synthetic-chain": "npm:^0.0.10"
ava: "npm:^5.3.1"
languageName: unknown
linkType: soft
Expand Down
Loading

0 comments on commit d95c80d

Please sign in to comment.