Gear Technical Updates | April 2023 Recap

Gear Protocol
3 min readMay 8, 2023

--

Welcome to the April 2023 update, highlighting the technical progress of the previous month.

Let’s dive into the significant tech updates below:

  1. Gear’s CLI tool has been significantly updated Pull request #2516 added new metadata display from *.meta.txt files generated when building smart contracts, removed the Wasm executor, and merged “upload-program” subcommand into the “upload” one.
  2. The “upload-program” subcommand is merged with “upload”, and the “gcli program meta” and “gcli program state pid” commands display metadata and program states respectively.
  3. The “upload-program” subcommand is now accessible using “gcli upload”, and “gcli upload code” has a new “ — code-only” option.
  4. Encoded structures can be parsed for quick debugging and status checking using pure Rust and old-good functionality.
  5. Pull Request #2522 adds support of the sign-extension Wasm instructions to every workspace.
  6. This update patches all sign-extension related packages and re-enables sign-extension in “wasm-opt” of “gear-wasm-builder”. It also includes a workaround for weights for sign-extension instructions.
  7. The update applies to the following patches: gear-tech/wasm-instrument#v0.2.1-sign-ext, gear-tech/wasm-instrument#v0.3.0-sign-ext, gear-tech/wasmi#v0.13.2-sign-ext, and gear-tech/parity-wasm#v0.45.0-sign-ext.
  8. To prevent inner compilation errors, the #[feature = “sign-ext”] has only been annotated in these branches’ source files, while the “features.sign-ext” has been kept.
  9. The technical update in Pull Request #2569 introduces a new feature to manage validators in pallet_session through the validator_set pallet.
  10. With this update, users can add or remove validators to “pallet_session”, enhancing the flexibility of the software. However, this feature cannot be used with new networks due to the pallet id coming after “pallet_session”.
  11. There is an issue with the initialization of session, where the validator set for session 0 is empty in the genesis block. This problem has been fixed in the gear-tech/substrate-validator-set@fc0fbd5 update by falling back to Session if the validators list is empty.

In addition to the above updates, the following modifications were made:

Pull Request #2398 changed the Gear page size to 16kb, allowing dynamic page sizes.The update refactored lazy pages, enabling the modification of the page size during runtime upgrades, thereby improving the overall software performance.

Pull Request #2507 was the first in a series of charging program tasks, introducing the mechanism to pause programs after a specific number of blocks. Program resource pausing (memory pages, wait-list messages, etc.) is possible after a program’s free rent period expires following the technical update. This feature helps manage program charges and provides a better user experience.

Below is a summary of the technical changes:

Pull Request #2398

Gear’s performance improved by enabling dynamic page sizes through refactored lazy pages after changing the gear page size.

Pull Request #2507

A mechanism was introduced to pause programs after a specific number of blocks, managing program charges.

Pull request #2516

An update to the gcli tool enabled:

  • New metadata display and removal of wasm executor.
  • Upload-program command was merged with upload. The gcli program meta and gcli program state pid commands display metadata and program states.
  • Now encoded structures can be parsed for quick debugging and status checking.

Pull Request #2522

Sign-extension enabled in every workspace through patched sign-extension related packages. Workaround for weights for sign-extension instructions applied.

Pull Request #2569

The validator management feature ensures:

  • Users can add or remove validators to pallet_session, enhancing software flexibility. Validator_set pallet cannot be used with new networks.
  • Initialization issue with session fixed in gear-tech/substrate-validator-set@fc0fbd5 update.

The Gear community continues to solve existing challenges and improve the code base, ensuring the platform’s performance remains exemplary.

Join Gear and Start Building

If you’re a builder or developer looking to leverage Gear Protocol’s unique capabilities for decentralized and autonomous smart contract development, join the Gear community. Asynchronous messaging and gas reservation support enable multiple use cases, facilitating new decentralized functionality and value for users in the blockchain ecosystem. Contact Gear at hello@gear-tech.io to learn more and start collaborating with the Gear Community.

--

--

Gear Protocol

A new advanced smart-contract engine allowing anyone to launch any dApp. Easiest and cost-effective way to run WebAssembly