Skip to content

RGB Std Lib v0.10

Compare
Choose a tag to compare
@dr-orlovsky dr-orlovsky released this 11 Apr 09:57
· 807 commits to master since this release
623b41a

This release is a major milestone which brings RGB further to being a production-ready system. It introduces the last consensus-breaking changes, aiming at keeping future RGB versions fully backward-compatible. It also unlocks the last features that were required for implementing fully-functional smart contracts which may be arbitrary customized by contract developers.

Key novelties

  • Contract interfaces

    Interfaces, introduced in this version, represent a standard way of communicating a diverse range of smart contracts through well-defined APIs. Interfaces can be compared to contract ABIs and ERCs in Ethereum world, however, unlike in Ethereum, they require neither obligatory standardization (as ERCs) nor separate distribution, being always packed together with contracts. By using interfaces, wallets and other software can provide a semantic-aware UI for the users for working with the contracts - and contract developers may add more interfaces to their existing contracts over time without the need to update the immutable contract itself.

  • Writing contracts in Rust

    Writing and compiling an RGB smart contracts in Rust. Thanks to the strict types, it is also possible to compile rust data types right into RGB contracts.

  • URL-based invoice format

    Previously RGB was using Bech32m-encoded invoices, which were very long, not human-readable and couldn't be automatically opened with most of the software. The new format is much shorter, easier to verify by the user and can be opened automatically as a link with a preconfigured software.

  • WASM support

    RGB standard library can run without I/O and file system access, i.e. can operate inside a web page or a browser plugin.

  • Simplified dependencies

    RGB consensus layer is being shipped with fewer dependencies, improving the stability of API. With this release do not use rust-bitcoin and rust-miniscript at the level of standard library due to their overall API instability and recently discovered bugs; since RGB uses a very small subset of bitcoin functionality it is now implemented as a part of the library with no assumptions about bitcoin consensus layer (like those which halted rust-bitcoin powered software when Burak's hack had happened last year).

  • Simplified integration

    Many operations that previously required multiple API calls, as well as cross-language encoding of complex data structures now work with a single API call. RGB contract state is represented as a JSON object and can be serialized across different languages without a hassle.

Migration notes

There is no migration from contracts issued on RGB v0.9 to the future versions. All assets have to be re-issued; asset holders can contact asset issuers to provide them with a newly re-issued contracts and assets matching the assets from v0.9.

RGB v0.10 can be downloaded and installed as described on [https://rgb.tech] (https://rgb.tech) website, which also contains a number of user and developer guidelines. RGB source code can be found on https://github.com/RGB-WG

Full Changelog: v0.9.0...v0.10.0