github gear-tech/gear v1.8.0

latest releases: build, v1.9.1, v1.8.2...
5 months ago

Release v1.8.0 changes

  • Crates versions bumped to "v1.8.0”, runtime spec version bumped to 1800 (#4593);
  • Weights of extrinsic and WASM instructions WERE NOT updated.

Important

Minimal stable 🦀 Rust version bumped to v1.85.

Note

To update your compiler version run: $ rustup update stable

Update requirements

Name Character
JS clients 🔴 Required
Programs 🟡 Recommended
Node bin ⚪ Insubstantial

Key changes

🔥📖 Panic instruction now fully flexible (#4583);

Important

Previously, each error reply followed a soft invariant: messages had to be filled with string-formatted data. That constraint is now lifted - it’s entirely up to users and their implementation details.

Note

The gr_panic syscall now accepts arbitrary bytes as payload. These can be processed by the calling actor, enabling more flexible and expressive error handling within your program’s logic.

No more userspace hacks needed for error cases!


🔥📖 Extended purpose and usage of error reply codes (#4589);

Note

As mentioned in the previous update, the invariant requiring string payloads in error replies is deprecated. Alongside that, the error reply code system has been refactored.

All changes are backward compatible with existing programs.

The InactiveActor error reply variant has been renamed to UnavailableActor, and it now includes sub-variants that indicate the specific reason for unavailability.

Important

In most error cases, there will be no payload in the message. The reply codes themselves are now sufficiently descriptive to give your application clear insights into what went wrong.

Spefic cases include:

  • UserspacePanic code: payload will contain the raw bytes passed by the program via the gr_panic argument;

  • ProgramExited code: payload will contain 32 bytes representing the ActorId of the program’s designated inheritor, set through a prior (fatal) gr_exit call;

  • All other error code cases: payload will be empty. Be sure to parse reply codes properly in your clients (e.g., frontends, indexers).


🔥📖 System GearBank account address changed (#4588);

Important

Previously, the GearBank (pallet-gear-bank) account address was derived from a repeated "gearbank" string to fill 32 bytes (kGhsZSxCZpJN8aC2jbQ4Sm9NMhfAE9FtNjthhRDvpGPQNNFkv).

It is now derived natively using Substrate’s PalletId, making it automatically recognized by observers as the modlpy/gbank address.


🔥📚 Treasury transaction and gas fee split (#4534);

Note

Now at the substrate pallets level, the constants GearBank::TreasuryTxFeeShare and GearBank::TreasuryGasFeeShare define the percentage of transaction and gas fees that are redirected to the treasury account for future governance-controlled use.

Tips always remain in the hands of the validators.


🔥📚 Increased economic deterrents for network abuse (#4585).

Important

The cost of gas and weight has been increased from 6 units per gas/weight to 100, making it significantly harder to spam the network or overload validators at minimal cost.

Note

Deposit requirements for governance and referenda-related actions have been raised accordingly.

Userspace

📖 Compilation to WASM switched to the brand-new wasm32v1-none target (#4407);

Note

Make sure to install it by running $ rustup target add wasm32v1-none


📚 gtest functionality for reading state using the legacy metadata approach has been removed (#4320);


📖 Support for the gmeta crate has been completely removed (#4347);


📚 Bug with incorrect maximum gas applied to messages in gtest has been fixed (#4592).

Runtime

📚 Replaced deprecated parity-wasm library with a custom-written WASM parsing library for improved stability and long-term support (#4494, #4469);


📚 Optimized memory allocations behavior (#4473, #4503);


📚 Updated bags thresholds, enhasing election performance and quality (#4428);


📖 Implemented a basic transport fee for pallet-gear-eth-bridge (#4590);

Note

The pallet is still only available for dev/testnet builds.


📖 Added governance referenda tracks for bridge administration (#4527).

Full Changelog: v1.7.1...v1.8.0

Don't miss a new gear release

NewReleases is sending notifications on new releases.