celestia-node icon indicating copy to clipboard operation
celestia-node copied to clipboard

bug: node starts with 0 balance, then funded, but can't submit blobs

Open jcstein opened this issue 7 months ago • 2 comments

Celestia Node version

v0.22.2

OS

macOS & ubuntu-WSL2

Install tools

docs

Others

No response

Steps to reproduce it

  1. create new key with: cel-key add empty --node.type light --p2p.network mocha
  2. start node celestia light start --p2p.network mocha --core.ip rpc-mocha.pops.one --core.port 9090 --keyring.keyname empty
  3. check balance
celestia state balance
{
  "result": {
    "denom": "utia",
    "amount": "0"
  }
}
  1. use faucet to fund wallet
  2. check balance again
celestia state balance
{
  "result": {
    "denom": "utia",
    "amount": "1000000"
  }
}
  1. while node is still running, try and submit blob celestia blob submit 676d 676d result shows signer not found and unable to submit blob
{
  "result": "account for signer celestia1jv2s0flrfw9wt9ue0qtnkgwufxspfznaejnqlq not found"
}

I know that this means account isn't funded, but the error itself isn't clear and the go code means that this couldn't find the signer, not that the account isn't funded.

Expected result

  1. signer is found even if 0 balance,
  2. if 0 balance, error should return clearly that there isn't a balance, not that the signer wasn't found
  3. if balance, blob should submit, even if node started with 0 balance

Actual result

error returns saying signer isn't found, when node account is both funded and signer is there

Relevant log output

2025-05-08T12:53:14.090-0400	WARN	rpc	[email protected]/handler.go:474	error in RPC call to 'blob.Submit': account for signer celestia1jv2s0flrfw9wt9ue0qtnkgwufxspfznaejnqlq not found

Is the node "stuck"? Has it stopped syncing?

No response

Notes

restarting the node and then submitting works, so this seems to be some issue with signer accessibility and fetching balance from core endpoint

jcstein avatar May 08 '25 17:05 jcstein

I see what happens - the TxClient skips adding the account entirely if it doesn't exist but it still successfully creates the signer - so the logic node had before where we'd nil out the signer in case it couldn't be set up with a "non-existent" account. Now, the TxClient just loops over the account and if it's not found, ignores error and continues to setup signer. It can lazy-load the account later on a tx submission, BUT if we query the account on the TxClient via AccountByAddress (which we do when submitting a PFB), it looks in its map of existing accounts and returns nil bc it never added the account.

I don't see why we can't just add the account name to the signer even if it's not existing yet as we lazily load the account anyway on tx submission.

renaynay avatar May 13 '25 18:05 renaynay

Should be closed once we'll bump app version with these changes https://github.com/celestiaorg/celestia-app/pull/4854

vgonkivs avatar Jun 24 '25 10:06 vgonkivs