Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: jnano on October 08, 2022, 09:29:55 PM



Title: "reconsiderblock" in Core multi-wallet
Post by: jnano on October 08, 2022, 09:29:55 PM
In a multi-wallet file configuration, I executed "reconsiderblock".
The console said "Executing command using ... wallet", making it appear only one is affected.
I chose another wallet file and executed the same command again.

Despite of what it says, does it only affect the single selected wallet or all of them?

If just one, what are the implications?


Background:

This is on v0.18.

Core crashed during catching up due to being out of space for the UTXO db. I fixed it and restarted.
It recovered and continued syncing blocks for about a minute, then stalled doing nothing.
The log revealed repeated "ERROR: AcceptBlockHeader: block ... is marked invalid" for the same block.
I restarted, the same situation continued, so I executed "reconsiderblock".
It seemed to resume okay.





Title: Re: "reconsiderblock" in Core multi-wallet
Post by: n0nce on October 08, 2022, 11:48:06 PM
In a multi-wallet file configuration, I executed "reconsiderblock".
The console said "Executing command using ... wallet", making it appear only one is affected.
I chose another wallet file and executed the same command again.

Despite of what it says, does it only affect the single selected wallet or all of them?
The block status (valid or not) shouldn't be tied to a specific wallet, no. I don't see why it should.

If just one, what are the implications?
The implication of the command is that it marks a block as 'to be reconsidered', e.g. if it was marked invalid through violating a consensus rule. It will thus be checked again.

Core crashed during catching up due to being out of space for the UTXO db. I fixed it and restarted.
It recovered and continued syncing blocks for about a minute, then stalled doing nothing.
The log revealed repeated "ERROR: AcceptBlockHeader: block ... is marked invalid" for the same block.
I restarted, the same situation continued, so I executed "reconsiderblock".
It seemed to resume okay.
It's possible that a block was corrupted due to unexpected exit of Bitcoin Core. Does it run normally now? Or does the issue persist?


Title: Re: "reconsiderblock" in Core multi-wallet
Post by: nc50lc on October 09, 2022, 03:37:56 AM
The console said "Executing command using ... wallet", making it appear only one is affected.
I chose another wallet file and executed the same command again.

Despite of what it says, does it only affect the single selected wallet or all of them?
The message will appear regardless if the command used is a wallet rpc or not, if you're using the GUI.
That's just a note to mention which wallet is selected in the drop-down menu above it.
But will only appear once until another wallet is selected.

If "(none)" is selected, it will say "Executing command without any wallet" instead.

Reference code: github.com/bitcoin/bitcoin/blob/master/src/qt/rpcconsole.cpp#L1031-L1038 (https://github.com/bitcoin/bitcoin/blob/73b61717a977fc9d23f1bae3f8620641a9dee1f3/src/qt/rpcconsole.cpp#L1031-L1038)

To see if a command is actually wallet-specific, enter help in the console;
Those under == Wallet == are the commands that affects only the selected wallet.


Title: Re: "reconsiderblock" in Core multi-wallet
Post by: jnano on October 09, 2022, 02:32:06 PM
Thanks.

It's possible that a block was corrupted due to unexpected exit of Bitcoin Core.
While it quit automatically due to the abnormal condition, it's still a graceful exit as evident by having everything logged until the end. Yet it always happens when out of space, so evidently the cleanup isn't good.

But it was on an older version. Maybe fixed in newer ones.

Quote
Does it run normally now? Or does the issue persist?
After "reconsiderblock" it's fine as far as I can tell, but not without it.


That's just a note to mention which wallet is selected in the drop-down menu above it.
So it's sort of a bug or anti-feature in the case of non-wallet commands.

After a cursory look, it seems it may be possible to decide whether to show that "current wallet" console message based on CRPCCommand.category.


Title: Re: "reconsiderblock" in Core multi-wallet
Post by: nc50lc on October 10, 2022, 02:26:40 AM
That's just a note to mention which wallet is selected in the drop-down menu above it.
So it's sort of a bug or anti-feature in the case of non-wallet commands.
I think it's a way to show that the command executed in the console is equivalent to bitcoin-cli with --rpc-wallet arg.
Because in bitcoin-cli, you can also add rpc-wallet regardless if the command is a wallet rpc or not.


Title: Re: "reconsiderblock" in Core multi-wallet
Post by: ABCbits on October 10, 2022, 12:09:49 PM
Thanks.

It's possible that a block was corrupted due to unexpected exit of Bitcoin Core.
While it quit automatically due to the abnormal condition, it's still a graceful exit as evident by having everything logged until the end. Yet it always happens when out of space, so evidently the cleanup isn't good.

But it was on an older version. Maybe fixed in newer ones.

I did quick search and few possible error/corruption due to out of storage space isn't fixed yet, https://github.com/bitcoin/bitcoin/issues/26112 (https://github.com/bitcoin/bitcoin/issues/26112).

That's just a note to mention which wallet is selected in the drop-down menu above it.
So it's sort of a bug or anti-feature in the case of non-wallet commands.

I'd guess it's easier/faster to code function which show such message on all command.


Title: Re: "reconsiderblock" in Core multi-wallet
Post by: jnano on October 18, 2022, 12:01:36 AM
I'd guess it's easier/faster to code function which show such message on all command.
Easier, but misleading.

I did quick search and few possible error/corruption due to out of storage space isn't fixed yet, https://github.com/bitcoin/bitcoin/issues/26112 (https://github.com/bitcoin/bitcoin/issues/26112).
Interesting that the reported out of space condition there is also on writing to the chainset.
And also there reconsiderblock is reported as being good enough.