MyGit

v0.51.0

FuelLabs/fuels-rs

版本发布时间: 2023-11-20 23:40:19

FuelLabs/fuels-rs最新发布版本:v0.61.0(2024-05-10 12:13:19)

What's Changed

New Contributors

Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.50.1...v0.51.0

Breaking changes

TxParameters are replaced with TxPolicies

The TxParameters, which were previously used to define transaction parameters, have been replaced with TxPolicies. This change signifies a shift in how transactions are specified and managed.

GasPrice and Maturity fields are optional

In the new system, the GasPrice and Maturity fields are no longer mandatory. This offers more flexibility in transaction creation, allowing these fields to be specified only when needed.

TxPolicies introduced new fields:

WitnessLimit

The WitnessLimit field in TxPolicies sets a limit on the maximum size of witnesses in bytes, introducing a new constraint on transaction witnesses.

MaxFee

The MaxFee field specifies the upper limit for the transaction fee that a user is willing to pay, providing a clear boundary for transaction costs.

ScriptGasLimit only limits script execution

Previously, ScriptGasLimit also limited the predicate execution time, but this is no longer the case. It's now solely used for limiting script execution. The MaxFee policy has been introduced to handle transaction cost limitations, and the GasLimit field has been removed from the Create transaction.

New WitnessLimit impacts max_gas and max_fee calculation

The introduction of WitnessLimit affects the calculation of max_gas and max_fee, particularly in Create transactions where it's the sole factor influencing these values.

Minimal gas charges for transaction ID calculation

Even the minimal gas charge now includes the cost of calculating the transaction ID, adding an additional fee component to every transaction.

Setting the GasPrice policy is mandatory for each transaction

Every transaction now requires a GasPrice policy to be set, making it a mandatory element in transaction creation.

Changes in GasLimit and MAX_GAS_PER_TX rules

With the removal of the GasLimit field from the Create transaction, the max_gas for any transaction must now be less than or equal to MAX_GAS_PER_TX. Transactions that do not adhere to this rule will fail.

Transaction rejection conditions

Transactions will be rejected if max_fee exceeds the specified policies.max_fee, or if witnessses_size is greater than the policies.witness_limit.

get_message_proof now uses Nonce

The function get_message_proof has shifted from using the message_id to now utilizing Nonce, altering its operational mechanism.

Predicates no longer use ChainId for address calculation

In predicates, the ChainId is no longer used for calculating addresses, indicating a change in the method of address derivation.

manual_blocks_enabled replaced with debug

In the local chain configuration, manual_blocks_enabled has been superseded by the debug option, reflecting a change in configuration parameters.

fee_checked_from_tx utilizes FeeParameters

The process of fee checking from transactions (fee_checked_from_tx) now employs FeeParameters, indicating a shift in the fee verification approach.

Refactoring of fuel_tx::ConsensusParameters

The fuel_tx::ConsensusParameters have undergone refactoring, which has implications for their usage and implementation.

Necessity of BuildableTransaction trait in transaction builder

When building a transaction with a transaction builder, the BuildableTransacion trait needs to be in scope, highlighting a requirement in the transaction construction process.

Default enabling of utxo_validation and manual_blocks

For test providers, utxo_validation and manual_blocks are now enabled by default, simplifying the setup process for testing environments.

Changes in node configuration: Replacing local_node with default

The node configuration no longer includes local_node. Instead, default is used (e.g., let node_config = Config::default();), reflecting a change in the configuration approach.

TransactionType no longer implements Transaction. Users need to match and extract the inner tx.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-11-20发行的版本