Releases: FuelLabs/fuel-vm
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
v0.48.0
Version v0.48.0
Added
- #705: Added
privileged_address
to theConsensusParameters
for permissioned operations(like upgrade of the network). - #648: Added support for generating proofs for Sparse Merkle Trees (SMTs) and proof verification. Proofs can be used to attest to the inclusion or exclusion of data from the set.
Changed
Breaking
- #709: Removed
bytecode_length
from theCreate
transaction. - #706: Unified
Create
andScript
logic viaChargeableTransaction
. The change is breaking because affects JSON serialization and deserialization. NowScript
andCreate
transactions havebody
fields that include unique transactions. - #703: Reshuffled fields
Script
andCreate
transactions to unify part used by all chargeable transactions. It breaks the serialization and deserialization and requires adoption on the SDK side. - #708: Hidden
Default
params under the "test-helper" feature to avoid accidental use in production code. It is a huge breaking change for any code that has used them before in production, and instead, it should be fetched from the network. In the case of tests simply use the "test-helper" feature in your[dev-dependencies]
section. - #702: Wrapped
FeeParameters
,PredicateParameters
,TxParameters
,ScriptParameters
andContractParameters
into an enum to support versioning. - #701: Wrapped
ConsensusParameters
andGasCosts
into an enum to support versioning. Movedblock_gas_limit
fromfuel_core_chain_config::ChainConfig
toConsensusPataremeters
. Reduced defaultMAX_SIZE
to be 110kb andMAX_CONTRACT_SIZE
to be 100kb. - #692: Add GTF getters for tx size and address.
- #698: Store input, output and witness limits to u16, while keeping the values limited to 255.
What's Changed
- Add GTF getters for tx bytes size and address by @Dentosal in #692
- feat: SMT Proofs (Inclusion and Exclusion) by @bvrooman in #648
- Increase size of inputs, outputs and witnesses to uint16 by @Dentosal in #698
- Versioning of
ConsensusParameters
andGasCosts
by @xgreenx in #701 - feat:
serde::Serialize
andserde::Deserialize
fordouble_key!
by @segfault-magnet in #704 - Added privileged address to the
ConsensusParameters
by @xgreenx in #705 - Add GM for base asset ID by @Dentosal in #700
- Versioning of sub parameters by @xgreenx in #702
- Hide
Default
params under the "test-helper" feature by @xgreenx in #708 - Reshuffled fields
Script
andCreate
transactions to unify part used by all chargeable transactions by @xgreenx in #703 - Unified
Create
andScript
logic viaChargeableTransaction
by @xgreenx in #706 - Removed
bytecode_length
from theCreate
transaction by @xgreenx in #709 - Missed functionality required to for upgrading
fuel-core
to nextfuel-vm
release by @xgreenx in #710 - Release v0.48.0 by @xgreenx in #711
New Contributors
- @segfault-magnet made their first contribution in #704
Full Changelog: v0.47.1...v0.48.0
v0.47.1
v0.47.0
Version v0.47.0
Added
- #686: Implement
serde
forInterpreterError
.
Changed
Breaking
- #685:
TheMaxFee
is a mandatory policy to set. TheMaxFee
policy is used to check that the transaction is valid.
Added a new stage for theChecked
transaction -Ready
. This type can be constructed with the
gas_price
before being transacted by theInterpreter
. - #671: Support dynamically sized values in the ContractsState table by using a vector data type (
Vec<u8>
). - #682: Include
Tip
policy in fee calculation - #683: Simplify
InterpreterStorage
by removing dependency onMerkleRootStorage
and removingmerkle_
prefix from method names. - #678: Zero malleable fields before execution. Remove some now-obsolete GTF getters. Don't update
tx.receiptsRoot
after pushing receipts, and do it after execution instead. - #672: Remove
GasPrice
policy - #672: Add
gas_price
field to transaction execution - #684: Remove
maturity
field fromInput
coin types. Also remove relatedGTF
getter. - #675: Add
GTF
access forasset_id
andto
fields forChange
outputs.
What's Changed
- Update fee calculation logic to accept price by @MitchTurner in #672
- chore: Simplify
InterpreterStorage
by @bvrooman in #683 - Remove maturity from input coin by @Dentosal in #684
- Zero malleable fields before execution by @Dentosal in #678
- Include tip in fee by @MitchTurner in #682
- feat: Use Vec of Bytes for Contract State by @bvrooman in #671
- Implement
serde
forInterpreterError
by @xgreenx in #686 - Add access to {asset_id,to,amount} fields for Variable and Change outputs by @Dentosal in #675
- Use max fee policy to charge user by @MitchTurner in #685
- Release
0.47.0
by @xgreenx in #687
Full Changelog: v0.46.0...v0.47.0
v0.46.0
Version v0.46.0
Changed
Breaking
- #679: Require less restricted constraint on
MerkleRootStorage
trait. Now it requiresStorageInspect
instead of theStorageMutate
. - #673: Removed
ContractsInfo
table. Contract salts and roots are no longer stored in on-chain data. - #673: Opcode
CROO
now calculates the given contract's root on demand.CROO
has therefore been changed to aDependentCost
gas cost.
What's Changed
- Update CI Rust version to 1.75 by @bvrooman in #674
- feat: Remove ContractsInfo by @bvrooman in #673
- Add gasprice to mint tx by @MitchTurner in #676
- Require less restricted constraint on
MerkleRootStorage
trait by @xgreenx in #679 - Bump version to
v0.46.0
by @xgreenx in #680
Full Changelog: v0.45.0...v0.46.0
v0.45.0
Version v0.45.0
Changed
Breaking
- #668: Remove non_exhaustive from versionable types for security reasons
What's Changed
- Remove non-exhaustive attribute for versionable types by @MitchTurner in #668
- Relese 0.45.0 by @MitchTurner in #669
Full Changelog: v0.44.0...v0.45.0
v0.44.0
Version v0.44.0
Changed
- #653:
ECAL
opcode handler can now hold internal state. - #657: Add debugger methods to remove or replace all breakpoints at once.
Breaking
- #654: Make public types versionable by making non-exhaustive.
- #658: Make
key!
-generated types likeAddress
,AssetId
,ContractId
andBytes32
consume one less byte when serialized with a binary serde serializer like postcard.
What's Changed
- Add state to ECAL handler by @Dentosal in #653
- Make public types versionable by @MitchTurner in #654
- Add batch changes to breakpoints by @Dentosal in #657
- Omit extra byte from types like AssetId when serialized with postcard by @Dentosal in #658
- Release 0.44.0 by @Dentosal in #659
Full Changelog: v0.43.2...v0.44.0