-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat: Implement ldc based automatic contract chunking #6250
Conversation
based on #6069 |
Benchmark for 5e70df3Click to view benchmark
|
4af06f8
to
45a0358
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work 👍
Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work Kaya looks great. Just wondering if we can add a small section to the forc client documentation explaining that this process is going on automatically behind the scenes for large contracts. This then can help explain why they might see different outputs from forc during deployment.
## Description Test should all pass once FuelLabs/fuels-rs#1483 is released ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers.
## Description To be merged after #6250 ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers. --------- Co-authored-by: Brandon Kite <brandonkite92@gmail.com> Co-authored-by: IGI-111 <igi-111@protonmail.com>
Description
This PR adds chunk deployment based on LDC. Contracts larger than 100 kb size, is split into chunks and chunks are deployed as
blobs
. Out of these blobs we create a loader contract, which loads all the blobs usingLDC
opcode.One important thing is that this feature works nicely with the proxy feature introduced in #6069, so a large contract, with proxy can be deployed directly. Large contract will be split into chunks, chunks will get deployed, loader will get get generated and deployed, after all these a proxy contract is deployed and pointed to the loader contract deployed.
Simple chunked deploy, chunked deployment re routing the call, chunked deployment behind a proxy re routes the call is tested.