-
Notifications
You must be signed in to change notification settings - Fork 212
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
Orchestration contract dependencies make them too large for Mainnet #9900
Comments
See also endojs/endo#2411 |
There might be a small win in reducing |
|
refs: #9900 ## Description This uses the new `--elide-comments` option in Endo bundle-source to… elide comments. Always. Measured with: ``` cd a3p-integration rm -f **/b1-*.json* yarn build:submissions du -csh **/b1-*.json gzip **/b1-*.json du -csh **/b1-*.json.gz ``` Before: 26M (6.7M gz) After: 19M (4.1M gz) ### Security Considerations No change in runtime. Does affect code auditability. Existing bundles are base64 encoded so readers will have to find the sources anyway. Either way we will need to invest in special tooling: endojs/endo#1656 ### Scaling Considerations reduces on-chain storage ### Documentation Considerations End users who base64 decode the on-chain bundles will no longer see comments… I don't expect anyone was doing this. ### Testing Considerations existing coverage ### Upgrade Considerations won't affect any existing deployments
multichain-testing now has the same limit as in Mainnet and it installs contracts like If we hit hit up against it again we can re-open this issue and work down the list of optimizations. |
What is the Problem Being Solved?
Bundles of contracts using Orchestration tend to be over 500KB, the limit for deploying to Mainnet. E.g. https://github.com/Agoric/dapp-orchestration-basics/pull/17/files#diff-1033217b1ee0740bea6f7c4bf49634318af4e0b4420a6048f55a686f3d5cfee5R56
@agoric/cosmic-proto
is meant to be used in vats, UIs and contracts. Contracts have strict size limits to fit onto Mainnet and some of the codegen files in@agoric/cosmic-proto
are huge.When importing a module, the caller should only need to import (and bundle) what will be used. But right now importing the package main or
helpers
module will pull inabci/types.js
which is over 100KB.Description of the Design
Reduce overall weight of deps
Dupes should be prevented. Egregious export graphs should be trimmed but we shouldn't go down a rabbit hole optimizing these.
#8621 is also a factor but easily mitigated by deduping node_modules (with Yarn resolutions)
Stop export of cosmos-interchain-service from package main
Stop import of
abci/types.js
inhelpers
(by movingtoRequestQueryJson
into another module)https://github.com/Agoric/dapp-orchestration-basics/tree/ta/mainnet-size has some experiments
Strip comments during bundling
Next thing to try:
Externalize deps (Import from env)
Next biggest lift:
Import between bundles
Maybe never…
Security Considerations
Scaling Considerations
Test Plan
Upgrade Considerations
The text was updated successfully, but these errors were encountered: