Releases: FuelLabs/fuel-vm
v0.57.0
Version v0.57.0
Added
- #670: Add DA compression functionality to
Transaction
and any types within - #733: Add LibAFL based fuzzer and update
secp256k1
version to 0.29.1. - #825: Avoid leaking partially allocated memory when array deserialization fails
Changed
- #824: Use
self
instead of&self
during decompression. - #823: Returned the old behaviour of the json serialization for policies.
Breaking
- #826: Skip the panic reason from canonical serialization of the panic receipt.
- #821: Added
block_transaction_size_limit
toConsensusParameters
. It adds a newConensusParametersV2
as a variant of theConsensusParameters
. - #670: The
predicate
field offuel_tx::input::Coin
is now a wrapper structPredicateCode
.
Fixed
- #822: Return recipient as an owner for the message inputs.
What's Changed
- Rust 1.79.0 by @Dentosal in #806
- chore: Add initial CODEOWNERS file by @netrome in #817
- DA compression for fuel-tx types by @Dentosal in #670
- Add advanced fuzzer (#724) by @xgreenx in #733
- Deserialize arrays: avoid leaking partially allocated memory when failing by @acerone85 in #825
- Add
block_transaction_size_limit
toConsensusParameters
by @rafal-ch in #821 - Return recipient as an owner for the message inputs by @xgreenx in #822
- Skip the panic reason from canonical serialization by @xgreenx in #826
- Returned the old behaviour of the json serialization for policies by @xgreenx in #823
- Use
self
instead of&self
during decompression by @xgreenx in #824 - Release v0.57.0 by @xgreenx in #828
New Contributors
- @netrome made their first contribution in #817
- @acerone85 made their first contribution in #825
- @rafal-ch made their first contribution in #821
Full Changelog: v0.56.0...v0.57.0
v0.56.0
v0.55.0
Version v0.55.0
Added
- #781: Added
base_asset_id
to checked metadata.
Changed
- #784: Avoid storage lookups for side nodes in the SMT.
- #787: Fixed charge functions to profile cost before charging.
Breaking
- #783: Remove unnecessary look up for old values by adding new methods to the
StorageMutate
trait. The oldinsert
andremove
are nowreplace
andtake
. The newinsert
andremove
don't return a value. - #783: Renamed methods of
StorageWrite
trait fromwrite
,replace
,take
towrite_bytes
,replace_bytes
,take_bytes
. - #788: Fix truncating
sp
toMEM_SIZE
ingrow_stack
, and allow empty writes to zero-length ranges at$hp
.
Fixed
Breaking
- #789: Avoid conversion into
usize
type and useu32
oru64
instead. The change is breaking since could return other errors for 32-bit systems. - #786: Fixed the CCP opcode to charge for the length from the input arguments.
- #785: Require
ContractCreated
output in theCreate
transaction. TheTransactionBuilder<Create>
has aadd_contract_created
method to simplify the creation of theContractCreated
output for tests.
What's Changed
- Test ALU opcodes using only the external interface by @Dentosal in #754
- Store the base asset id in the metadata by @xgreenx in #781
- Use companies fork of the
publish-crates
action by @xgreenx in #782 - Refactor coin-based contract instruction tests by @Dentosal in #779
- Require
ContractCreated
output in theCreate
transaction by @xgreenx in #785 - Fixed the CCP opcode to charge for the length of the input by @xgreenx in #786
- Remove unnecessary look up for old values by @xgreenx in #783
- Fixed charge functions to profile cost before charging by @xgreenx in #787
- grow_stack and empty $hp range write fixes by @Dentosal in #788
- Optimized storage lookups for side nodes in the SMT by @xgreenx in #784
- Avoid conversion into
usize
type and useu32
oru64
instead by @xgreenx in #789 - Release v0.55.0 by @xgreenx in #790
Full Changelog: v0.54.1...v0.55.0
v0.54.1
v0.54.0
Version v0.54.0
Added
- #770: Cache contract inputs in the VM.
Changed
-
#768: Charge for LDC opcode before loading the contract into memory.
-
#771: Take into account spent gas during synchronous predicates estimation.
Breaking
- #769: Use
DependentCost
forCFE
andCFEI
opcodes. - #767: Fixed no zeroing malleable fields for
Create
transaction. - #765: Corrected the gas units for WDOP and WQOP.
Removed
- #772: Removed redundant
self.receipts.root()
call.
What's Changed
- use the correct gas units for wdop and wqop by @Voxelot in #765
- Fixed no zeroing malleable fields for
Create
transaction by @xgreenx in #767 - Removed redundant
self.receipts.root()
call by @xgreenx in #772 - Charge for LDC opcode before loading the contract into memory by @xgreenx in #768
- Use
DependentCost
forCFE
andCFEI
opcodes by @xgreenx in #769 - Cache contract inputs in the VM by @xgreenx in #770
- Take into account spent gas during synchronous predicates estimation by @xgreenx in #771
- Removed dead code from the codebase by @xgreenx in #774
- Release v0.54.0 by @xgreenx in #775
Full Changelog: v0.53.0...v0.54.0
v0.53.0
Version v0.53.0
Added
- #751: Improve test coverage.
Changed
- #753: Fix an ownership check bug in
CCP
instruction.
What's Changed
- Generate and publish code coverage reports in the CI by @Dentosal in #750
- Add misc tests by @Dentosal in #751
- Fix a bug in CCP instruction by @Dentosal in #753
- Prepare release for v0.53.0 by @Dentosal in #755
Full Changelog: v0.52.0...v0.53.0
v0.52.0
Version v0.52.0
Changed
Breaking
- #748: Make
VmMemoryPool::get_new
async. - #747: Use
DependentCost
foraloc
opcode. The cost of thealoc
opcode is now dependent on the size of the allocation.
What's Changed
- Use
DependentCost
foraloc
opcode by @xgreenx in #747 - Make
VmMemoryPool::get_new
async by @xgreenx in #748 - Release v0.52.0 by @xgreenx in #749
Full Changelog: v0.51.0...v0.52.0
v0.51.0
Version v0.51.0
Added
- #732: Adds
reset
method to VM memory.
Breaking
- #732: Makes the VM generic over the memory type, allowing reuse of relatively expensive-to-allocate VM memories through
VmMemoryPool
. Functions and traits which require VM initalization such asestimate_predicates
now take either the memory orVmMemoryPool
as an argument. TheInterpterter::eq
method now only compares accessible memory regions.Memory
was renamed intoMemoryInstance
andMemory
is a trait now.
Changed
Breaking
- #743: Zeroes
$flag
onCALL
, so that contracts can assume clean$flag
state. - #737: Panic on instructions with non-zero reserved part.
What's Changed
- Memory pool/reuse by @Dentosal in #732
- chore: Remove erroneous comment about placeholder merges by @bvrooman in #741
- Panic on instructions with non-zero reserved part by @Dentosal in #737
- Zero $flag on call by @Dentosal in #743
- Release v0.51.0 by @xgreenx in #744
Full Changelog: v0.50.0...v0.51.0
v0.50.0
Version v0.50.0
Changed
- #725: Adds more clippy lints to catch possible integer overflow and casting bugs on compile time.
- #729: Adds more clippy lints to
fuel-merkle
to catch possible integer overflow and casting bugs on compile time. It also does some internal refactoring.
Added
Breaking
- #725:
UtxoId::from_str
now rejects inputs with multiple0x
prefixes. Many::from_str
implementations also reject extra data in the end of the input, instead of silently ignoring it.UtxoId::from_str
allows a single:
between the fields. UnusedGasUnit
struct removed. - #726: Removed code related to Binary Merkle Sum Trees (BMSTs). The BMST is deprecated and not used in production environments.
- #729: Removed default implementation of
Node::key_size_bits
, implementors must now define it themselves. Also some helper traits have been merged together, or their types changed.
Fixed
Breaking
- #736: LDC instruction now works in internal contexts as well. Call frames use code size padded to word alignment.
What's Changed
- Remove Sum Tree codebase by @bvrooman in #726
- Deny clippy::arithmetic_side_effects by @Dentosal in #725
- Add a single stepping example by @Dentosal in #728
- Delete duplicate rustfmt.toml by @Dentosal in #731
- Deny clippy::arithmetic_side_effects for fuel-merkle by @Dentosal in #729
- Fix ldc opcode in internal contexts by @Dentosal in #736
- Release v0.50.0 by @xgreenx in #739
Full Changelog: v0.49.0...v0.50.0
v0.49.0
Version v0.49.0
Added
- #721: Added additional logic to the BMT proof verification algorithm to check the length of the provided proof set against the index provided in the proof.
Breaking
-
#719: Fix overflow in
LDC
instruction when contract size with padding would overflow. -
#715: The
Interpreter
supports the processing of theUpload
transaction. The change affectsInterpreterStorage
, addingStorageMutate<UploadedBytes>
constrain. -
#714: The change adds a new
Upload
transaction that allows uploading huge byte code on chain subsection by subsection. This transaction is chargeable and is twice as expensive as theCreate
transaction. Anyone can submit this transaction. -
#712: The
Interpreter
supports the processing of theUpgrade
transaction. The change affectsInterpreterStorage
, adding 5 new methods that must be implemented. -
#707: The change adds a new
Upgrade
transaction that allows upgrading either consensus parameters or state transition function used by the network to produce future blocks.
The purpose of the upgrade is defined by theUpgrade Purpose
type:pub enum UpgradePurpose { /// The upgrade is performed to change the consensus parameters. ConsensusParameters { /// The index of the witness in the [`Witnesses`] field that contains /// the serialized consensus parameters. witness_index: u16, /// The hash of the serialized consensus parameters. /// Since the serialized consensus parameters live inside witnesses(malleable /// data), any party can override them. The `checksum` is used to verify that the /// data was not modified. checksum: Bytes32, }, /// The upgrade is performed to change the state transition function. StateTransition { /// The Merkle root of the new bytecode of the state transition function. /// The bytecode must be present on the blockchain(should be known by the /// network) at the moment of inclusion of this transaction. root: Bytes32, }, }
The
Upgrade
transaction is chargeable, and the sender should pay for it. Transaction inputs should contain only base assets.Only the privileged address can upgrade the network. The privileged address can be either a real account or a predicate.
Since serialized consensus parameters are small(< 2kb), they can be part of the upgrade transaction and live inside of witness data. The bytecode of the blockchain state transition function is huge ~1.6MB(relative to consensus parameters), and it is impossible to fit it into one transaction. So when we perform the upgrade of the state transition function, it should already be available on the blockchain. The transaction to actually upload the bytecode(
Upload
transaction) will implemented in the FuelLabs/fuel-core#1754.
Changed
-
#707: Used the same pattern everywhere in the codebase:
Self::Script(tx) => tx.encode_static(buffer), Self::Create(tx) => tx.encode_static(buffer), Self::Mint(tx) => tx.encode_static(buffer), Self::Upgrade(tx) => tx.encode_static(buffer),
Instead of:
Transaction::Script(script) => script.encode_static(buffer), Transaction::Create(create) => create.encode_static(buffer), Transaction::Mint(mint) => mint.encode_static(buffer), Transaction::Upgrade(upgrade) => upgrade.encode_static(buffer),
Breaking
-
#714: Added
max_bytecode_subsections
field to theTxParameters
to limit the number of subsections that can be uploaded. -
#707: Side small breaking for tests changes from the
Upgrade
transaction:- Moved
fuel-tx-test-helpers
logic into thefuel_tx::test_helpers
module. - Added a new rule for
Create
transaction: all inputs should use base asset otherwise it returnsTransactionInputContainsNonBaseAssetId
error. - Renamed some errors because now they are used for several transactions(
Upgrade
uses some errors fromCreate
and some fromScript
transactions):TransactionScriptOutputContractCreated
->TransactionOutputContainsContractCreated
.TransactionCreateOutputContract
->TransactionOutputContainsContract
.TransactionCreateOutputVariable
->TransactionOutputContainsVariable
.TransactionCreateOutputChangeNotBaseAsset
->TransactionChangeChangeUsesNotBaseAsset
.TransactionCreateInputContract
->TransactionInputContainsContract
.TransactionCreateMessageData
->TransactionInputContainsMessageData
.
- The combination of
serde
andpostcard
is used to serialize and deserializeConsensusParameters
during the upgrade. This means the protocol and state transition function requires theserde
feature by default forConsensusParameters
andfuel-types
.
- Moved
-
#697: Changed the VM to internally use separate buffers for the stack and the heap to improve startup time. After this change, memory that was never part of the stack or the heap cannot be accessed, even for reading. Also, even if the whole memory is allocated, accesses spanning from the stack to the heap are not allowed. This PR also fixes a bug that required one-byte gap between the stack and the heap. Multiple errors have been changed to be more sensible ones, and sometimes the order of which error is returned has changed.
ALOC
opcode now zeroes the newly allocated memory.
What's Changed
- Store stack and heap separately by @Dentosal @xgreenx in #697
- Add PR template by @Dentosal in #713
- A new
Upgrade
transaction to perform network upgrades by @xgreenx in #707 - Process
Upgrade
transaction inside of theInterpreter
by @xgreenx in #712 - A new
Upload
transaction to upload the huge bytecode on the chain by @xgreenx in #720 - Process
Upload
transaction inside theInterpreter
by @xgreenx in #715 - test: BMT proof verify tests and additional verify logic by @bvrooman in #721
- Handle padded_len_* overflows gracefully by @Dentosal in #719
- Release v0.49.0 by @xgreenx in #723
Full Changelog: v0.48.0...v0.49.0