Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message enhancement: "actor not found" (aka Insufficient FIL) #8817

Closed
8 of 18 tasks
wesfloyd opened this issue Jun 7, 2022 · 1 comment · Fixed by #8830
Closed
8 of 18 tasks

Error message enhancement: "actor not found" (aka Insufficient FIL) #8817

wesfloyd opened this issue Jun 7, 2022 · 1 comment · Fixed by #8830
Assignees
Labels
area/ux Area: UX kind/bug Kind: Bug P3 P3: Might get resolved

Comments

@wesfloyd
Copy link

wesfloyd commented Jun 7, 2022

Checklist

  • This is not a security-related bug/issue. If it is, please follow please follow the security policy.
  • This is not a question or a support request. If you have any lotus related questions, please ask in the lotus forum.
  • This is not a new feature request. If it is, please file a feature request instead.
  • This is not an enhancement request. If it is, please file a improvement suggestion instead.
  • I have searched on the issue tracker and the lotus forum, and there is no existing related issue or discussion.
  • I am running the Latest release, or the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
  • I did not make any code changes to lotus.

Lotus component

  • lotus daemon - chain sync
  • lotus miner - mining and block production
  • lotus miner/worker - sealing
  • lotus miner - proving(WindowPoSt)
  • lotus miner/market - storage deal
  • lotus miner/market - retrieval deal
  • lotus miner/market - data transfer
  • lotus client
  • lotus JSON-RPC API
  • lotus message management (mpool)
  • Other

Lotus Version

v1.15.3

Describe the Bug

To reproduce:
Attempting to create a Lotus deal with no FIL in my wallet I encountered the error "resolve address f1qim...jjy: actor not found"

Expected result:
Error message would inform the user they have insufficient FIL in their wallet. E.g. "Insufficient funds in wallet for this transaction"

Actual result:
Error message does not communicate the user's issue (mistake)
"ERROR: resolve address f1qim...jjy: actor not found"

wfmb14:launchpad wes$ lotus client deal
Data CID (from lotus client import): bafykbzacebp52galmm6yb5kqr46s7n3hglgv43wyos7zvywlrdvmlom4ficb6
.. calculating data size
Deal duration (days): 180
ERROR: resolve address f1qim6rnkdnqk5mgo6b2675jxvw3xaefhrwozljjy: actor not found

Logging Information

messagepool
disputer
bitswap
bs:sprmgr
fsm
peerstore/ds
blockservice
cmds/http
dagstore/upgrader
dht/RtRefreshManager
fsjournal
engine
graphsync_allocator
badger
chainxchg
rpcenc
relay
preseal
gs-queryexecutor
miner
market_adapter
go-legs/head
pubsub
dht.pb
retrievaladapter
client
idxprov
retrieval
incrt
p2p-holepunch
rcmgr
upgrader
mocknet
filestore
bs:peermgr
retrieval_network
partialfile
repo
fil-consensus
metrics-prometheus
swarm2
peerstore
data-transfer
gs-reconciledlaoder
fsutil
bitswap_network
sub
provider/engine
cli
markets-rtvl-reval
build
statetree
chainstore
advmgr
actors
gs-notifications
payment-channel-settler
basichost
blankhost
boguskey
fullnode
bs:sess
retrieval-discovery
drand
builder
metrics
tarutil
rand
connmgr
p2p-config
events
storageadapter
discovery
routing/record
pathresolv
hello
ffi-wrapper
autonat
system
storageminer
go-legs-httpsync
data_transfer_network
backupds
ipns
wallet
retrievalmarket_impl
chunk
stores
diversityFilter
nat
gen
go-legs
paych
storagemarket_network
providers
gs_request_executor
go-legs-dtsync
lock
table
autorelay
sectoraccessor
chain
evtsm
wallet-ledger
retrieval-fsm
storagemarket_impl
go-legs-gpubsub
watchdog
test-logger
alerting
vm
reuseport-transport
main
cmds
beacon
cliutil
dagstore
dt_graphsync
graphsync
piecestore
importmgr
ffiwrapper
messagesigner
genesis
unixfs
ulimit
tcp-tpt
conngater
dt-impl
blockstore
amt
quic-transport
eventlog
auth
statemgr
tracing
paramfetch
pstoremanager
ping
p2pnode
splitstore
chunker/cached-entries-chunker
types
badgerbs
markets
sectors
net/identify
markets-rtvl
graphsync_network
rpc
storagemrkt
panic-reporter
dht
providerstates
routedhost
peermgr
net/conngater
storedask
modules
cborrrpc
p2p-circuit
dt-chanmon
indexer/schema
node

Repo Steps

  1. Run '...'

  2. Do '...'

  3. See error '...'
    ...

  4. Run: attempt to create a Lotus deal with no FIL in the wallet: "lotus client deal"

  5. See "ERROR: resolve address f1qim...jjy: actor not found"

@rjan90 rjan90 added area/ux Area: UX P3 P3: Might get resolved and removed need/triage labels Jun 9, 2022
@rjan90 rjan90 self-assigned this Jun 9, 2022
@rjan90
Copy link
Contributor

rjan90 commented Jun 9, 2022

Hey @wesfloyd! Thanks for the issue report. I agree that the error message could be more describing in this context, and that we could describe better that a fresh wallet needs to have some funds (or DataCap) sent to it to be initialized/recognized by the chain.

I also think this error should be caught a bit earlier, instead of halfway through the lotus client deal flow. It seems like we do not check if the actor (address in this case) is on chain before starting the uiLoop:

lotus/cli/client.go

Lines 547 to 565 in e3f1eb2

var a address.Address
if from := cctx.String("from"); from != "" {
faddr, err := address.NewFromString(from)
if err != nil {
return xerrors.Errorf("failed to parse 'from' address: %w", err)
}
a = faddr
} else {
def, err := api.WalletDefaultAddress(ctx)
if err != nil {
return err
}
a = def
}
fromBal, err := api.WalletBalance(ctx, a)
if err != nil {
return xerrors.Errorf("checking from address balance: %w", err)
}

So it only errors out when we get to this part in the uiLoop when checking if the given address has a datacap:

lotus/cli/client.go

Lines 640 to 642 in e3f1eb2

dcap, err := api.StateVerifiedClientStatus(ctx, a, ts.Key())
if err != nil {
return err

rjan90 added a commit that referenced this issue Jun 9, 2022
Checks if the address used in `lotus client deal` is "initialized" on-chain before running the `uiLoop`. Resolves #8817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Area: UX kind/bug Kind: Bug P3 P3: Might get resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants