Skip to content

Commit

Permalink
chore: More upgrade-16 cherry-picks (#9675)
Browse files Browse the repository at this point in the history
## Description

Includes commits from the following PRs:
* #9671
* #9672

...plus a new commit introducing upgrade name "agoric-upgrade-16-2".

Constructed using the following `git rebase -i HEAD` todo list:
```
# pull request #9671
# resolve conflicts by:
# * `git rm packages/orchestration/test/supports.ts`
# * in packages/vats/src/proposals/transfer-proposal.js, take the proposed imports
# * in packages/vats/test/localchain.test.js, leave `import { NonNullish } from '@agoric/assert'`
#   but take the VTRANSFER_IBC_EVENT change
pick 217005a fix: adopt `VTRANSFER_IBC_EVENT` as an action-type (#9671)

# pull request #9672 branch mfig-update-swingset-configs
label base-mfig-update-swingset-configs
pick 870d205 fix(vm-config): always use `init-localchain` and `init-transfer`
pick 236a3f0 chore(vm-config): remove obsolete `pegasus/init-core.js`
pick 7f7a8bd chore(bank): demote noisy logs to `debug` level
pick 9b317a0 docs: purpose of itest-vaults config
label mfig-update-swingset-configs
reset base-mfig-update-swingset-configs
merge -C 8f019c0 mfig-update-swingset-configs # fix(vm-config): always use `init-localchain` and `init-transfer` (#9672)
```
  • Loading branch information
gibson042 authored Jul 10, 2024
2 parents 07b0130 + df59ce3 commit 5a29e6a
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 12 deletions.
3 changes: 2 additions & 1 deletion golang/cosmos/app/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
)

var upgradeNamesOfThisVersion = map[string]bool{
"agoric-upgrade-16": true,
"agoric-upgrade-16": true,
"agoric-upgrade-16-2": true,
}

func isFirstTimeUpgradeOfThisVersion(app *GaiaApp, ctx sdk.Context) bool {
Expand Down
3 changes: 2 additions & 1 deletion packages/boot/test/bootstrapTests/vtransfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { TestFn } from 'ava';
import type { ScopedBridgeManager } from '@agoric/vats';
import type { TransferMiddleware } from '@agoric/vats/src/transfer.js';
import type { TransferVat } from '@agoric/vats/src/vat-transfer.js';
import { BridgeId, VTRANSFER_IBC_EVENT } from '@agoric/internal';
import { BridgeId } from '@agoric/internal';
import { VTRANSFER_IBC_EVENT } from '@agoric/internal/src/action-types.js';
import { makeSwingsetTestKit } from '../../tools/supports.ts';

const makeDefaultTestContext = async t => {
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmic-swingset/economy-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
],
[
"@agoric/builders/scripts/vats/init-network.js",
"@agoric/builders/scripts/pegasus/init-core.js",
"@agoric/builders/scripts/vats/init-transfer.js"
"@agoric/builders/scripts/vats/init-localchain.js",
"@agoric/builders/scripts/vats/init-transfer.js"
],
[
{
Expand Down
5 changes: 5 additions & 0 deletions packages/cosmic-swingset/src/launch-chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@ export async function launch({
break;
}

case ActionType.VTRANSFER_IBC_EVENT: {
p = doBridgeInbound(BRIDGE_ID.VTRANSFER, action, inboundNum);
break;
}

case ActionType.PLEASE_PROVISION: {
p = doBridgeInbound(BRIDGE_ID.PROVISION, action, inboundNum);
break;
Expand Down
1 change: 1 addition & 0 deletions packages/internal/src/action-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ export const VBANK_BALANCE_UPDATE = 'VBANK_BALANCE_UPDATE';
export const WALLET_ACTION = 'WALLET_ACTION';
export const WALLET_SPEND_ACTION = 'WALLET_SPEND_ACTION';
export const INSTALL_BUNDLE = 'INSTALL_BUNDLE';
export const VTRANSFER_IBC_EVENT = 'VTRANSFER_IBC_EVENT';
2 changes: 0 additions & 2 deletions packages/internal/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export const BridgeId = /** @type {const} */ ({
harden(BridgeId);
/** @typedef {(typeof BridgeId)[keyof typeof BridgeId]} BridgeIdValue */

export const VTRANSFER_IBC_EVENT = 'VTRANSFER_IBC_EVENT';

export const CosmosInitKeyToBridgeId = {
vbankPort: BridgeId.BANK,
vibcPort: BridgeId.DIBC,
Expand Down
3 changes: 2 additions & 1 deletion packages/vats/src/proposals/transfer-proposal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
import { E } from '@endo/far';
import { BridgeId as BRIDGE_ID, VTRANSFER_IBC_EVENT } from '@agoric/internal';
import { BridgeId as BRIDGE_ID } from '@agoric/internal';
import { VTRANSFER_IBC_EVENT } from '@agoric/internal/src/action-types.js';

/**
* @param {BootstrapPowers & {
Expand Down
2 changes: 1 addition & 1 deletion packages/vats/src/transfer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check
import { E } from '@endo/far';
import { M } from '@endo/patterns';
import { VTRANSFER_IBC_EVENT } from '@agoric/internal';
import { VTRANSFER_IBC_EVENT } from '@agoric/internal/src/action-types.js';
import { coerceToByteSource, byteSourceToBase64 } from '@agoric/network';
import { TargetAppI, AppTransformerI } from './bridge-target.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/vats/src/vat-bank.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const prepareBankChannelHandler = zone =>
updater = addressToUpdater.get(address);
}
} catch (e) {
console.error('Unregistered denom in', update, e);
console.debug('Unregistered denom in', update, e);
}
if (updater) {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/vats/test/localchain.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { reincarnate } from '@agoric/swingset-liveslots/tools/setup-vat-data.js'
import { withAmountUtils } from '@agoric/zoe/tools/test-utils.js';
import { makeDurableZone } from '@agoric/zone/durable.js';
import { getInterfaceOf } from '@endo/marshal';
import { VTRANSFER_IBC_EVENT } from '@agoric/internal';
import { VTRANSFER_IBC_EVENT } from '@agoric/internal/src/action-types.js';
import { prepareVowTools, heapVowE as E } from '@agoric/vow/vat.js';
import { prepareLocalChainTools } from '../src/localchain.js';
import { prepareBridgeTargetModule } from '../src/bridge-target.js';
Expand Down
4 changes: 3 additions & 1 deletion packages/vm-config/decentral-itest-vaults-config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"$comment": "This SwingSet config file (see loadSwingsetConfigFile) is designed to bring up vaults test networks in an automated fashion. It includes coreProposals to start vaults. Testing facilities are limited to an initialPrice for ATOM and addresses with known keys.",
"$comment": "Not just vaults! This SwingSet config (see loadSwingsetConfigFile) started for integration testing of Vaults is designed to bring up vaults but became the defacto config for integration testing outside this repo (e.g. instagoric). It includes coreProposals to start Inter Protocol (including vaults) plus Orchestration. Testing facilities are limited to an initialPrice for ATOM and addresses with known keys.",
"bootstrap": "bootstrap",
"defaultReapInterval": 1000,
"coreProposals": [
"@agoric/builders/scripts/vats/init-core.js",
"@agoric/builders/scripts/vats/init-network.js",
"@agoric/builders/scripts/vats/init-localchain.js",
"@agoric/builders/scripts/vats/init-transfer.js",
{
"module": "@agoric/builders/scripts/inter-protocol/init-core.js",
"entrypoint": "defaultProposalBuilder",
Expand Down
1 change: 0 additions & 1 deletion packages/vm-config/demo-proposals.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[
"@agoric/builders/scripts/inter-protocol/init-core.js",
"@agoric/builders/scripts/pegasus/init-core.js",
"@agoric/builders/scripts/vats/init-network.js",
"@agoric/builders/scripts/vats/init-localchain.js",
"@agoric/builders/scripts/vats/init-transfer.js"
Expand Down

0 comments on commit 5a29e6a

Please sign in to comment.