# Beta-5: Staging Network Upgrade

By [Fuel Labs](https://paragraph.com/@fuel-labs-2) · 2024-02-29

---

We are excited to migrate Fuel’s staging network to `Beta-5`. The `Beta-5` network has numerous new features and updates, enabling wallet integrations, DDoS resistance, improved Sway DevEx, and more.

With `Beta-5` developers can use the new `npm create fuels` package, simplifying building a full-stack dApp for anyone, whether you’re a frontend or a backend developer. Additionally, it has brought us Fuel Wallet Connectors, which introduce a comprehensive system for enhancing dApp interoperability and enabling wallets to go beyond browser extensions.

Users can download the [Fuel Wallet](https://wallet.fuel.network/) and explore applications live on `Beta-5`, via the [ecosystem page](https://app.fuel.network/portal/ecosystem).

_Please note that_ `beta-5` _is the final staging network. Next, we will launch the incentivized testnet. More information is coming soon._

Key Enhancements and New Features
---------------------------------

`Beta-5` introduces a range of enhancements and new features:

### Generic Trait Constraints

Generics support in Sway has undergone a considerable upgrade. With generic trait constraints, Sway makes significant improvements to the developer experience. This enables conventional patterns such as iterators, conversion traits, and more.

### Transaction Policies

Newly added support [transaction policies](https://github.com/FuelLabs/fuel-vm/blob/master/CHANGELOG.md#version-0420) enhance safety for users.

Additionally, this feature paves the way for a future multi-dimensional pricing model, which will reduce transaction costs and enable a greater volume of non-storage impacting transactions.

### Fuel Wallet Connectors

The Fuel Wallet Connectors introduces a comprehensive system for enhancing DApp interoperability with wallets, enabling them to go beyond browser extensions. Read more [here](https://github.com/FuelLabs/fuels-wallet/wiki/Fuel-Wallet-Connectors).

### New Dapp Developer Tooling

The new tooling provides the quickest way to develop full stack Fuel dApps. As a typescript wrapper around forc, it simplifies workflows for building or deploying contracts, and integrating Sway into webapps. Read more [here](https://fuellabs.github.io/fuels-ts/guide/cli/).

What’s New
----------

Here is a full list of features and updates :

### 🌴 Compiler

*   New `u256` primitive type with arithmetic support that deprecates `U256`
    
*   Method calls between `impl` methods are now allowed
    
*   We support generic trait constraints, such as:
    

![](https://storage.googleapis.com/papyrus_images/588edb93c8125b1fa3b3e5d477fe9f355c680a296d5895aad8d38f18d5c4f535.png)

*   We fully support associated types, such as:
    

![](https://storage.googleapis.com/papyrus_images/c3963b335bac31e36b6dfde94f28712c495f28099e70300e1696c1730a0c980b.png)

*   New attributes `#[deprecated]` and `#[allow(deprecated)]` have been introduced to provide deprecation warnings
    
*   Small values such as `()` and `u8` are now represented by a single byte in memory instead of a full word
    
*   Functions with more than six arguments no longer require inlining
    
*   Various optimizations make the compiler faster to run
    
*   Lots of type system edge cases are now properly handled
    
*   New bytecode optimizations make our output smaller
    
    *   better array initialization
        
    *   optimized aggregate indexing
        
    *   function deduplication
        

### **🌐** Client

*   Most of the changes improved the security and stability of the node.
    
    *   The gas model was reworked to cover all aspects of execution.
        
    *   The benchmarking system was significantly enhanced, covering the worst scenarios.
        
    *   A new set of benchmarks was added to track the accuracy of gas prices.
        
    *   Optimized heavy operations and removed/replaced exploitable functionality.
        
*   Unified naming conventions for all CLI arguments. Added dependencies between related fields to avoid misconfiguration in case of missing arguments. Added `-debug` flag that enables additional functionality like a debugger.
    
*   Improved telemetry to cover the internal work of services and added support for the Pyroscope, allowing it to generate real-time flamegraphs to track performance.
    
*   Improved stability of the P2P layer and adjusted reputation scoring. The speed of block synchronization was significantly increased.
    
*   The node is more stable and resilient. Improved DoS resistance and resource management. Fixed critical bugs during state transition.
    
*   Reworked the `Mint` transaction to accumulate the fee from block production inside the contract defined by the block producer.
    
*   FuelVM received a lot of safety and stability improvements:
    
    *   A recent audit helped identify some bugs and errors that have been successfully fixed.
        
    *   Updated the gas price model to charge for resources used during the transaction lifecycle.
        
    *   Added `no_std` and 32-bit system support. This opens doors for fraud proving in the future.
        
    *   Removed the `ChainId` from the `PredicateId` calculation, allowing the use of predicates cross-chain.
        
    *   Improvements in the performance of some storage-related opcodes.
        
    *   Support the `ECAL` instruction that allows adding custom functionality to the VM. It can be used to create unique rollups or advanced indexers in the future.
        
    *   Support of [transaction policies](https://github.com/FuelLabs/fuel-vm/blob/master/CHANGELOG.md#version-0420) enhances safety for users and closes some DOS vectors for the network. Additionally, this feature paves the way for a future multi-dimensional pricing model, which will reduce transaction costs and enable a greater volume of non-storage-impacting transactions.
        
    *   Refactored errors, returning more detailed errors to the user, simplifying debugging.
        

### **🔧** Tooling

*   Sway Playground: improved UX, can now select which toolchain you want to build against.
    
*   New `forc-crypto` CLI tool for working with common cryptographic operations.
    
*   `forc-doc` now has a search bar with fuzzy search and semantic highlighting.
    

![](https://storage.googleapis.com/papyrus_images/6e731d2c2f5b677784a1dde97485e5129402a03a59006388aefecd5aad093bef.gif)

### **🧩** Language Server

*   Module caching is enabled in the language server, leading to substantial speed-ups while typing.
    
*   Significant backend stability improvements.
    
*   Auto import and auto-qualify features were added to the code lens.
    
*   VScode users can visualize the project's dependency graph.
    

![](https://storage.googleapis.com/papyrus_images/6643a9b0739a207406541d46a9a78f230795e44387a406caa04af39a6306d8cb.gif)

### 🏗️ SDK

*   **Rust SDK**
    
    *   Retry mechanism: configuration for automatically retrying transactions if they fail;
        
    *   Support for `str` returns from contracts;
        
    *   Coin/UTXO caching;
        
    *   Deprecate `U256` and use Rust’s native `u256`;
        
    *   Add conversion from `Address`/`ContractId` types to `Identity`;
        
    *   Automatic transaction parameters defaults from the network: Changes `gas_limit` and `gas_price` in `TxParams` to be optional. `TransactionBuilder`s use the corresponding values from `ConsensusParameters` and `NodeInfo` during `build()` if these fields were set to `None`;
        
    *   UX improvement around predicate witness data access;
        
    *   UX improvement around the `Bytes` type through the new `from_hex_str`;
        
    *   `TxParameters` are replaced with `TxPolicies`;
        
    *   `TxPolicies` introduced new fields:
        
        *   `WitnessLimit`
            
        *   `MaxFee`
            
    *   `ScriptGasLimit` only limits script execution;
        
    *   New `WitnessLimit` impacts `max_gas` and `max_fee` calculation;
        
    *   Minimal gas charges for transaction ID calculation;
        
    *   Setting the `GasPrice` policy is mandatory for each transaction;
        
    *   Changes in `GasLimit` and `MAX_GAS_PER_TX` rules;
        
    *   `get_message_proof` now uses `Nonce`;
        
    *   Predicates no longer use `ChainId` for address calculation;
        
        *   `manual_blocks_enabled` replaced with `debug`;
            
    *   `fee_checked_from_tx` utilizes `FeeParameters`;
        
    *   Default enabling of `utxo_validation` and `manual_blocks`;
        
    *   Changes in node configuration: Replacing `local_node` with `default`;
        
    *   `TransactionType` no longer implements `Transaction`. Users need to match and extract the inner tx;
        
*   **Typescript SDK**
    
    *   Typegen support for string slices
        
    *   Auto-loading of storage slots when deploying contracts
        
    *   Improved `AssetID` encoding/support
        
    *   Improved package tree-shakeability
        
    *   Support for Node `v20` (LTS)
        
    *   Support for GraphQL Subscriptions
        
    *   Retry mechanism for failed transactions
        
    *   Coin/UTXO caching
        
    *   Improved DX and utility method for calculating fees
        
    *   New CLI tools for creating/automating new fullstack Fuel dApps
        
    *   `TxPolicies` introduced new fields:
        
        *   `WitnessLimit`
            
        *   `MaxFee`
            
    *   `ScriptGasLimit` only limits script execution;
        
    *   New `WitnessLimit` impacts `max_gas` and `max_fee` calculation;
        
    *   `get_message_proof` now uses `Nonce`;
        
    *   Predicates no longer use `ChainId` for address calculation;
        
        *   `manual_blocks_enabled` replaced with `debug`;
            

### **🔌** Front End

*   Fuel Wallet Connectors
    
    *   The Fuel Wallet Connectors introduces a comprehensive system for enhancing DApp interoperability with wallets and enables wallets to go beyond browser extensions without abstractions overhead. Implementations of other ecosystems inspire the new design; however, with Fuel, this is implemented on the protocol level to improve the user experience without increasing the complexity for DApp or wallet developers. Read more about it in our wiki: [https://github.com/FuelLabs/fuels-wallet/wiki/Fuel-Wallet-Connectors](https://github.com/FuelLabs/fuels-wallet/wiki/Fuel-Wallet-Connectors)
        
*   Fuel Wallet Connectors UI
    
    *   The new Connectors UI implemented on top of the new Connectors pattern, provide for react application a ready to use UI, to allow users to select the Wallet they want to use. [https://next-wallet.fuel.network/docs/dev/connectors/#with-react](https://wallet.fuel.network/docs/dev/connectors/#with-react)
        

![](https://storage.googleapis.com/papyrus_images/5731b42c071319b2fc6bce03d8ca7e294cec9628d1062b74e1eb0e1887724c32.png)

**_Update your Fuel Wallet:_** _If you cannot connect you Fuel wallet on the Fuel Bridge or on other apps, you may not be using the latest version of the Fuel Wallet._ **_Here is how to update it:_**  _Go to your Extensions parameters, activate the Developer Mode, and click the Update Button._

*   Fuel React Hooks
    
    *   Now react developers can use our hooks library to develop more naturally, using hooks for interacting with the fuels SDK. Our documentation has been updated with more examples. You can check all the hooks available on our [Hooks reference](https://next-wallet.fuel.network/docs/dev/hooks-reference/).
        
*   The new Fuel Explorer
    
    *   The new Fuel Explorer was designed with users and developers in mind, creating a design that aims to help visualize overall details of the transaction, sequence of operations, inputs, and outputs. And for more advanced users we also included a view that enables to visualize the raw transaction, removing the need for multiple tools.
        
    *   The new explorer also includes visualizations for Accounts and Predicates, Contracts and Blocks. Check it out [here.](https://app.fuel.network/)
        
    
    More Resources for Developers and Users
    ---------------------------------------
    
    ### 🧳 Migration guide
    
    *   To address any breaking changes from `beta-4`, active builders in the Fuel ecosystem can follow the migration guide → [https://docs.fuel.network/guides/testnet-migration/](https://docs.fuel.network/guides/testnet-migration/)
        
    
    ### **🚰 Faucet**
    
    *   Valid transactions are required to deploy contracts and interact with the network, which require coins. Testnet ETH can be obtained from the [faucet](https://faucet-beta-4.fuel.network/) by completing a captcha.
        
    
    ### 📃 GraphQL Endpoint
    
    *   The [Fuel Core](https://github.com/FuelLabs/fuel-core) node uses GraphQL instead of JSON RPC. A playground for the public GraphQL endpoint for `beta-5` is [available here](https://beta-4.fuel.network/playground).
        
    
    ### 🏃🏻 **Getting Started**
    
    *   For an overview of Fuel, look at the new [Fuel documentation portal](https://docs.fuel.network/).
        
    *   To begin building on Fuel, check out the [developer quickstart](https://docs.fuel.network/guides/quickstart/). This guide provides an end-to-end walkthrough for developers building a dapp on Fuel.
        
    
    _If you have any questions (development-related or otherwise), you can join the_ [_Fuel Labs Discord_](https://discord.gg/fuel-network) _and head to the #questions channel under the Testnet category. Be sure to follow our_ [_Twitter_](https://twitter.com/fuel_network) _for updates._
    
    `beta-5` is developing actively and may see breaking upgrades and even regenesis events.
    

* * *

Join the Fuel community
-----------------------

*   [**Twitter**](https://twitter.com/fuel_network?ref=fuel-labs.ghost.io)
    
*   [**Discord**](https://discord.gg/fuel-network)
    
*   [**LinkedIn**](https://www.linkedin.com/company/fuel-labs/?ref=fuel)
    
*   [**Lens**](https://lenster.xyz/u/fuelnetwork?ref=fuel-labs.ghost.io)
    
*   [**YouTube**](https://www.youtube.com/channel/UCam2Sj3SvFSAIfDbP-4jWZQ?ref=fuel)
    
*   [**Forum**](https://forum.fuel.network/?ref=fuel-labs.ghost.io)
    

Become a Fuel Contributor
-------------------------

*   [Explore our current job openings](https://jobs.lever.co/fuellabs)

---

*Originally published on [Fuel Labs](https://paragraph.com/@fuel-labs-2/beta-5-staging-network-upgrade)*
