Skip to content

give better error when signet is down when depositing on a sidechain#1823

Open
ekulkisnek wants to merge 1 commit into
LayerTwo-Labs:masterfrom
ekulkisnek:fix/bitwindow-sidechain-deposit-errors
Open

give better error when signet is down when depositing on a sidechain#1823
ekulkisnek wants to merge 1 commit into
LayerTwo-Labs:masterfrom
ekulkisnek:fix/bitwindow-sidechain-deposit-errors

Conversation

@ekulkisnek

Copy link
Copy Markdown
Contributor

The signet was down and there were two of the same transaction in the mempool.

When blocks are stalled this pr edits the behavior to emit a better error

Comment on lines +12 to +27
/// Maps orchestrator [WalletMetadata.walletType] strings to [BinaryType].
/// Proto values are `enforcer` / `bitcoinCore` / `watchOnly`, not enum names.
BinaryType walletBinaryTypeFromProto(String raw) {
switch (raw) {
case 'enforcer':
return BinaryType.BINARY_TYPE_ENFORCER;
case 'bitcoinCore':
case 'bitcoind':
return BinaryType.BINARY_TYPE_BITCOIND;
case 'watchOnly':
return BinaryType.BINARY_TYPE_BITCOIND;
default:
return BinaryType.BINARY_TYPE_BITCOIND;
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should rebase on master and remove this. Not needed anymore with the newest types. Same goes for walletTypeRaw and the test

Comment thread bitwindow/server/api/wallet/wallet.go Outdated
Comment on lines +1875 to +1879
if isStaleWalletTransactionError(err) {
txs = connect.NewResponse(&validatorpb.ListTransactionsResponse{})
} else {
return nil, err
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled in the client(s)!

An error is not the same as zero transactions, and can mislead people to thinking their deposits are gone. Only zero transactions should be zero transactions!

Comment on lines +82 to +86
} catch (e, st) {
// Deposits are optional for listing active sidechains; enforcer may
// return "no treasury utxo yet" before the first deposit on a slot.
log.w('listSidechainDeposits slot ${sidechain.slot}: $e', stackTrace: st);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we should specifically handle the no treasury utxo yet error message, or save the error message and display it to the user. Not swallow it.

@ekulkisnek
ekulkisnek force-pushed the fix/bitwindow-sidechain-deposit-errors branch from 89fcf0f to 6c312be Compare June 16, 2026 19:19
@ekulkisnek
ekulkisnek requested a review from octobocto June 27, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants