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

Error: evalBundles fails to install contract bundle after genesis-test acceptance test #10620

Open
Jorge-Lopes opened this issue Dec 4, 2024 · 0 comments · May be fixed by #10622
Open

Error: evalBundles fails to install contract bundle after genesis-test acceptance test #10620

Jorge-Lopes opened this issue Dec 4, 2024 · 0 comments · May be fixed by #10622
Labels
bug Something isn't working

Comments

@Jorge-Lopes
Copy link
Collaborator

Jorge-Lopes commented Dec 4, 2024

Describe the bug

A clear and concise description of what the bug is.

In the context of the acceptance tests at a3p-integration, when calling the evalBundles method, imported from the @agoric/synthetic-chain package, after the execution of the ./genesis-test.sh acceptance test, it will fail to install the contract bundle.

When ./genesis-test.sh is excluded from the acceptance test.sh script, the test will behave as expected.

Note: this issue is a work in progress. I will invest more time to refine the diagnostic and offer a clearer description of the error being triggered.

To Reproduce

A draft PR with a dummy test was built to demonstrate the behaviour described above.
Steps to reproduce the behavior:

  1. Go to test(a3p): test evalBundle after acceptance genesis-test #10622
  2. Go to the CI action test-docker-build
  3. See error

Expected behavior

A clear and concise description of what you expected to happen.

Platform Environment

OS: macOS Sequoia v15.0.1
Node.js: v20.9.0
Agoric-SDK: agoric-upgrade-16av-1307-gd6a7ffb629

Additional context

The error message bundle ${id} not loaded point to core-eval.ts, although, I think that the failure happens during the step ensure bundles installed.

The reason why I said this is because, in the scenario where we call evalBundles for the same core-eval twice, one before and one after the execution of ./genesis-test.sh, both tests will pass since the bundle ID will be found on the loadedBundleIds and the logs display bundle already installed ...

Note that the problem does not seem to be related with insufficient IST since it is visible at the logs the message:

{ totalSize: 1133162, cost: 2266.324 }
balance sufficient { istBalance: 11439.980011, cost: 2266.324 }

The contract core-eval artifacts are being generated via the a3p-integration script build-submission.sh which used the agoric run command.

@Jorge-Lopes Jorge-Lopes added the bug Something isn't working label Dec 4, 2024
mergify bot added a commit that referenced this issue Dec 12, 2024
#10617)

closes: #10410 

## Description


This pull request intends to ensure that the mintHolder contract continues to function as expected after a null upgrade. 

Key Changes:
- A new `core-eval` was built, which acordingly to the agoric chain variant, will select a list of vbankAsset and execute a null upgrade to the respective mintHolder contract of each suitable asset.
- A new acceptance test, `mintHolder.test.js`, has been added to the a3p-integration to verify the core-eval behaviour.

MintHolder Test Plan:
   - Provision a receiver wallet with the respective assets
   - Confirm the initial balance matches expectations
   - Perform a null upgrade for the mintHolder contracts
   - Execute a core-eval to:
         - Mint a payment for each selected asset
   	- Deposit the payment into the receiver's depositFacet
   - Verify that the balance has increased by the expected amount
   - Execute a PSM swap for selected assets with IST


### Security Considerations


The execution of `mintHolder.test.js` had to be done prior to the `./genesis-test.sh` acceptance test. Otherwise it would trigger the error `bundle ${id} not loaded` during the `evalBundle` call.
See this issue for more detail: #10620 

### Scaling Considerations


This PR does not introduce any change to the mintHolder source code, or how it is being consumed. For this reason that are no scaling considerations to be made.

### Documentation Considerations


### Testing Considerations


The implemented test design is expecting to have a core-eval for each mintHolder being updated.
If desired, this could be refactored to have a single core-eval executing a null upgrade to a predefined list of assets.
The second approach has the advantage of reducing the number of files being created, although it may hinder the testing flexibility.

Which approach is more desirable?

### Upgrade Considerations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant