Sprout-to-Sapling Migration Tool

The Electric Coin Company is pleased to announce the official Sprout-to-Sapling migration tool in the 2.0.5-2 release of zcashd. This tool comes in the form of new RPCs with the purpose of automatically and safely migrating the funds in Sprout addresses to Sapling addresses.

Only users with funds in Sprout addresses need to use this tool. Users can confirm if they have funds in a Sprout address by checking to see if any of their addresses start with a “zc”. Sapling addresses are the standard shielded address since the Sapling network upgrade and start with a “zs”.

Why it’s needed

The privacy properties of shielded addresses (both Sprout and Sapling) make direct auditing of the total monetary supply impossible. Therefore, a turnstile mechanism is implemented to monitor value entering and exiting their associated value pools. The turnstile prohibits direct transfer between shielded value pools without revealing the amount being moved. While this mechanism enhances auditing capabilities, revealing balances introduces privacy concerns. The Sprout-to-Sapling migration tool automates the process of moving funds to Sapling addresses in a way that reduces the potential for compromising user privacy.

How it works

This migration tool hides individual migration transactions among those of all users who are doing the migration at around the same time. Whenever the blockchain reaches a 500 block height interval, up to 5 migration transactions are created with transaction amounts picked according to a random distribution. The full specification of this tool can be found in ZIP 308.

To migrate funds, zcashd users simply enable or disable the tool with z_setmigration. To check the status of the migration, users can call z_getmigrationstatus. Documentation for using these RPCs can be accessed in the official migration tool docs.

The migration tool is supported in zcashd v2.0.5-2 and up; for the latest version see the download page. We recommend third-party wallets that support both Sprout and Sapling addresses implement this tool as well.

Further Motivation

Before the activation of the Sapling Network Upgrade, we wrote about the benefits of Sapling addresses and the risks associated with fund migration from legacy Sprout addresses. We supplied guidelines for manual migration in lieu of not having the tool ready but no longer recommend for anyone to migrate manually.

The release of this tool is timed with the introduction of new consensus code which uses the turnstiles to enforce defense against counterfeiting. We hope that everyone who has ZEC in Sprout addresses will make use of this tool to safely move their funds. We look forward to increasing adoption of Sapling addresses across the Zcash ecosystem. Please connect with us in the community chat or community forum if you have any questions.

Recent blog posts: