Huge transaction fee. What is a right way to control it?

Hello!

I've mined some ZECs and sent few ones to the exchange transparent address for testing.
The estimated amount was 0.1 ZEC.

zcash-cli 1.0.5 shows:

from getinfo:
"paytxfee" : 0.00000000,
"relayfee" : 0.00001000,

from gettransaction:
{
"amount" : -0.10000000,
"fee" : -0.00000373,
"confirmations" : 31,
.....
.....
"details" : [
{
"account" : "",
"address" : "......transparent addr here......",
"category" : "send",
"amount" : -0.10000000,
"vout" : 0,
"fee" : -0.00000373,
"size" : 372
.........

But I see in explorer.zcha.in 2 transactions - 0.1 and 0.01000501.
Is everything woking fine on my side? and is 10% normal for my parameters?
How to setup the specific fee (full amount of it) for the transaction?

1 Like

Default fee is .0001. Are you saying that you see .1 and .01000501 as fees or as transaction outputs?

1 Like

Yes, I see 2 transactions
0.1
0.0100xxxx (xxxx is not equil to the fee reported by explorer)

I did the test twice

Apologies for not following what you're trying to say... if you're comfortable sharing the txids with me in a direct message, I can take a look. If not, can you confirm that the values .1 and .0100... are listed as fees (yellow box) or transparent values (green box)?

I shared txid via direct message.

To observe here:

As the result of this transaction I see 2 transfers:
1) to the address of the exchange = 0.1
2) to the unknown address = 0.01000xxx

Below on the explorer.zcha.in web page I see
(nnn confirmations) (fee yellow box 0.00000mmm ZEC) (sum green box 0.11000yyy ZEC)

where sum 0.11000yyy = 0.1+0.01000xxx + fee 0.00000mmm

1 Like

Ah. This "unknown" address is most likely an autogenerated change address. Can you check your wallet for the "unknown" address and see if it matches the balance?

Thanks a lot! I've found it!

But what is the hell in the wallet?

1) I used before the command
zcash-cli getaddressesbyaccount ""
It shows 3 addresses. One of them I'm using for mining, others are unused.

2) Now I found the command
zcash-cli listaddressgroupings
and see the different list of 3 addresses:
One of them I'm using for the mining, others are 2 addresses of the change results of 2 transactions

How to understand it?

To only list your transparent addresses with balances, use zcash-cli listunspent.

The listaddressgroupings lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions.

The getaddressbyaccount is a depreciated command since there is only the default account in Zcash.

I suspect since the 2 unused addresses under getaddressbyaccount are addresses you generated in the past but never used and therefore are not subject to the groupings in listaddressbyaccount.

No, listunspent is inconvenient as it shows too much information - all separate coins generated by mining, so it is grows every day by few lines.

listaddressgroupings gives only one line for every used address.

How to remove unused addresses from the wallet?

There is no functionality in zcash for removing addresses... in bitcoin, address archiving is left up to GUI interfaces.

You could export your wallet for backup, dump private keys to a file, then cherry pick which addresses to re-import in a clean wallet.

Additionally, 1.0.6 offers the option to mine to a single address which would solve the problem of generating a new address for each mining payment. 1.0.6 is set to release sometime today. https://github.com/zcash/zcash/pull/1965

1 Like

Ah, you can also try listreceivedbyaddress 0 true to see a more complete list.

Regarding archiving addresses, perhaps you'd like to create a github ticket requesting this feature? https://github.com/zcash/zcash/issues/