Dusk Engineering Update: October

October Engineering Update

Introduction

As we progress toward the launch of Dusk's mainnet, October brought a series of advancements that enhance both the developer experience and network performance. The Dusk engineering teams have been focused on building a robust ecosystem foundation by introducing new tools and optimizations. From the release of the W3sper SDK and the Multisig solution, to substantial performance gains in Piecrust, here’s an in-depth look at October's developments and a preview of what’s to come for the Dusk ecosystem.

W3sper SDK

The release of the W3sper SDK is a major milestone, as it transforms the development landscape for the Dusk ecosystem. W3sper empowers developers by giving them access to robust tools for account management, transaction handling, event subscriptions, and cryptographic proof management.

The W3sper SDK is a groundbreaking toolkit that introduces the concept of Contract Drivers, acting as a seamless bridge between wallets and smart contracts in a way that supersedes standard interfaces. By harnessing the power of WebAssembly, W3sper ensures secure, flexible interactions directly within the user's environment, eliminating the need for installations. It empowers developers to deploy not just smart contracts but also the complete user experience, including custom UIs for transaction generation and contract interaction. The release of W3sper is the foundation of a new standard for application development, where developers can avail of rich expressiveness and a standard way to define the client UX.

The W3sper SDK includes the following core features:

  • Address & Account Management: To easily generate and manage user profiles and addresses, streamlining user onboarding and identity management.
  • Balance and Transaction Management: To Check balances, create signed transactions, and manage gas effectively.
  • Event Subscription: To stay up-to-date with network events and access blockchain data in real-time.
  • Proof Management: Generate and delegate Zero Knowledge proofs.

Multisig

The Multisig repository offers a robust multi-signature solution for Dusk transfers, designed to enable collaborative fund management with customizable approval thresholds.

The Multisig solution supports flexible, multi-signature transfers by requiring any N out of M designated keys for transaction approval. Using Dusk’s BLS multisig verification, users can create multisig accounts managed by multiple BLS keys, ensuring that a specified subset of account owners must authorize each critical transaction

Using the Multisig, users can:

  • Create and manage multisig accounts.
  • Deposit Dusk into a multisig account and transfer it out to Moonlight accounts.
  • Update multisig accounts by modifying the set of signers or required signature thresholds.

Piecrust

Piecrust has received substantial upgrades aimed at enhancing the performance of commit operations, especially in handling large numbers of contracts. These enhancements include:

  • Speeding up commit operations' handling of Merkle tree and contracts map storage.
  • Separating base info file from the index file, thus speeding up access to base info and making it O(1) rather than dependent on the size of the index file.

By reducing access latency for base info and streamlining Merkle tree and contract map handling, Piecrust now offers significant performance gains.

Kadcast

The Kadcast protocol has received multiple improvements aimed at enhancing connectivity, efficiency, and message propagation:

  • The Peer::to_route_table and Peer::send_to_peers APIs have been introduced to streamline peer connections and facilitate more efficient message routing across nodes.
  • max_udp_len configuration with range checks has been added to control message sizes and prevent fragmentation.
  • Network versioning has been added in handshake messages for compatibility, as well as Ray-ID tracking in MessageInfo to trace message flow. This helps network health monitoring and troubleshooting.
  • Tracing for broadcasting to eclipsed networks now includes warnings for incomplete message discards, enhancing control over network segments.

Rusk wallet

The Rusk Wallet has received several improvements to streamline smart contract interactions and boost user experience:

  • The wallet pre-calculates deployment costs, enabling users to see the precise gas cost before executing a deployment. This is calculated by multiplying the minimum gas price by a set byte cost, giving users greater transparency.
  • Users can now access detailed staking information (such as eligibility, epoch, and rewards) in both interactive and non-interactive modes.
  • Limits on character length have been introduced for function calls and memo fields, increasing efficiency and preventing errors.
  • Since for Moonlight transactions proving is unnecessary, the prove_and_propagate function has been split into separate prove and propagate functions. 

Rusk

The Rusk repository saw the following addition:

  • To ensure that all transactions cover basic processing costs, a minimum gas limit (min_gas_limit) parameter has been added. Even if underpaying is already prevented by the VM the introduction of this parameter stops the execution altogether if a submitted transaction is below the set threshold. It's more of an early exit to decrease computational load on nodes and reduce the impact of spam This prevents transactions from using node resources when they will never succeed anyway. With the minimum gas limit, underfunded transactions will be filtered out before processing, instead of being discarded mid-process with an OutOfGas error. 

Wallet-core

The Wallet-Core module has been enhanced with a variety of updates, strengthening its flexibility and efficiency:

  • Support has been added for new transaction types, improving the handling of notes. This includes modules for managing Moonlight transactions and refined calculations for note balances, making the wallet core more adaptable for various transaction types.
  • new debug feature has been added to Cargo.toml, allowing developers to troubleshoot in release mode, improving the ease of identifying and fixing issues in a production environment.
  • The derive_bls_sk function in ffi.rs now supports BLS secret key operations, further enhancing the wallet’s cryptographic capabilities.
  • Additional error codes have been introduced for deserialization and transaction handling in Phoenix and Moonlight transactions. This provides clearer insights into transaction-related issues and reduces debugging time.

Optimization for Phoenix Transactions

The way in which transparent and obfuscated notes are managed in Phoenix transactions allowed for an increased optimization. By making zero-value transactions transparent (instead of obfuscated), the note tree avoids accumulating non-value-carrying entries. This minimizes unnecessary data, reducing the size and complexity of the tree, and keeps the blockchain leaner over time.

While transparent notes reveal transaction values, sender and receiver keys remain private across all note types, maintaining confidentiality in transactions. Only essential transaction data (e.g., contract calls, memos) remains visible for transparency.

Node

The Dusk Node has been upgraded with several improvements focused on stability, connectivity, and data management:

  • refund flow has been added to the Moonlight database, capturing refund information directly from the MoonlightTransactionEvent field. This update ensures that any inflow associated with refunds is properly recorded and available for filtering. This addition enhances data integrity and makes refund-related information more accessible to the node.
  • The Web Wallet now automatically detects the network URL for improved flexibility. It behaves like the explorer, using its own host when running locally and only utilizing a specified node URL if explicitly provided via VITE_NODE_URL. This change eliminates dependencies on static node URLs.
  • Synchronization during node startup has been optimized. Previously, the node could start block synchronization before establishing a robust connection to peers, potentially causing connectivity issues during network bootstrap. Nodes now wait for adequate peer connectivity in the Kadcast routing table before syncing, ensuring smoother onboarding for multiple nodes.

Rusk ABI

Significant improvements have been made to the Rusk ABI to support multi-signature and threshold signature schemes, broadening Dusk’s capabilities in handling complex signature requirements.

The verify_bls_multisig function in rusk_abi now accepts multiple public keys and signatures, allowing aggregation and verification of multiple signatures against a single message. This capability is particularly useful for smart contracts needing threshold-based signature validation. For example, this feature enables smart contracts to process fund transfers after receiving a set minimum of valid signatures. This functionality extends Dusk’s support for collaborative and secure fund management solutions, especially in scenarios requiring multi-party authorization.

Nocturne

The Nocturne Testnet has been upgraded for enhanced scalability, allowing it to handle high transaction volumes and extensive smart contract deployments.

These updates have been made to ensure that network performance remains stable and fast, even as the state size grows. These improvements to the mempool and transaction execution in Piecrust have significantly accelerated performance.

Web Wallet

The Web Wallet v0.6.0 has been released, also including the progress done during October:

Two new components have been introduced, improving the usability of the Web Wallet:

  • Banner component: A flexible, reusable banner that can display messages in three styles (error, warning, and informational), helping users stay informed about important updates or actions needed.
  • BigInt component: This component improves data handling by supporting large integers, allowing for accurate BigInt input and validation.

Additionally, a Shield/Unshield page has been added to facilitate DUSK transfers between the Phoenix and Moonlight transaction models.

Block Explorer

The Block Explorer has been enhanced to give users more insights for exploring the Dusk network.

  • Nodes info section: The section for displaying nodes data highlights regions where nodes operate. This map will be moved to a more intuitive position, making it easier for users to understand the geographic distribution of nodes.
  • Provisioners page: A dedicated page where users can view all Provisioners along with their stakes and contributions, improving transparency. This feature enhances the visibility of node operators and their importance within the network.

Additional interface and usability improvements include:

  • Responsive Layout: The footer layout is now optimized for smaller screens, ensuring consistent display across devices.
  • Gas Meter Fixes: The “Gas Used” meter now accurately displays values when the gas limit is zero, ensuring users have precise transaction data.
  • The “Show More” button is now hidden when an error occurs and no additional data can be displayed.

These Block Explorer updates have been scheduled for the next release, providing more insightful data.

Ecosystem

Audits

The burner contract for the one-way bridge has been audited, ensuring a safe migration from ERC-20 / BEP-20 DUSK to native DUSK. All audits can be found in the Github repository

Docs

Docs are now public, allowing anyone to contribute by opening issues and submitting PRs in the docs-public repository. We encourage the community to contribute to help us maintaining the docs accurate, relevant, and useful.

Open RFPs

There are currently two open RFPs waiting for proposals:

Applications can be submitted via the Thesan application form.

Resources