Skip to content

Conversation

@danielbate
Copy link
Contributor

@danielbate danielbate commented Jul 24, 2024

Release notes

In this release, we:

  • Upgraded fuel-core to v0.32.1
  • Implemented deploying large contracts using blob transactions

Summary

  • Introduced a BlobTransactionRequest to support the submission of blob transactions, a type of stateless tx whose purpose is just to facilitate arbitrary data in the VM.
  • Added the ContractFactory.deployAsBlobTx() function to deploy contracts via a loader script whose bytecode is greater than the accepted max contract size for a chain. A new attribute has been added to the DeployContractOptions, chunkSizeOverride for managing fluctuating transaction sizes when calculating the max chunk size for a blob tx.
  • The ContractFactory.deploy() can now deploy contracts of any size, it chooses the most appropriate deployment method dependent on the contract size.
  • Introduced a ContractFactory.deployAsCreateTx() for deployments where a user wants to enforce a single create tx, which will now validate contract size against a consensus parameter rather than the constant in feat!: deploy contract validation #2796.
  • Introduced a loader script which takes blob IDs and coverts them into a deployable loader contract, based on instructions from the ASM package.

Breaking Changes

MAX_CONTRACT_SIZE is no longer exported, it should now be fetched from the chain.

// before
import { MAX_CONTRACT_SIZE } from 'fuels';
// after
import { Provider, FUEL_NETWORK_URL } from 'fuels'; 

const provider = await Provider.create(FUEL_NETWORK_URL);
const { consensusParameters } = provider.getChain();
const maxContractSize = consensusParameters.contractParameters.contractMaxSize.toNumber();

Checklist

  • I addedtests to prove my changes
  • I updated — all the necessary docs
  • I reviewed — the entire PR myself, using the GitHub UI
  • I described — all breaking changes and the Migration Guide

@danielbate danielbate added feat Issue is a feature p0 labels Jul 24, 2024
@danielbate danielbate self-assigned this Jul 24, 2024
@danielbate danielbate requested review from maschad and nedsalk August 13, 2024 20:23
@danielbate danielbate marked this pull request as ready for review August 13, 2024 20:23
maschad
maschad previously approved these changes Aug 13, 2024
Copy link
Contributor

@maschad maschad left a comment

Choose a reason for hiding this comment

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

Great job @Torres-ssf and @danielbate

@github-actions
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
79.33%(-0.43%) 71.53%(-0.63%) 77.55%(-0.26%) 79.48%(-0.42%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/account.ts 84%
(-0.35%)
69.23%
(-0.61%)
85.29%
(+0%)
83.66%
(-0.34%)
🔴 packages/account/src/providers/provider.ts 68.53%
(+0%)
62.16%
(-0.13%)
73.49%
(+0%)
68.48%
(+0%)
🔴 ✨ packages/account/src/providers/transaction-request/blob-transaction-request.ts 50%
(+50%)
75%
(+75%)
40%
(+40%)
50%
(+50%)
🔴 packages/account/src/providers/transaction-request/create-transaction-request.ts 70.58%
(+11.76%)
64.28%
(+7.14%)
50%
(+12.5%)
70.58%
(+11.76%)
🔴 packages/account/src/providers/transaction-request/transaction-request.ts 88.48%
(-0.57%)
78.26%
(-1.45%)
84%
(-1.71%)
88.73%
(-0.55%)
packages/account/src/providers/transaction-request/utils.ts 100%
(+12.5%)
100%
(+14.29%)
100%
(+0%)
100%
(+12.5%)
🔴 packages/account/src/providers/transaction-summary/operations.ts 95.53%
(+0.08%)
74.13%
(+0.45%)
93.61%
(+0.14%)
94.16%
(+0.1%)
🔴 packages/account/src/providers/utils/gas.ts 94.33%
(-5.67%)
92%
(+0%)
92.3%
(-7.7%)
94.44%
(-5.56%)
🔴 packages/contract/src/contract-factory.ts 35.43%
(-22.9%)
27.58%
(-18.84%)
42.1%
(-12.44%)
35.15%
(-23.18%)
🔴 packages/contract/src/util.ts 93.33%
(-0.42%)
0%
(+0%)
66.66%
(+0%)
88.23%
(-0.65%)
✨ packages/contract/src/loader/loader-script.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
✨ packages/contract/src/loader/utils.ts 100%
(+100%)
100%
(+100%)
100%
(+100%)
100%
(+100%)
🔴 packages/transactions/src/coders/transaction.ts 99.25%
(+0.13%)
87.5%
(+1.79%)
100%
(+0%)
99.25%
(+0.13%)

@danielbate danielbate merged commit 03ac550 into master Aug 14, 2024
@danielbate danielbate deleted the db/feat/blob-contract-deploys branch August 14, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat Issue is a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to [email protected] Support new Blob TX type and deployment in chunks

8 participants