Open Jorge-Lopes opened 9 months ago
After starting the container built using the ghcr.io/agoric/agoric-3-proposals
image, we intent to test a proposal for updating the vaultFactory
contract.
When installing the contract bundle (generated by executing agoric run <vaultFactory-proposal-builder>
) the error Error: RPC error -32600 - Invalid Request: error reading request body: http: request body too large
is triggered. The complete logs are provided bellow.
I have made sure that the bundle I provided in the assets
directory is the one generated by the agoric run
command, as it can be verified by the vaultFactory core-eval
.
The same behaviour does not happens when I install the bundles on a local chain launched using the start-local-chain.sh
script of the agoric-cli
pkg, which I verified via the storage viewer.
This error message point me to the issue #28, but the proposed work around was not useful for me.
I am not sure if this issue can be related with the issue #17
A lead to a possible solution was discussed on office hours, that pointed to a possible source of this error could be the bundle be larger than 1MB. See https://github.com/Agoric/dapp-offer-up/issues/28.
To test this case I used the test-build-proposal.js for the created vaultFactory proposal-builder.
Based on the test result, we can assume that this is not the issue
yarn test test/liquidationVisibility/test-proposal.js
yarn run v1.22.19
$ ava test/liquidationVisibility/test-proposal.js
agoric: run: running /Users/jorgelopes/Documents/GitHub/Agoric/sow6/liquidation-visibility/agoric-sdk-liquidation-visibility/packages/builders/scripts/inter-protocol/liquidationVisibility/proposal-builder.js
✔ proposal builder generates compressed bundles less than 1MB (5.5s)
ℹ agoric run stdout: agoric: run: Deploy script will run with Node.js ESM
bundle-source --cache-js /Users/jorgelopes/Documents/GitHub/Agoric/sow6/liquidation-visibility/agoric-sdk-liquidation-visibility/packages/builders/scripts/inter-protocol/liquidationVisibility/bundles /Users/jorgelopes/Documents/GitHub/Agoric/sow6/liquidation-visibility/agoric-sdk-liquidation-visibility/packages/inter-protocol/src/vaultFactory/vaultFactory.js vaultFactory
creating vaultFactory-permit.json
creating vaultFactory.js
You can now run a governance submission command like:
agd tx gov submit-proposal swingset-core-eval vaultFactory-permit.json vaultFactory.js \
--title="Enable <something>" --description="Evaluate vaultFactory.js" --deposit=1000000ubld \
--gas=auto --gas-adjustment=1.2
Remember to install bundles before submitting the proposal:
agd tx swingset install-bundle @/Users/jorgelopes/.agoric/cache/b1-5302546fafc63a2ef36142fb50c2333eb5e6775f6eebb725d1e3ce83aad7b27b3341992d9d83488383bfd19784b241fccc29a8cb9eeb9ebf33059b3976ff9b22.json
agd tx swingset install-bundle @/Users/jorgelopes/.agoric/cache/b1-91a1a9da1dfa3bc6d3a8918cc6ff013869ebdf4b8df64ebd70e745289e32a382fc5850ce1b717b26b7707bdc861fb62aa2e840038d95f8082f8bb2656a01afce.json
Object <[Object: null prototype] {}> { initial: 0, total: 1 }
ℹ {
bundleId: 'b1-5302546fafc63a2ef36142fb50c2333eb5e6775f6eebb725d1e3ce83aad7b27b3341992d9d83488383bfd19784b241fccc29a8cb9eeb9ebf33059b3976ff9b22',
compressedSize: '0.50689697265625 MB',
}
ℹ {
bundleId: 'b1-91a1a9da1dfa3bc6d3a8918cc6ff013869ebdf4b8df64ebd70e745289e32a382fc5850ce1b717b26b7707bdc861fb62aa2e840038d95f8082f8bb2656a01afce',
compressedSize: '0.39804744720458984 MB',
}
─
1 test passed
As an experiment, I passed the --compress
flag (which should be set as true by default) to the tx swingset install-bundle
command. But the result was still the same.
agd --chain-id agoriclocal --keyring-backend test --from agoric1s8lmczw37rz7qendxa2pc88qrlmhn4gsda8vn4 tx swingset install-bundle @/usr/src/a3p/proposals/b:liquidation-visibility/assets/bundle-vaultFactory.json --compress --gas auto --broadcast-mode block --yes --output json
Error: RPC error -32600 - Invalid Request: error reading request body: http: request body too large
Usage:
agd tx swingset install-bundle <JSON>/@<FILE>/- [flags]
The following commit seems to fix the issue faa07731190e0bc1cfe55203d2195816870c83d2
Although there was some inconsistent behaviours while I was testing with different approaches. If I can replicate those results I will share it here as well.
Nonetheless, @alexanderem49 the update above will be enough for you to continue extending the integration test coverage
Current status:
vaultFactory
proposal, permit and bundle to the assets directory (9179306eca753a4e7bd5033afd70bad32334e3f5)test-liquidation-visibility.js
using as guide thetest-crabble-start.js
andadd-collateral.test
(ad0fae533d607c631e80949c750dcda4e6708c92)Note: in order to run the
eval.sh
script it is necessary to first start theagd
, ( @alexanderem49 that is the source of the time-out error you were facing ). For this purpose I end up have 2 open terminals and run the start_agd script in one and theeval
in the other. I think therun_eval
script would be able to run both processes but it was confusing to follow the log messages.Task: confirm with @anilhelvaci if this is the correct flow to setup the env and execute the test