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

chore(a3p-integration): Initialize dev-upgrade-15 #9242

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

gibson042
Copy link
Member

Description

Bumps the cosmos upgrade handler and a3p-integration starting point.

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

To be included in the full release.

Testing Considerations

a3p-integration

Upgrade Considerations

I'm pushing commits discretely to see how each interacts with CI.

@gibson042 gibson042 added the force:integration Force integration tests to run on PR label Apr 16, 2024
Copy link

cloudflare-workers-and-pages bot commented Apr 16, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: f447c44
Status:🚫  Build failed.

View logs

@gibson042 gibson042 force-pushed the gibson-init-upgrade-15 branch 4 times, most recently from d4a7313 to 7a7254c Compare April 17, 2024 02:55
@gibson042 gibson042 marked this pull request as ready for review April 17, 2024 14:31
@gibson042 gibson042 requested a review from mhofman April 17, 2024 14:31
@gibson042 gibson042 force-pushed the gibson-init-upgrade-15 branch 3 times, most recently from 8badc2c to 24d6ba5 Compare April 18, 2024 15:04
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

hm... I'd like to think / talk about where the tests go


import { CHAINID, GOV1ADDR, GOV2ADDR, agd } from '@agoric/synthetic-chain';

test(`ante handler sends fee only to vbank/reserve`, async t => {
Copy link
Member

Choose a reason for hiding this comment

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

we lose this test? that seems unfortunate

Copy link
Member

Choose a reason for hiding this comment

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

it seems a shame to go backwards w.r.t.

Copy link
Member

Choose a reason for hiding this comment

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

so it looks like last time (#8755) we were content to have the tests in agoric-3-proposals: https://github.com/Agoric/agoric-3-proposals/blob/main/proposals/71%3Aupgrade-14/ante-fees.test.js

But that only tests that the ante handler works in -14.
This feature is still relevant in 15, so it would be nice to keep it.

Copy link
Member

Choose a reason for hiding this comment

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

After an upgrade the tests move to agoric-3-proposal repo. In particular https://github.com/Agoric/agoric-3-proposals/blob/main/proposals/71%3Aupgrade-14/ante-fees.test.js

Acceptance tests are somewhat orthogonal

return obj.values[0];
};

test(`core eval works`, async t => {
Copy link
Member

Choose a reason for hiding this comment

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

we lose this test too?


agd query vstorage data published.wallet.$GOV1ADDR.current -o json >& gov1.out
name=`jq '.value | fromjson | .values[2] | fromjson | .body[1:] | fromjson | .purses[1].balance.value.payload[0][0].name ' gov1.out`
test_val $name \"ephemeral_Ace\" "found KREAd character"
Copy link
Member

Choose a reason for hiding this comment

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

why is it OK to lose this test?

await writeFile(`${fileName}.js`, script);
};

test('smartWallet repairs', async t => {
Copy link
Member

Choose a reason for hiding this comment

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

hm. losing another test

@@ -4,5 +4,3 @@
# The effects of this step are not persisted in further proposal layers.

yarn ava

./create-kread-item-test.sh
Copy link
Member

Choose a reason for hiding this comment

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

as noted earlier, it's a shame to regress on #8961 like this

"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-14",
"releaseNotes": false,
Copy link
Member

Choose a reason for hiding this comment

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

so we're not ready to validate upgrade info. got it.

Comment on lines -834 to +835
"agoric-upgrade-14": true,
"agorictest-upgrade-14": true,
"agorictest-upgrade-14-2": true,
"agoric-upgrade-15": true,
"agorictest-upgrade-15": true,
Copy link
Member

Choose a reason for hiding this comment

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

this looks like the gist of this PR

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

after discussion with @gibson042 @Chris-Hibbert and co, I'm content to leave #8961 for another day

Copy link
Contributor

@JimLarson JimLarson left a comment

Choose a reason for hiding this comment

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

Reviewing only for the upgrade handler.

// Next revive KREAd characters
vm.CoreProposalStepForModules("@agoric/vats/scripts/revive-kread.js"),
}
CoreProposalSteps = []vm.CoreProposalStep{}
}

Copy link
Contributor

@JimLarson JimLarson Apr 18, 2024

Choose a reason for hiding this comment

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

Commenting on lines 877-881 in the new version (silly github won't allow the comment to be added there). This seems like a leftover from upgrade-14 and should be removed, but you'll need to check with whoever added it. In general, we should probably maintain a core function of what should be in every upgrade handler, then the upgrade-N handler calls that and has its own functionality.

		m := swingsetkeeper.NewMigrator(app.SwingSetKeeper)
		err = m.MigrateParams(ctx)
		if err != nil {
			return mvm, err
		}

I'm also not a fan of the "is first time" logic as it gets us into the dangerous game of not testing what will actually happen on mainnet, but I'll discuss that outside of this PR.

Copy link
Member Author

@gibson042 gibson042 Apr 18, 2024

Choose a reason for hiding this comment

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

Commenting on lines 877-881 in the new version (silly github won't allow the comment to be added there). This seems like a leftover from upgrade-14 and should be removed, but you'll need to check with whoever added it.

		m := swingsetkeeper.NewMigrator(app.SwingSetKeeper)
		err = m.MigrateParams(ctx)
		if err != nil {
			return mvm, err
		}

That block was introduced in upgrade-13 and preserved in upgrade-14, and would be relevant for any future parameter changes. I'm inclined to keep it.

In general, we should probably maintain a core function of what should be in every upgrade handler, then the upgrade-N handler calls that and has its own functionality.

💯

I'm also not a fan of the "is first time" logic as it gets us into the dangerous game of not testing what will actually happen on mainnet, but I'll discuss that outside of this PR.

Agreed, but it was necessary for upgrade-14-rc1 and I want to keep this block in case it comes up again.

Copy link
Member

Choose a reason for hiding this comment

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

I'm also not a fan of the "is first time" logic as it gets us into the dangerous game of not testing what will actually happen on mainnet, but I'll discuss that outside of this PR.

Agreed, but it was necessary for upgrade-14-rc1 and I want to keep this block in case it comes up again.

There is an issue to remove the need for this hack: #9101

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm satisfied that the parameter migration is intentional - though other modules don't do this, so it would be good if x/swingset didn't need special treatment. I'll file an issue for that but approve this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Filed #9255 to eventually remove the need for this.

Copy link
Member

@mhofman mhofman left a comment

Choose a reason for hiding this comment

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

Couple nits, but the gist of it looks good!

Copy link
Member

Choose a reason for hiding this comment

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

Consider porting the initial.test.js from #9204

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea; done.

// Next revive KREAd characters
vm.CoreProposalStepForModules("@agoric/vats/scripts/revive-kread.js"),
}
CoreProposalSteps = []vm.CoreProposalStep{}
Copy link
Member

Choose a reason for hiding this comment

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

Consider adding an // Empty for now comment inside the struct to reduce future cherry-pick conflict resolution

@gibson042 gibson042 force-pushed the gibson-init-upgrade-15 branch 2 times, most recently from 7511e7f to 5b39a30 Compare April 18, 2024 20:30
initial.test.js copied from #9204, minus vats that are missing in the
release-mainnet1B image.
@gibson042 gibson042 merged commit 92ce02b into dev-upgrade-15 Apr 18, 2024
63 of 65 checks passed
@gibson042 gibson042 deleted the gibson-init-upgrade-15 branch April 18, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants