Skip to content

Commit

Permalink
chore: remove upgrade-12 and other actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Dec 1, 2023
1 parent 6b984ef commit 6426775
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 81 deletions.
6 changes: 0 additions & 6 deletions golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ import (
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
tmtypes "github.com/tendermint/tendermint/types"
dbm "github.com/tendermint/tm-db"

gaiaappparams "github.com/Agoric/agoric-sdk/golang/cosmos/app/params"
Expand Down Expand Up @@ -832,11 +831,6 @@ func upgrade13Handler(app *GaiaApp, targetUpgrade string) func(sdk.Context, upgr
// Record the plan to send to SwingSet
app.upgradePlan = &plan

// Reflect default BlockParams.MaxBytes change to current params
cp := app.BaseApp.GetConsensusParams(ctx)
cp.Block.MaxBytes = tmtypes.DefaultBlockParams().MaxBytes
app.BaseApp.StoreConsensusParams(ctx, cp)

// Always run module migrations
mvm, err := app.mm.RunMigrations(ctx, app.configurator, fromVm)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
upgrade-walletFactory-permit.json
upgrade-walletFactory.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
import test from 'ava';

import { agd, agoric, agops } from '../cliHelper.js';
import { GOV1ADDR, SDK_ROOT } from '../constants.js';
import { installBundles, runZcfUpgrade, runProber } from './actions.js';
import { agops } from '../cliHelper.js';
import { GOV1ADDR } from '../constants.js';
import { adjustVault, closeVault, mintIST, openVault } from '../econHelpers.js';

test.before(async t => {
await mintIST(GOV1ADDR, 12340000000, 10000, 2000);

const bundlesData = [
{
name: 'Zcf-upgrade',
filePath: `${SDK_ROOT}/packages/zoe/src/contractFacet/vatRoot.js`,
},
{
name: 'Zoe-upgrade',
filePath: `${SDK_ROOT}/packages/vats/src/vat-zoe.js`,
},
{
name: 'prober-contract',
filePath: `${SDK_ROOT}/packages/boot/test/bootstrapTests/zcfProbe.js`,
},
];

// @ts-expect-error
t.context.bundleIds = await installBundles(bundlesData);
});

test.skip('Open Vaults', async t => {
Expand All @@ -38,31 +19,3 @@ test.skip('Open Vaults', async t => {
await adjustVault(GOV1ADDR, vaultId, { giveCollateral: 2.0 });
await closeVault(GOV1ADDR, vaultId, 5.75);
});

test.skip('Run Prober (first time)', async t => {
// @ts-expect-error
await runProber(t.context.bundleIds['prober-contract']);
const data = await agd.query('vstorage', 'data', 'published.prober-asid9a');
const value = JSON.parse(data.value);
t.is(value.values[0], 'false');
});

test.skip('Upgrade Zoe and ZCF', async t => {
await runZcfUpgrade(
// @ts-expect-error
t.context.bundleIds['Zcf-upgrade'],
// @ts-expect-error
t.context.bundleIds['Zoe-upgrade'],
);

t.pass();
});

test.skip('Run Prober (second time)', async t => {
// @ts-expect-error
await runProber(t.context.bundleIds['prober-contract']);

const data = await agd.query('vstorage', 'data', 'published.prober-asid9a');
const value = JSON.parse(data.value);
t.is(value.values[0], 'true');
});
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
import test from 'ava';
import { getIncarnation } from './tools/vat-status.js';

test.skip(`verify Zoe vat incarnation`, async t => {
const incarantion = await getIncarnation('zoe');
t.is(incarantion, 1);
});
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
import test from 'ava';

import { waitForBlock } from '../commonUpgradeHelpers.js';
import { agd } from '../cliHelper.js';
import { getIncarnation } from './tools/vat-status.js';

test.before(async () => {
console.log('Wait for upgrade to settle');

await waitForBlock(5);
});

test(`Ensure Zoe Vat is at 0`, async t => {
const incarnation = await getIncarnation('zoe');
t.is(incarnation, 0);
});

test('Ensure MaxBytes param was updated', async t => {
const { value: rawParams } = await agd.query(
'params',
'subspace',
'baseapp',
'BlockParams',
);
const blockParams = JSON.parse(rawParams);
t.is(blockParams.max_bytes, '5242880');
});

0 comments on commit 6426775

Please sign in to comment.