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

9063 init chainInfo #9477

Merged
merged 6 commits into from
Jun 10, 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
2 changes: 1 addition & 1 deletion a3p-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"@agoric/synthetic-chain": "^0.1.0",
"@types/better-sqlite3": "^7.6.9"
},
"packageManager": "yarn@4.1.1",
"packageManager": "yarn@4.2.2",
"license": "Apache-2.0"
}
2 changes: 1 addition & 1 deletion a3p-integration/proposals/a:upgrade-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops"
},
"packageManager": "yarn@4.1.1"
"packageManager": "yarn@4.2.2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/submission
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
6 changes: 6 additions & 0 deletions a3p-integration/proposals/b:enable-orchestration/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CoreEvalProposal to enable orchestration features

The `submission` for this proposal is automatically generated during `yarn build`
in [a3p-integration](../..) using the code in agoric-sdk through
[build-all-submissions.sh](../../scripts/build-all-submissions.sh) and
[build-submission.sh](../../scripts/build-submission.sh).
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import test from 'ava';

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

const vats = {
network: { incarnation: 0 },
ibc: { incarnation: 0 },
localchain: { incarnation: 0 },
orchestration: { incarnation: 0 },
transfer: { incarnation: 0 },
walletFactory: { incarnation: 3 },
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`);
}
});

test('chain info', async t => {
const cosmos = await agd
.query(
'vstorage',
'data',
'--output',
'json',
'published.agoricNames.chain.cosmos',
)
.then(res => JSON.parse(JSON.parse(JSON.parse(res.value).values[0]).body));
console.log('chain.cosmos', cosmos);
t.like(cosmos, { chainId: 'cosmoslocal' });

const names = await agd.query(
'vstorage',
'children',
'--output',
'json',
'published.agoricNames.chain',
);
t.deepEqual(names.children, [
'agoric',
'celestia',
'cosmos',
'osmosis',
'stride',
]);
});
23 changes: 23 additions & 0 deletions a3p-integration/proposals/b:enable-orchestration/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"agoricProposal": {
"type": "/agoric.swingset.CoreEvalProposal",
"source": "subdir",
"sdk-generate": [
"vats/init-orchestration.js"
]
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
"@agoric/synthetic-chain": "^0.1.0",
"ava": "^5.3.1"
},
"ava": {
"concurrency": 1,
"serial": true,
Comment on lines +15 to +17
Copy link
Member

Choose a reason for hiding this comment

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

@0xpatrickdev you mentioned using serial in the starship work; apparently that's pretty normal for this sort of thing.

"files": [
"!submission"
]
},
"packageManager": "[email protected]"
}
4 changes: 4 additions & 0 deletions a3p-integration/proposals/b:enable-orchestration/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
source /usr/src/upgrade-test-scripts/env_setup.sh

yarn ava
Loading
Loading