Releases: FuelLabs/fuel-vm
v0.43.2
v0.43.1
v0.43.0
Version v0.43.0
Changed
Breaking
- #640: Update VM initialization cost to dependent cost; this is required because the time it takes to initialize the VM depends on the size of the transaction.
What's Changed
- chore: Update
vm_initialization
to be dependent cost by @bvrooman in #640 - Release v0.42.2 by @bvrooman in #641
- Republishing
v0.42.2
release asv0.43.0
by @xgreenx in #642
Full Changelog: v0.42.1...v0.43.0
v0.42.3
Release v0.42.3
Reverted release v0.42.2
because of breaking changes. The release v0.42.3
is equivalent to v0.42.1
.
Full Changelog: v0.42.2...v0.42.3
v0.42.2
Version v0.42.2
Changed
Breaking
- #640: Update VM initialization cost to dependent cost; this is required because the time it takes to initialize the VM depends on the size of the transaction.
What's Changed
- chore: Update
vm_initialization
to be dependent cost by @bvrooman in #640 - Release v0.42.2 by @bvrooman in #641
Full Changelog: v0.42.1...v0.42.2
v0.42.1
Version 0.42.1
Changed
Breaking
- #637: Charge for the actual size of the contract in
ccp
opcode.
What's Changed
- v0.42.0 npm publishing fix by @xgreenx in #636
- Charge for the actual size of the contract in
ccp
opcode by @xgreenx in #637 - Release v0.42.1 by @xgreenx in #638
Full Changelog: v0.42.0...v0.42.1
v0.42.0
Version v0.42.0
Changed
Breaking
-
#629: Charge the user for VM initialization.
-
#628: Renamed
transaction::CheckError
totransaction::ValidityError
.
Created a newchecked_transaction::CheckError
that combinesValidityError
andPredicateVerificationFailed
errors into one. It allows the return of the
PredicateVerificationFailed
to the end user instead of losing the reason why predicate verification failed. -
#625: Use
ArithmeticError
only for arithmetic operations, and introduce new errors likeBalanceOverflow
for others. Whenever an error is internally caused by a type conversion tousize
, so that an overflowing value wouldn't map to a valid index anyway, return the missing item error instead. -
#623:
Added support for transaction policies. TheScript
andCreate
transactions received a new field,policies
. Policies allow the addition
of some limits to the transaction to protect the user or specify some details regarding execution.
This change makes theGasPrice
andMaturity
fields optional, allowing to save space in the future.
Also, this will enable us to support multidimensional prices later.
GasLimit
was renamed toScriptGasLimit
.Along with this change, we introduced two new policies:
WitnessLimit
- allows the limitation of the maximum size of witnesses in bytes for the contract. Because of the changes in the gas calculation model(the blockchain also charges the user for the witness data), the user should protect himself from the block producer or third parties blowing up witness data and draining the user's funds.MaxFee
- allows the upper bound for the maximum fee that users agree to pay for the transaction.
This change brings the following modification to the gas model:
- The
ScriptGasLimit
only limits script execution. Previously, theScriptGasLimit
also limited the predicate execution time, instead predicate gas is now directly included intomin_fee
. So, it is not possible to use theScriptGasLimit
for transaction cost limitations. A newMaxFee
policy is a way to do that. TheGasLimit
field was removed from theCreate
transaction because it only relates to the script execution (which theCreate
transaction doesn't have). - The blockchain charges the user for the size of witness data (before it was free). There is no separate price for the storage, so it uses gas to charge the user. This change affects
min_gas
andmin_fee
calculation. - A new policy called
WitnessLimit
also impacts themax_gas
andmax_fee
calculation in addition toScriptGasLimit
(in the case ofCreate
transaction onlyWitnessLimit
affects themax_gas
andmax_fee
). - The minimal gas also charges the user for transaction ID calculation.
The change has the following modification to the transaction layout:
- The
Create
transaction doesn't have theScriptGasLimit
field anymore. Because theCreate
transaction doesn't have any script to execute - The
Create
andScript
transactions don't have explicitmaturity
andgas_price
fields. Instead, these fields can be set via a newpolicies
field. - The
Create
andScript
transactions have a newpolicies
field with a unique canonical serialization and deserialization for optimal space consumption.
Other breaking changes caused by the change:
- Each transaction requires setting the
GasPrice
policy. - Previously,
ScriptGasLimit
should be less than theMAX_GAS_PER_TX
constant. After removing this field from theCreate
transaction, it is impossible to require it. Instead, it requires thatmax_gas <= MAX_GAS_PER_TX
for any transaction. Consequently, anyScript
transaction that usesMAX_GAS_PER_TX
as aScriptGasLimit
will always fail because of a new rule. Setting the estimated gas usage instead solves the problem. - If the
max_fee > policies.max_fee
, then transaction will be rejected. - If the
witnessses_size > policies.witness_limit
, then transaction will be rejected. - GTF opcode changed its hardcoded constants for fields. It should be updated according to the values from the specification on the Sway side.
-
#633: Limit receipt count to
u16::MAX
. -
#634: Charge for storage per new byte written. Write opcodes now return the number of new storage slots created, instead of just a boolean on whether the value existed before.
Fixed
- #627: Added removal of obsolete SMT nodes along the path during
update
anddelete
operations.
What's Changed
- Support transaction policies by @xgreenx in #623
- Remove SMT nodes along the path during
update
by @xgreenx in #627 - Limit ReceiptsCtx to u16::MAX receipts by @Dentosal in #633
- Charge the user for VM initialization by @xgreenx in #629
- Return
PredicateVerificationFailed
error to the user by @xgreenx in #628 - Split ArithmeticError into more granular errors by @Dentosal in #625
- Charge for new storage bytes by @Dentosal in #634
- Release v0.42.0 by @xgreenx in #635
Full Changelog: v0.41.0...v0.42.0
v0.41.0
Version v0.41.0
Breaking
- #622: Divide
DependentCost
into "light" and "heavy" operations: Light operations consume0 < x < 1
gas per unit, while heavy operations consumex
gas per unit. This distinction provides more precision when calculating dependent costs.
What's Changed
- Upgrade to Rust 1.73 and fix related todo by @Dentosal in #626
- feat: Light and Heavy operation gas costs by @bvrooman in #622
- Simplify asm in some tests by @Dentosal in #631
- Release
v0.41.0
by @bvrooman in #632
Full Changelog: v0.40.0...v0.41.0
v0.40.0
Version 0.40.0
Added
- #607: Added
ECAL
instruction support.
Changed
- #612: Reduced the memory consumption in all places where we calculate BMT root.
- #615: Made
ReceiptsCtx
of the VM modifiable withtest-helpers
feature.
Breaking
- #618: Transaction fees for
Create
now include the cost of metadata calculations, including: contract root calculation, state root calculation, and contract id calculation. - #613: Transaction fees now include the cost of signature verification for each input. For signed inputs, the cost of an EC recovery is charged. For predicate inputs, the cost of a BMT root of bytecode is charged.
- #607: The
Interpreter
expects the third generic argument during type definition that specifies the implementer of theEcalHandler
trait forecal
opcode. - #609: Checked transactions (
Create
,Script
, andMint
) now enforce a maximum size. The maximum size is specified byMAX_TRANSACTION_SIZE
in the transaction parameters, under consensus parameters. Checking a transaction above this size raisesCheckError::TransactionSizeLimitExceeded
. - #617: Makes memory outside
$is..$ssp
range not executable. SeparatesErrorFlag
intoInvalidFlags
,MemoryNotExecutable
andInvalidInstruction
. Fixes related tests. - #619: Avoid possible truncation of higher bits. It may invalidate the code that truncated higher bits causing different behavior on 32-bit vs. 64-bit systems.
What's Changed
- feat: Enforce maximum tx size by @bvrooman in #609
- chore: Use MerkleRootCalculator when only BMT root is needed by @bvrooman in #612
- Add ECAL instruction by @Dentosal in #607
- Memory write xor execute by @Dentosal in #617
- feat: Charge for input signature verification (address recovery and predicate roots) by @bvrooman in #613
- Avoid possible truncation of higher bits by @xgreenx in #619
- Make ReceiptsCtx public, allow mut access in tests by @Dentosal in #615
- feat: Charge for
Create
metadata by @bvrooman in #618 - Release
v0.40.0
by @xgreenx in #621
Full Changelog: v0.39.0...v0.40.0
v0.39.0
Version 0.39.0
Added
- #603: Added
MerkleRootCalculator
for efficient in-memory Merkle root calculation. - #603: Added Serialization and Deserialization support to
MerkleRootCalculator
.
Changed
- #595: Removed
wee_alloc
dependency fromfuel-asm
. It now uses the builtin allocator on web targets as well.
Breaking
- #598: Update cost model for
ldc
opcode to take into account contract size. - #604: Removed
ChainId
fromPredicateId
calculation. It changes the generated address of the predicates and may break tests or logic that uses hard-coded predicate IDs. - #594: Add new predicate input validation tests. Also improves error propagation so that predicate error message better reflects the reason for invalidity.
- #596: Remove
core::ops::{Add, Sub}
impls fromBlockHeight
. Usesucc
andpred
to access adjacent blocks, or perform arithmetic directly on the wrapped integer instead. - #593: Reworked
Mint
transaction to work withInput::Contract
andOutput::Contract
instead ofOutput::Coin
. It allows account-based fee collection for the block producer.
What's Changed
- Remove BlockHeight arithmetic by @Dentosal in #596
- Remove wee_alloc dependency, use builtin allocator instead by @Dentosal in #595
- Predicate input validation tests by @Dentosal in #594
- Remove
ChainId
fromPredicateId
calculation by @xgreenx in #604 - Rework
Mint
transaction to work with the contract by @xgreenx in #593 - Improved Memory Efficiency in Merkle Root Calculation by @Salka1988 in #603
- Include size lookup of contract for computing LDC opcode cost by @MitchTurner in #598
- Add Serialization and Deserialization support to MerkleRootCalculator by @Salka1988 in #606
- Release
0.39.0
by @xgreenx in #608
Full Changelog: v0.38.0...v0.39.0