Skip to content

Commit

Permalink
chore(a3p-integration): Bump @agoric/synthetic-chain dependencies (#1…
Browse files Browse the repository at this point in the history
…0533)

## Description
A final step that I forgot to include in #10485, so it's now a followup.

### Security Considerations
n/a

### Scaling Considerations
n/a

### Documentation Considerations
n/a

### Testing Considerations
Covered by CI.

### Upgrade Considerations
n/a
  • Loading branch information
mergify[bot] authored Nov 20, 2024
2 parents 59b637f + bb61622 commit 72248e9
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 45 deletions.
2 changes: 1 addition & 1 deletion a3p-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"doctor": "yarn synthetic-chain doctor"
},
"dependencies": {
"@agoric/synthetic-chain": "^0.4.0",
"@agoric/synthetic-chain": "^0.4.3",
"@types/better-sqlite3": "^7.6.11"
},
"packageManager": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion a3p-integration/proposals/n:upgrade-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "Apache-2.0",
"dependencies": {
"@agoric/client-utils": "dev",
"@agoric/synthetic-chain": "^0.3.0",
"@agoric/synthetic-chain": "^0.4.3",
"@endo/init": "^1.1.6",
"@endo/marshal": "^1.6.1",
"ava": "^5.3.1",
Expand Down
10 changes: 5 additions & 5 deletions a3p-integration/proposals/n:upgrade-next/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ __metadata:
languageName: node
linkType: hard

"@agoric/synthetic-chain@npm:^0.3.0":
version: 0.3.0
resolution: "@agoric/synthetic-chain@npm:0.3.0"
"@agoric/synthetic-chain@npm:^0.4.3":
version: 0.4.3
resolution: "@agoric/synthetic-chain@npm:0.4.3"
dependencies:
"@endo/zip": "npm:^1.0.7"
better-sqlite3: "npm:^9.6.0"
Expand All @@ -327,7 +327,7 @@ __metadata:
execa: "npm:^9.3.1"
bin:
synthetic-chain: dist/cli/cli.js
checksum: 10c0/17c6241bdc48b8a2a7608c9d4d7c0a0c76fb10d4ee44a31a1150104a792bcd1133f4b1a7e8ab26673a07450b3ceabccd9911999117568221b49221b6ee4306a1
checksum: 10c0/b904b531bf2d4066322e4b86b7653fa4fd88d52cce86d82d82ebaecedd526a83832488e1f82b5d0ece23cf5b13fa6bf4e49b4c25339a3c17a658c1302ef9321b
languageName: node
linkType: hard

Expand Down Expand Up @@ -4932,7 +4932,7 @@ __metadata:
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@agoric/client-utils": "npm:dev"
"@agoric/synthetic-chain": "npm:^0.3.0"
"@agoric/synthetic-chain": "npm:^0.4.3"
"@endo/init": "npm:^1.1.6"
"@endo/marshal": "npm:^1.6.1"
ava: "npm:^5.3.1"
Expand Down
2 changes: 1 addition & 1 deletion a3p-integration/proposals/p:upgrade-19/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@agoric/client-utils": "0.1.1-dev-02c06c4.0",
"@agoric/ertp": "dev",
"@agoric/synthetic-chain": "^0.3.0",
"@agoric/synthetic-chain": "^0.4.3",
"@agoric/zoe": "dev",
"@endo/errors": "1.2.7",
"@endo/init": "^1.1.5",
Expand Down
10 changes: 5 additions & 5 deletions a3p-integration/proposals/p:upgrade-19/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,9 @@ __metadata:
languageName: node
linkType: hard

"@agoric/synthetic-chain@npm:^0.3.0":
version: 0.3.0
resolution: "@agoric/synthetic-chain@npm:0.3.0"
"@agoric/synthetic-chain@npm:^0.4.3":
version: 0.4.3
resolution: "@agoric/synthetic-chain@npm:0.4.3"
dependencies:
"@endo/zip": "npm:^1.0.7"
better-sqlite3: "npm:^9.6.0"
Expand All @@ -511,7 +511,7 @@ __metadata:
execa: "npm:^9.3.1"
bin:
synthetic-chain: dist/cli/cli.js
checksum: 10c0/17c6241bdc48b8a2a7608c9d4d7c0a0c76fb10d4ee44a31a1150104a792bcd1133f4b1a7e8ab26673a07450b3ceabccd9911999117568221b49221b6ee4306a1
checksum: 10c0/b904b531bf2d4066322e4b86b7653fa4fd88d52cce86d82d82ebaecedd526a83832488e1f82b5d0ece23cf5b13fa6bf4e49b4c25339a3c17a658c1302ef9321b
languageName: node
linkType: hard

Expand Down Expand Up @@ -5203,7 +5203,7 @@ __metadata:
dependencies:
"@agoric/client-utils": "npm:0.1.1-dev-02c06c4.0"
"@agoric/ertp": "npm:dev"
"@agoric/synthetic-chain": "npm:^0.3.0"
"@agoric/synthetic-chain": "npm:^0.4.3"
"@agoric/zoe": "npm:dev"
"@endo/errors": "npm:1.2.7"
"@endo/init": "npm:^1.1.5"
Expand Down
2 changes: 1 addition & 1 deletion a3p-integration/proposals/s:stake-bld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"dependencies": {
"@agoric/internal": "0.3.3-dev-5676146.0",
"@agoric/synthetic-chain": "^0.3.0",
"@agoric/synthetic-chain": "^0.4.3",
"@cosmjs/stargate": "^0.32.3",
"@cosmjs/tendermint-rpc": "^0.32.3",
"@endo/errors": "^1.2.2",
Expand Down
10 changes: 5 additions & 5 deletions a3p-integration/proposals/s:stake-bld/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ __metadata:
languageName: node
linkType: hard

"@agoric/synthetic-chain@npm:^0.3.0":
version: 0.3.0
resolution: "@agoric/synthetic-chain@npm:0.3.0"
"@agoric/synthetic-chain@npm:^0.4.3":
version: 0.4.3
resolution: "@agoric/synthetic-chain@npm:0.4.3"
dependencies:
"@endo/zip": "npm:^1.0.7"
better-sqlite3: "npm:^9.6.0"
Expand All @@ -376,7 +376,7 @@ __metadata:
execa: "npm:^9.3.1"
bin:
synthetic-chain: dist/cli/cli.js
checksum: 10c0/17c6241bdc48b8a2a7608c9d4d7c0a0c76fb10d4ee44a31a1150104a792bcd1133f4b1a7e8ab26673a07450b3ceabccd9911999117568221b49221b6ee4306a1
checksum: 10c0/b904b531bf2d4066322e4b86b7653fa4fd88d52cce86d82d82ebaecedd526a83832488e1f82b5d0ece23cf5b13fa6bf4e49b4c25339a3c17a658c1302ef9321b
languageName: node
linkType: hard

Expand Down Expand Up @@ -4692,7 +4692,7 @@ __metadata:
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@agoric/internal": "npm:0.3.3-dev-5676146.0"
"@agoric/synthetic-chain": "npm:^0.3.0"
"@agoric/synthetic-chain": "npm:^0.4.3"
"@cosmjs/stargate": "npm:^0.32.3"
"@cosmjs/tendermint-rpc": "npm:^0.32.3"
"@endo/errors": "npm:^1.2.2"
Expand Down
12 changes: 9 additions & 3 deletions a3p-integration/proposals/z:acceptance/governance.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ test.serial(
);
assert(charterInvitation, 'missing charter invitation');

t.log('proposing on param change');
const params = {
ChargingPeriod: 400n,
};
const path = { paramPath: { key: 'governedParams' } };
t.log('Proposing param change', { params, path });

await governanceDriver.proposeVaultDirectorParamChange(
governanceAddresses[0],
Expand All @@ -52,6 +52,7 @@ test.serial(
);

const questionUpdate = await getLastUpdate(governanceAddresses[0]);
t.log(questionUpdate);
t.like(questionUpdate, {
status: { numWantsSatisfied: 1 },
});
Expand All @@ -70,13 +71,17 @@ test.serial(
v[1].value[0].instance.getBoardId() ===
instances.economicCommittee.getBoardId(),
);
assert(committeeInvitationForVoter, 'missing committee invitation');
assert(
committeeInvitationForVoter,
`${address} must have committee invitation`,
);
await governanceDriver.voteOnProposedChanges(
address,
committeeInvitationForVoter[0],
);

const voteUpdate = await getLastUpdate(address);
t.log(`${address} voted`);
t.like(voteUpdate, {
status: { numWantsSatisfied: 1 },
});
Expand All @@ -88,15 +93,16 @@ test.serial(
'published.committees.Economic_Committee.latestQuestion',
)
);
t.log('Waiting for deadline', latestQuestion);
/** @type {bigint} */
// @ts-expect-error assume POSIX seconds since epoch
const deadline = latestQuestion.closingRule.deadline;
await waitUntil(deadline);

t.log('check if latest outcome is correct');
const latestOutcome = await readLatestHead(
'published.committees.Economic_Committee.latestOutcome',
);
t.log('Verifying latest outcome', latestOutcome);
t.like(latestOutcome, { outcome: 'win' });
},
);
2 changes: 1 addition & 1 deletion a3p-integration/proposals/z:acceptance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@agoric/inter-protocol": "dev",
"@agoric/internal": "dev",
"@agoric/store": "dev",
"@agoric/synthetic-chain": "^0.3.0",
"@agoric/synthetic-chain": "^0.4.3",
"@agoric/zoe": "dev",
"@endo/errors": "^1.2.7",
"@endo/far": "^1.1.8",
Expand Down
23 changes: 11 additions & 12 deletions a3p-integration/proposals/z:acceptance/test-lib/governance.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ export const makeGovernanceDriver = async (fetch, networkConfig) => {

/** @param {string} previousOfferId */
const generateVoteOffer = async previousOfferId => {
const id = `propose-${Date.now()}`;

const latestQuestionRecord =
/** @type {import('@agoric/governance/src/types.js').QuestionSpec} */ (
await readLatestHead(
'published.committees.Economic_Committee.latestQuestion',
)
);

const id = `propose-${Date.now()}`;
const chosenPositions = [latestQuestionRecord.positions[0]];
const body = {
method: 'executeOffer',
Expand Down Expand Up @@ -81,21 +80,21 @@ export const makeGovernanceDriver = async (fetch, networkConfig) => {
params,
paramsPath,
) => {
const voteDurSec = BigInt(voteDur);
const toSec = (/** @type {number} */ ms) => BigInt(Math.round(ms / 1000));

const id = `propose-${Date.now()}`;
const deadline = toSec(Date.now()) + voteDurSec;

const a = await agoric.follow(
const instancesRaw = await agoric.follow(
'-lF',
':published.agoricNames.instance',
'-o',
'text',
);
const instance = Object.fromEntries(marshaller.fromCapData(JSON.parse(a)));
assert(instance.VaultFactory);
const instances = Object.fromEntries(
marshaller.fromCapData(JSON.parse(instancesRaw)),
);
const { VaultFactory } = instances;
assert(VaultFactory);

const msSinceEpoch = Date.now();
const id = `propose-${msSinceEpoch}`;
const deadline = BigInt(Math.ceil(msSinceEpoch / 1000)) + BigInt(voteDur);
const body = {
method: 'executeOffer',
offer: {
Expand All @@ -107,7 +106,7 @@ export const makeGovernanceDriver = async (fetch, networkConfig) => {
},
offerArgs: {
deadline,
instance: instance.VaultFactory,
instance: VaultFactory,
params,
path: paramsPath,
},
Expand Down
10 changes: 5 additions & 5 deletions a3p-integration/proposals/z:acceptance/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ __metadata:
languageName: node
linkType: soft

"@agoric/synthetic-chain@npm:^0.3.0":
version: 0.3.0
resolution: "@agoric/synthetic-chain@npm:0.3.0"
"@agoric/synthetic-chain@npm:^0.4.3":
version: 0.4.3
resolution: "@agoric/synthetic-chain@npm:0.4.3"
dependencies:
"@endo/zip": "npm:^1.0.7"
better-sqlite3: "npm:^9.6.0"
Expand All @@ -358,7 +358,7 @@ __metadata:
execa: "npm:^9.3.1"
bin:
synthetic-chain: dist/cli/cli.js
checksum: 10c0/17c6241bdc48b8a2a7608c9d4d7c0a0c76fb10d4ee44a31a1150104a792bcd1133f4b1a7e8ab26673a07450b3ceabccd9911999117568221b49221b6ee4306a1
checksum: 10c0/b904b531bf2d4066322e4b86b7653fa4fd88d52cce86d82d82ebaecedd526a83832488e1f82b5d0ece23cf5b13fa6bf4e49b4c25339a3c17a658c1302ef9321b
languageName: node
linkType: hard

Expand Down Expand Up @@ -5806,7 +5806,7 @@ __metadata:
"@agoric/inter-protocol": "npm:dev"
"@agoric/internal": "npm:dev"
"@agoric/store": "npm:dev"
"@agoric/synthetic-chain": "npm:^0.3.0"
"@agoric/synthetic-chain": "npm:^0.4.3"
"@agoric/zoe": "npm:dev"
"@endo/errors": "npm:^1.2.7"
"@endo/far": "npm:^1.1.8"
Expand Down
10 changes: 5 additions & 5 deletions a3p-integration/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ __metadata:
version: 8
cacheKey: 10c0

"@agoric/synthetic-chain@npm:^0.4.0":
version: 0.4.0
resolution: "@agoric/synthetic-chain@npm:0.4.0"
"@agoric/synthetic-chain@npm:^0.4.3":
version: 0.4.3
resolution: "@agoric/synthetic-chain@npm:0.4.3"
dependencies:
"@endo/zip": "npm:^1.0.7"
better-sqlite3: "npm:^9.6.0"
Expand All @@ -16,7 +16,7 @@ __metadata:
execa: "npm:^9.3.1"
bin:
synthetic-chain: dist/cli/cli.js
checksum: 10c0/3cb31bba30f4c64ac459da39aed639a3ab0405aa1d867b4897bbad21cedd40f2142785be7f2e55b7198c58c6a31674fb534e115f7e20ebe20f4de80bfb55e7c8
checksum: 10c0/b904b531bf2d4066322e4b86b7653fa4fd88d52cce86d82d82ebaecedd526a83832488e1f82b5d0ece23cf5b13fa6bf4e49b4c25339a3c17a658c1302ef9321b
languageName: node
linkType: hard

Expand Down Expand Up @@ -1034,7 +1034,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@agoric/synthetic-chain": "npm:^0.4.0"
"@agoric/synthetic-chain": "npm:^0.4.3"
"@types/better-sqlite3": "npm:^7.6.11"
languageName: unknown
linkType: soft
Expand Down

0 comments on commit 72248e9

Please sign in to comment.