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

8605 a3p integration #8635

Merged
merged 7 commits into from
Jan 11, 2024
Merged

8605 a3p integration #8635

merged 7 commits into from
Jan 11, 2024

Conversation

turadg
Copy link
Member

@turadg turadg commented Dec 7, 2023

closes: #8605

Description

My goal is to have one CLI for these different use cases,

  • testing an upgrade handler in agoric-sdk
  • testing a proposal in a dapp repo
  • testing forthcoming proposals in agoric-3-proposals
  • rebuilding synthetic history as needed

This relies on the new,

Security Considerations

n/a

Scaling Considerations

n/a

Documentation Considerations

Once the UI settles, we should document this in a guide.

Testing Considerations

CI and also ran locally on M1.

Upgrade Considerations

n/a

@turadg turadg force-pushed the 8605-local-a3p branch 6 times, most recently from 4f043e3 to a9adced Compare December 13, 2023 00:02
@turadg turadg requested review from mhofman and dckc December 13, 2023 00:08
@turadg turadg marked this pull request as ready for review December 13, 2023 00:08
@turadg turadg force-pushed the 8605-local-a3p branch 3 times, most recently from 55952c4 to 57d0a65 Compare December 13, 2023 19:20
@turadg turadg requested a review from michaelfig December 13, 2023 19:32
Comment on lines +3 to +5
# UNTIl this is upstream https://github.com/Agoric/agoric-3-proposals/issues/40
# Set to zero so tests don't have to pay gas (we're not testing that)
sed --in-place=.bak s/'minimum-gas-prices = ""'/'minimum-gas-prices = "0ubld,0uist"'/ ~/.agoric/config/app.toml
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# UNTIl this is upstream https://github.com/Agoric/agoric-3-proposals/issues/40
# Set to zero so tests don't have to pay gas (we're not testing that)
sed --in-place=.bak s/'minimum-gas-prices = ""'/'minimum-gas-prices = "0ubld,0uist"'/ ~/.agoric/config/app.toml
# UNTIL this is upstream https://github.com/Agoric/agoric-3-proposals/issues/40
# Set to zero so tests don't have to pay gas (we're not testing that)
sed -i .bak -e 's/minimum-gas-prices = ""/minimum-gas-prices = "0ubld,0uist"/' ~/.agoric/config/app.toml

-e says the next arg is an expression. Single quotes can capture the entire substitution expression, which can then include spaces and doublequotes. --in-place=.bak didn't work on my version of sed. does -i work for you?

Copy link
Member Author

Choose a reason for hiding this comment

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

-e says the next arg is an expression. Single quotes can capture the entire substitution expression, which can then include spaces and doublequotes.

Sound like you think that would read better. I'll make those changes.

--in-place=.bak didn't work on my version of sed. does -i work for you?

Your version like on your Mac? IIRC it didn't work in Ubuntu, where this line runs.

Copy link
Contributor

@Chris-Hibbert Chris-Hibbert Dec 15, 2023

Choose a reason for hiding this comment

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

Your version like on your Mac?

Yeah. nothing special, just what's here.

a3p-integration/proposals/b:wf2/README.md Outdated Show resolved Hide resolved
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.

I just did a quick pass, far from being thorough. At this point I think I'm misaligned on the approach taken here. Let's discuss directly.

While I love the idea of a framework to run proposal layers on top of a3p, I don't understand the direction taken. I see why some shared tool is needed to ease the generation and execution of Docker image layers, but I don't understand why this tool should live in agoric-sdk. It is conceptually closer to a3p than agoric-sdk, and moving this logic back here seems like a regression.

I would recommend moving this tool to the a3p repo. In the future we could rename that repo if we want to detach it a little more from the agoric-3 chain (it could be a monorepo with the core tool, and different chain's images being built using the tooling).

I definitely want to find a solution to avoid the duplication of support libraries between the core tool/repo and consumer projects like agoric-sdk and dapps. My thinking is that the support library should be bundled in the base image, and proposals would just have it as a sort of "peer" dependency. I'm not sure of the specific hoops we'll have to jump through to make that work however.

packages/synthetic-chain/README.md Outdated Show resolved Hide resolved
packages/synthetic-chain/src/cli/dockerfileGen.ts Outdated Show resolved Hide resolved
a3p-integration/.gitignore Outdated Show resolved Hide resolved
@turadg turadg marked this pull request as draft December 15, 2023 17:09
@turadg turadg changed the title 8605 local a3p 8605 a3p integration Jan 8, 2024
@turadg turadg marked this pull request as ready for review January 8, 2024 16:28
@turadg turadg removed request for dckc and michaelfig January 8, 2024 21:34
@turadg
Copy link
Member Author

turadg commented Jan 10, 2024

This deletes zoe-full-upgrade without replacing it. Is there a plan to duplicate it to the new a3p-integration context?

I thought it was dead code. The test is marked in master as failing: https://github.com/Agoric/agoric-sdk/blob/master/packages/deployment/upgrade-test/upgrade-test-scripts/unreleased-upgrade/post.test.js#L4

I could copy the files over but since it won't pass that seems like noise to me. I propose the best course of action is that when we want it to be passing, we pull up the code from master's history. E.g. https://github.com/Agoric/agoric-sdk/tree/82d35483fc88a1ec5c873ead92c215bba1372731/packages/deployment/upgrade-test/upgrade-test-scripts/unreleased-upgrade

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Jan 10, 2024
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.

Nice to see the docker integration tests cleaned up. Mostly some nits.

I'm not sure the docker test will pass however, we'll see.

"private": true,
"scripts": {
"build": "echo Use synthetic-chain to build proposal images",
"test": "echo Use synthetic-chain to test proposal images"
Copy link
Member

Choose a reason for hiding this comment

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

can't this run synthetic-chain test ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I just thought it better to train people on the tool rather than creating another level of abstraction.

Comment on lines 5 to 14
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');
});
Copy link
Member

Choose a reason for hiding this comment

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

Oh this probably should be removed since it should be upstream already (it's not testing this simulated upgrade anymore)

Copy link
Member

Choose a reason for hiding this comment

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

It feels weird to not be actually doing any test here, but I suppose we're not yet able to do any core proposal on master yet, and no chain software changes are happening either.

Could we at the very least maintain the tests checking the zoe and network vat incarnation number?

- name: docker run upgrade final stage
run: docker run --env "DEST=0" docker-upgrade-test:latest
run: make docker-build-sdk
working-directory: ./agoric-sdk/packages/deployment
Copy link
Member

Choose a reason for hiding this comment

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

AFAIK the repo is not checkout out in a agoric-sdk sub folder for these tests

@mergify mergify bot merged commit df3d0a7 into master Jan 11, 2024
66 checks passed
@mergify mergify bot deleted the 8605-local-a3p branch January 11, 2024 23:36
mhofman pushed a commit that referenced this pull request Jan 12, 2024
mhofman pushed a commit that referenced this pull request Jan 12, 2024
mhofman pushed a commit that referenced this pull request Jan 12, 2024
mhofman pushed a commit that referenced this pull request Jan 12, 2024
# UPGRADE
FROM ${BASE_IMAGE} as propose-unreleased-upgrade
# TODO: Replace with actual Zoe core proposal for vat upgrades (MCS, Kread, Zoe, restart-contracts, etc)
ARG UPGRADE_INFO='{"coreProposals":["@agoric/builders/scripts/vats/init-network.js"]}'
Copy link
Member

Choose a reason for hiding this comment

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

The new tests don't simulate a network core proposal anymore

mhofman pushed a commit that referenced this pull request Jan 15, 2024
mhofman pushed a commit that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tool to test proposal on top of agoric-3 chain
3 participants