RCnet v2 is now live, and Scrypto is now feature-complete for Babylon.
RCnet v2 consists of two phases. This first phase consists of just the “low level” components of the network—the node, Radix Engine, and Scrypto. Phase 2 will follow in a few weeks, bringing with it updated versions of the Gateway, Dashboard, Wallets, and surrounding tooling.
Why the Phased Release?
There are two reasons. First, Scrypto has undergone several quality-of-life improvements and gained some new features which developers can immediately make use of, and it made sense to put it in front of the community as soon as that work was tied off. Second, community node-runners will soon participate in a test migration of the Olympia Stokenet network state to a Babylon-type network, and that test needed a new node release as well.
What’s New?
Redesigned authentication developer interface
The way developers specify authentication for their components has changed quite a lot for the better. To understand why this is important, let’s look at common developer needs for privileged access, which break down into 3 categories:
- Components which have no need for any privileged access; all methods are public.
- Components which need a concept of an administrator, but don’t need fine-grained control with lots of different actors.
- Components which have multiple categories of actors, and need to manage their access levels carefully.
Previously, Scrypto was set up quite well to handle the first category, but it was pretty easy to make a configuration mistake if your application fell into the latter two categories. Furthermore, people who wanted the common “single admin actor” pattern wound up having to learn more (and code more) than they really needed to in order to set that up. It worked, but it needed to be better to deliver the Scrypto standard of intuitiveness.
The new model for configuring authentication is based around assigning roles to specific permissions. This lets each of the component categories above use the simplest possible implementation, providing sensible defaults to handle the 90% case. It also changes the syntax to prevent developers from accidentally failing to fully specify the permission set, removing a common cause of errors.
Native pools and pool units
Those who watched RadFi got a little preview of how the Radix Wallet could recognize “LP tokens,” a common pattern in DeFi in which you can contribute resources to a pool and receive tokens which can be redeemed for a share of that pool. Native blueprints for single-resource, two-resource, and multi-resource pools are now available for anyone to use, each automatically issuing a corresponding “pool unit” token that represents the user’s share, LP token-style. Using them allows the Radix Wallet to recognize pool units and trustlessly show the user their redemption value – as well as giving you a trustworthy implementation of this concept for a variety of application types using shared liquidity. More information on usage of the native Pool blueprints is coming soon.
Better handling for referencing blueprints, components, and resources
It’s now much easier to treat things outside your own blueprint code in the same way you do local objects. Historically, this has been a common point of frustration when developers step up to applications that require interactions between multiple different components and resources. The new syntax is more straightforward and intuitive, follows familiar Rust concepts, and results in code which is easier to write and quicker to comprehend.
Fee table adjustments
Following an extensive effort around understanding the real-world compute cost of various operations, the fee table has undergone its first major update since its initial release with Alphanet. The relative costs of different operations are now somewhat tuned, rather than the near random numbers that existed before. The absolute costs (that is, the price of each CostUnit in XRD) should still be treated as arbitrary and not representative of real costs for mainnet. With this first tuning of relative compute costs done, the team will move on to considering storage costs, and then finally on to real XRD rates before mainnet.
But wait, there’s more!
There are a host of smaller additions shipping with RCnet v2 as well: ways to investigate cost tracking at runtime, human-recognizable transaction IDs, royalty setting allowing for choice of flat XRD or USD-relative amounts, custom error messages to aid development, and more.
Check out the migration notes for more details.
What’s Coming for Scrypto?
Scrypto is now feature-complete for Babylon release. While there’s much more to come after Scrypto 1.0 for the Babylon mainnet upgrade, the rest of the time up until 1.0 release will be a stabilization period for Scrypto. Some areas may still be adjusted in response to community feedback or testing, but new items will only be added prior to 1.0 in exceptional cases. Following Babylon release, quarterly Scrypto roadmap updates will be provided to give developers an idea what’s top-of-mind to implement next.
RCnet v2 Q&A
Will the original RCnet be shut down with the release of RCnet v2?
Not until phase 2! The existing release of the iOS/Android Wallets are only compatible with the original RCnet, so that will stick around until new versions are released with phase 2.
Will the RCnet v2 ledger be reset when phase 2 goes live?
No reset is currently planned with phase 2, but it is a possibility.
Does RCnet v2 have “real” tokens and applications on it that will become part of mainnet?
No, it is strictly a test network, and everything on it will eventually vanish.
How can I see my deployed applications/resources on RCnet v2 without a Gateway?
You’ll have to wait for phase 2 to be able to do so with the Gateway. You can use the Core API in the meantime if you run a node.
How can I test my deployed application with the Radix Wallet?
RCnet v2-compatible Wallets will not release until phase 2. If you need Wallet-level testing, then stick with the original RCnet until then.
I’m preparing an application for release with Babylon, where can I get my questions answered?
Best place to ask is always in the Scrypto channel on Discord, or you can attend the upcoming Tech Q&A session and ask there.