Sending funds to z-addr in regtest mode

Hi there.

I run two zcash nodes in regtest mode. Here are my configuration files.
First one:
server=1
regtest=1
rpcuser=user
rpcpassword=password
port=18233
rpcport=18232
rpcallowip=0.0.0.0/0
addnode=127.0.0.1:18243

And second one:
server=1
regtest=1
rpcuser=user
rpcpassword=password
port=18243
rpcport=18242
rpcallowip=0.0.0.0/0
addnode=127.0.0.1:18233

After starting nodes I can send funds between t-addrs but not to z-addr. For example, when I call
{
“method”: “z_sendmany”,
“params”: [
“tmELw6WVggwvQBndyULn7Hmrsjoq93ARwoV”,
[{
“address”: “zregtestsapling1fglqzdaksqq5cyw0xxkxuq5rdfckgs0x46595xtremczmlsyej2zn8ksmczdh79c69aruaz8wud”, “amount”: 1
}]
]
}
I get an error:
{
“result”: null,
“error”: {
“code”: -8,
“message”: “Invalid parameter, Sapling has not activated”
},
“id”: null
}

What does “Invalid parameter, Sapling has not activated” mean?

Also I tried to call ** z_shieldcoinbase** like was mentioned here but it responded with the same error (“Invalid parameter, Sapling has not activated”).

What am I doing wrong?

1 Like

regtest mode is used for the test suite, and as such it needs to support a variety of upgrades being active or not. By default, no upgrades are configured to be active. To configure Sapling as active, you need to use the following zcashd options (either on the CLI or in zcash.conf):

-nuparams=5ba81b19:1
-nuparams=76b809bb:1

The first option activates Overwinter at height 1, and the second option activates Sapling at height 1.

4 Likes

Thank you! This really saved me!