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

A3P commands without synthetic-chain #10396

Merged
merged 22 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions a3p-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,37 @@ Instead of relying on an automatic `submission` folder, a core-eval proposal can

# Build details

In the `ghcr.io/agoric/agoric-sdk` image the filesystem is:
```
/usr/src/agoric-sdk
```

With the proposals layered on top of the `agoric-sdk` image, the filesystem adds (for example):
```
/usr/src/proposals/n:upgrade-next
/usr/src/proposals/z:acceptance
```

In agoric-sdk CI and development, we want the proposals to use the versions of the packages in the agoric-sdk source tree. To accomplish this we use `yarn link`. In Yarn 4 (berry) it uses a `portal` protocol to link to another Yarn project on the filesystem. One kink is that in development the command would,
```
yarn link --relative ../../.. --all
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is this run only one time in your machine to create the resolutions in the n:upgrade-next/package.json?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

```
Which configures the package.json resolutions to find agoric-sdk three levels up.

But in CI the proposals aren't nested under agoric-sdk and the command would be,
```
yarn link --relative ../../agoric-sdk --all
```

To give a consistent location, `a3p-integration` has a symlink to the `agoric-sdk` project where the proposals expect it in the Docker fileystem. (I.e. treating `a3p-integration` as `/usr/src` of the Docker image.)


The `yarn build` script automates 3 steps:
- Building the `unreleased` SDK image
- Generating the `submission` folders in core proposal packages
- Building the synthetic-chain images using the proposals


## Generate a docker image with the `agoric-sdk` chain software

The chain software upgrade proposal contained in this end-to-end integration test performs an upgrade of the agoric-3 synthetic chain to an `UNRELEASED_A3P_INTEGRATION` plan name (or the corresponding upgrade plan name for release branches). It loads the docker image `ghcr.io/agoric/agoric-sdk:unreleased` for the software implementing that upgrade (both in the `master` branch or in release branches).
Expand Down
1 change: 1 addition & 0 deletions a3p-integration/agoric-sdk
2 changes: 1 addition & 1 deletion a3p-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"@agoric/synthetic-chain": "^0.3.0",
"@types/better-sqlite3": "^7.6.11"
},
"packageManager": "yarn@4.2.2",
"packageManager": "yarn@4.5.1",
"license": "Apache-2.0"
}
11 changes: 7 additions & 4 deletions a3p-integration/proposals/n:upgrade-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"license": "Apache-2.0",
"dependencies": {
"@agoric/synthetic-chain": "^0.3.0",
"@endo/init": "^1.1.5",
"@endo/marshal": "^1.5.4",
"@endo/init": "^1.1.6",
"@endo/marshal": "^1.6.1",
"ava": "^5.3.1",
"better-sqlite3": "^9.6.0",
"execa": "^9.3.1"
"execa": "^9.5.1"
},
"ava": {
"concurrency": 1,
Expand All @@ -28,5 +28,8 @@
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"devDependencies": {
"typescript": "^5.6.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const openMarginalVault = async t => {
const currentVaults = await agops.vaults('list', '--from', USER1ADDR);

t.log('opening a vault');
// @ts-expect-error bad typedef
await openVault(USER1ADDR, 5, 10);
user1IST += 5;
const istBalanceAfterVaultOpen = await getISTBalance(USER1ADDR);
Expand Down
72 changes: 0 additions & 72 deletions a3p-integration/proposals/n:upgrade-next/sync-tools.js

This file was deleted.

8 changes: 5 additions & 3 deletions a3p-integration/proposals/n:upgrade-next/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"target": "ESNext",
"module": "NodeNext",
"allowJs": true,
"checkJs": true,
"strict": false,
"strictNullChecks": true,
"noEmit": true,
"noImplicitThis": true
"noImplicitThis": true,
// XXX synthetic-chain has some errors
"skipLibCheck": true
}
}
Loading
Loading