Walletwasabi: Does Testnet version work properly ?

Created on 19 Dec 2019  路  8Comments  路  Source: zkSNACKs/WalletWasabi

General Description

It seems that Testnet backend stuck on 1615952, am I right?

Thank you.

debug priority

Most helpful comment

@lontivero found the bug!

image

All 8 comments

Yes, something is wrong.

2019-12-18 01:16:59 INFO        IndexBuilderService (295)       Created filter for block: 1615952.
2019-12-18 06:08:58 INFO        CoordinatorRound (1163) Round (29674): Alice (0.32775115) added.
2019-12-18 06:09:31 INFO        CoordinatorRound (1243) Round (29674): 1 alices are removed.
2019-12-18 13:47:44 INFO        CoordinatorRound (496)  Round (29674): InputRegistration timed out after 86400 seconds. Aborting...
2019-12-18 13:47:44 INFO        CoordinatorRound (201)  New round (29676) is created.
        BaseDenomination: 0.01 BTC.
        AdjustedConfirmationTarget: 1008.
        CoordinatorFeePercent: 0.003%.
        AnonymitySet: 2.
2019-12-18 13:47:44 INFO        CoordinatorRound (514)  Round (29674): Aborted. Reason: Only 0 Alices registered..
2019-12-18 13:47:44 INFO        CoordinatorRound (228)  Round (29676): Phase change requested: InputRegistration.
2019-12-18 13:47:44 INFO        CoordinatorRound (433)  Round (29676): Phase initialized: InputRegistration.
2019-12-18 13:49:10 INFO        CoordinatorRound (496)  Round (29675): InputRegistration timed out after 86400 seconds. Aborting...
2019-12-18 13:49:10 INFO        CoordinatorRound (201)  New round (29677) is created.
        BaseDenomination: 0.01 BTC.
        AdjustedConfirmationTarget: 1008.
        CoordinatorFeePercent: 0.003%.
        AnonymitySet: 2.
2019-12-18 13:49:10 INFO        CoordinatorRound (514)  Round (29675): Aborted. Reason: Only 0 Alices registered..
2019-12-18 13:49:10 INFO        CoordinatorRound (228)  Round (29677): Phase change requested: InputRegistration.
2019-12-18 13:49:10 INFO        CoordinatorRound (433)  Round (29677): Phase initialized: InputRegistration.
2019-12-19 06:22:44 INFO        CoordinatorRound (1163) Round (29676): Alice (0.03019636) added.
2019-12-19 06:34:28 INFO        CoordinatorRound (1243) Round (29676): 1 alices are removed.
2019-12-19 12:48:58 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 12:48:58 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 12:48:58 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 12:48:58 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 12:48:58 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 12:48:58 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 13:47:44 INFO        CoordinatorRound (496)  Round (29676): InputRegistration timed out after 86400 seconds. Aborting...
2019-12-19 13:47:44 INFO        CoordinatorRound (201)  New round (29678) is created.
        BaseDenomination: 0.01 BTC.
        AdjustedConfirmationTarget: 1008.
        CoordinatorFeePercent: 0.003%.
        AnonymitySet: 2.
2019-12-19 13:47:44 INFO        CoordinatorRound (514)  Round (29676): Aborted. Reason: Only 0 Alices registered..
2019-12-19 13:47:44 INFO        CoordinatorRound (228)  Round (29678): Phase change requested: InputRegistration.
2019-12-19 13:47:44 INFO        CoordinatorRound (433)  Round (29678): Phase initialized: InputRegistration.
2019-12-19 13:49:10 INFO        CoordinatorRound (496)  Round (29677): InputRegistration timed out after 86400 seconds. Aborting...
2019-12-19 13:49:10 INFO        CoordinatorRound (201)  New round (29679) is created.
        BaseDenomination: 0.01 BTC.
        AdjustedConfirmationTarget: 1008.
        CoordinatorFeePercent: 0.003%.
        AnonymitySet: 2.
2019-12-19 13:49:10 INFO        CoordinatorRound (514)  Round (29677): Aborted. Reason: Only 0 Alices registered..
2019-12-19 13:49:10 INFO        CoordinatorRound (228)  Round (29679): Phase change requested: InputRegistration.
2019-12-19 13:49:10 INFO        CoordinatorRound (433)  Round (29679): Phase initialized: InputRegistration.
2019-12-19 15:14:59 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 15:14:59 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 15:14:59 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 15:14:59 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 15:14:59 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---
2019-12-19 15:14:59 WARNING     InitConfigStartupTask (65)      System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (No such mempool or blockchain transaction. Use gettransaction for wallet transactions.)
 ---> NBitcoin.RPC.RPCException: No such mempool or blockchain transaction. Use gettransaction for wallet transactions.
   at NBitcoin.RPC.RPCResponse.ThrowIfError()
   at NBitcoin.RPC.RPCClient.SendCommandAsyncCore(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.SendCommandAsync(RPCRequest request, Boolean throwIfRPCError)
   at NBitcoin.RPC.RPCClient.GetRawTransactionAsync(uint256 txid, uint256 blockId, Boolean throwIfNotFound)
   --- End of inner exception stack trace ---

So an unobserved task exception comes from NBitcoin's GetRawTransactionAsync. A batch request fails.

There are 2 places we are using getrawtxasync and both places we are using it with btaching, I'll only copy here the relevant one because the other one is in a constructor so it must fail here:

tasks.Add(batchingRpc.GetRawTransactionAsync(txid));    C:\Users\user\Desktop\WalletWasabi\WalletWasabi.Backend\Controllers\BlockchainController.cs 265 30

This happens when we don't find a tx a user asks for. Actually the config is ugly, but the code works properly. So this is just the result of not being filters built, which brings us back to the original post, the filters are stuck. I don't want to restart the server, because it'd be good to find the issue while it's happening.

Core is good. Wasabi is not:

user@WalletWasabi:~$ bitcoin-cli getblockcount
1629144
user@WalletWasabi:~$ tail -1 .walletwasabi/backend/IndexBuilderService/IndexTestNet.dat
1615952:0000000021a31854be9d00bcdeca276097323433694684f149054f561d78c436:012e5630:0000000023694295c455712633f49746ff2dacb41c28349a5334bbd9d22cfe0e:1576631819

I am out of ideas what else to check. @lontivero @molnard?

Block 0000000021a31854be9d00bcdeca276097323433694684f149054f561d78c436 exists, so it's not a reorg issue: https://testnet.smartbit.com.au/block/0000000021a31854be9d00bcdeca276097323433694684f149054f561d78c436

All processes (including of course the Wasabi process) is running:

user@WalletWasabi:~$ pgrep -ilfa tor && pgrep -ilfa bitcoin && pgrep -ilfa wasabi && pgrep -ilfa nginx
1309 tor
11227 bitcoind
11325 tail -f /home/user/.bitcoin/debug.log
25877 /usr/bin/dotnet /home/user/WalletWasabi/WalletWasabi.Backend/bin/Release/netcoreapp3.1/publish/WalletWasabi.Backend.dll
25785 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
25786 nginx: worker process
25787 nginx: worker process

LiveServerTests pass

API calls are working fine: https://wasabiwallet.co/swagger/index.html

Bitcoin Core logs: getbestblockhash comes frequently and getblockchaininfo comes about every 5 minutes. We're not calling periodically getblockchaininfo from anywhere so it can only come from the index builder. Which means the block notifier and the index builder works at least it gets somewhere here:

// If not synchronized or already 5 min passed since last update, get the latest blockchain info.
if (!syncInfo.IsCoreSynchornized || syncInfo.BlockchainInfoUpdated - DateTimeOffset.UtcNow > TimeSpan.FromMinutes(5))
{
    syncInfo = await GetSyncInfoAsync();
}

if (syncInfo.BlockCount - heightToRequest <= 100)
{
    // Both Wasabi and our Core node is in sync. Start doing stuff through P2P from now on.
    if (syncInfo.IsCoreSynchornized && syncInfo.BlockCount == heightToRequest - 1)
    {
        syncInfo = await GetSyncInfoAsync();
        // Double it to make sure not to accidentally miss any notification.
        if (syncInfo.IsCoreSynchornized && syncInfo.BlockCount == heightToRequest - 1)
        {
            // Mark the process notstarted, so it can be started again and finally block can mark it is stopped.
            Interlocked.Exchange(ref _running, 0);
            return;
        }
    }

    // Mark the synchronizing process is working with immature blocks from now on.
    isImmature = true;
}

But never gets here:


Block block = await RpcClient.GetBlockAsync(heightToRequest);

// Reorg check, except if we're requesting the starting height, because then the "currentHash" wouldn't exist.
if (heightToRequest != StartingHeight && currentHash != block.Header.HashPrevBlock)
{

Thus the bad code should be in the above snippet.

@lontivero found the bug!

image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yahiheb picture yahiheb  路  3Comments

MaxHillebrand picture MaxHillebrand  路  3Comments

molnard picture molnard  路  3Comments

kenny47 picture kenny47  路  3Comments

yahiheb picture yahiheb  路  3Comments