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

test(cosmic-swingset): pay 10 BLD for account with 0.25 IST to start #6187

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

dckc
Copy link
Member

@dckc dckc commented Sep 13, 2022

refs: #6067

Description

Integration test, including golang cosmos-sdk layers, to follow #6157

  ✔ PSM bootstrap and provision (1m 39.3s)
    ℹ make scenario2-run-psm-halt
    ℹ Fund pool with USDC
    ℹ make ACCT_ADDR=agoric1megzytg65cyrgzs6fvzxgrcqvwwl7ugpt62346 SOLO_COINS=1234000000ibc/usdc1234 fund-acct
    ℹ Fund user account with some BLD
    ℹ make ACCT_ADDR=agoric1ctncw9sguzftds55tss72n5htdla8e3s2wqrwt SOLO_COINS=123000000ubld fund-acct
    ℹ Provision an account
    ℹ make ACCT_ADDR=agoric1ctncw9sguzftds55tss72n5htdla8e3s2wqrwt provision-acct
    ℹ verify 10BLD spent, 0.25 IST received

Security Considerations

?

Documentation Considerations

?

Testing Considerations

increases ava timeout to 25 min in packages/cosmic-swingset

  • TODO: wait until the 0.25 IST deposit should clear
  • figure out why it fails with EOF in ci

@dckc dckc force-pushed the dc-test-starter-ist branch 2 times, most recently from 7d2090e to 64b37d3 Compare September 13, 2022 04:12
@dckc dckc marked this pull request as ready for review September 13, 2022 04:15
Base automatically changed from 6067-starter-ist to master September 13, 2022 13:26
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Great to have this test automated!

packages/cosmic-swingset/package.json Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
@dckc
Copy link
Member Author

dckc commented Sep 13, 2022

Great to have this test automated!

yes... well, it would be... if it worked in ci like it does for me locally. But it doesn't, and the diagnostic doesn't give me much to go on:

Error: post failed: Post "http://localhost:26657": EOF
Usage:
  agd tx swingset provision-one [nickname] [address] [power-flags] [flags]

I'll need help in order to advance this.

@michaelfig
Copy link
Member

Hi @dckc, do you want to try resurrecting this one and updating it to master? Or has its time passed?

@dckc
Copy link
Member Author

dckc commented Jan 3, 2023

Let's see... yes, this is a documented feature, so it should have an automated test.

As I mentioned, I'll need help. Do you have any clues for me, @michaelfig ?

Here's hoping for time to look at it together.

@dckc dckc force-pushed the dc-test-starter-ist branch 4 times, most recently from 3c1f5e4 to f0bc95e Compare January 9, 2023 16:42
@dckc dckc requested a review from turadg January 9, 2023 16:43
@dckc
Copy link
Member Author

dckc commented Jan 9, 2023

after spending about 2.5 days on this last week without getting a reliable result, how about we keep the resulting test code, which I mostly like, but use test.skip to keep the new test out of ci? I'm pushing changes to that effect.

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

how about we keep the resulting test code, which I mostly like, but use test.skip to keep the new test out of ci? I'm pushing changes to that effect.

Works for me, but before merge I'd like to get clear on:

  1. Whether this is worth making work in CI eventually. If so, let's have an issue an reference it here.
  2. How this will be tested outside of CI. What sorts of changes should trigger someone to uncomment .skip and disable the other one so it's testing?

It seems like if the problem is the coordination between the two tests, we could solve that by separating them and having two chain starts. That's prohibitive for CI but maybe not for the slow tests for merging to master. Alternately we could have a script like "run this locally when you change something in the econ boot". Eventually we could have CI be smart enough to run that slow one but only when necessary.

packages/cosmic-swingset/test/test-make.js Outdated Show resolved Hide resolved
Comment on lines 209 to 210
// Sometimes I can get this test to work alone, but not
// if run with the test above.
Copy link
Member

Choose a reason for hiding this comment

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

Seems tackling someday. If you agree, this would be a good place to reference an issue for it

Copy link
Member Author

Choose a reason for hiding this comment

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

ok: #6766

@dckc
Copy link
Member Author

dckc commented Jan 9, 2023

It seems like if the problem is the coordination between the two tests, we could solve that by separating them and having two chain starts.

That prompted me to reconsider how this is factored. I factored out scenario2.js and moved test-provision-smartwallet.js to its own test file... still with test.skip. This suggests 2 chain starts, but we can move the test back once we figure out the quirks.

It makes the change to test-make.js a bit less invasive... you don't have to wade thru as much provisionpool stuff to read that test.

That's prohibitive for CI but maybe not for the slow tests for merging to master.

I'm not familiar with how the slow tests work, so I lean toward leaving that aside.

  1. How this will be tested outside of CI. What sorts of changes should trigger someone to uncomment .skip and disable the other one so it's testing?

Not sure... at least you and I know about it... I think of #6766 representing the work to make sure it's part of the development process.

@dckc dckc requested a review from turadg January 9, 2023 22:32
@dckc dckc marked this pull request as ready for review January 9, 2023 22:32
Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

Refactoring looks good. Thanks for the documentation and the new issue

packages/vats/decentral-psm-config.json Outdated Show resolved Hide resolved
@dckc dckc force-pushed the dc-test-starter-ist branch from 7082e7e to 5efdd96 Compare January 9, 2023 22:42
@dckc dckc added the automerge:rebase Automatically rebase updates, then merge label Jan 9, 2023
The new provision test is skipped because it's not reliable enough to
run in CI, but it's useful and we'd like to keep the scenario2
refactoring work.

 - Makefile
   - note deep stack debug options
   - parameterize $(BLOCKS_TO_RUN) in scenario2-run-chain-to-halt
   - announce end of run-to-halt Makefile (SQUASHME)
 - factor out scenario2 shared state
   - only use ambient authority in test.before()
 - don't try to fund the provision pool with
   more than the PSM IST minting limit
   - clarify large numerals: '1234000000uist' -> `${1234e6}uist`
 - give names to constants such as initialHeight = 17
 - document vbank/provision module address
@dckc dckc force-pushed the dc-test-starter-ist branch from 5efdd96 to e0e0c36 Compare January 9, 2023 23:09
@mergify mergify bot merged commit 1e64d5a into master Jan 10, 2023
@mergify mergify bot deleted the dc-test-starter-ist branch January 10, 2023 00:12
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.

3 participants