Skip to content

Commit

Permalink
9063 init chainInfo (#9477)
Browse files Browse the repository at this point in the history
refs: #9063

## Description

Progress on,
- #9063

To be closed when all the names in the checklist are present.


### Security Considerations

none

### Scaling Considerations

none

### Documentation Considerations

none

### Testing Considerations

Updated test setup

### Upgrade Considerations

Not yet deployed
  • Loading branch information
mergify[bot] committed Jun 10, 2024
2 parents 71db129 + 5d4b6fd commit 1dcae57
Show file tree
Hide file tree
Showing 25 changed files with 2,776 additions and 53 deletions.
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).
50 changes: 50 additions & 0 deletions a3p-integration/proposals/b:enable-orchestration/initial.test.js
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,
"files": [
"!submission"
]
},
"packageManager": "yarn@4.2.2"
}
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

0 comments on commit 1dcae57

Please sign in to comment.