filecoin-project / ref-fvm

Reference implementation of the Filecoin Virtual Machine
https://fvm.filecoin.io/
Other
376 stars 133 forks source link

resolution lookup failed when executing smart contract using a new ethereum address #1675

Open shepherliu opened 1 year ago

shepherliu commented 1 year ago

when I use a new ethereum address to execute the smart contract for public view functions through the JSON-RPC endpoints, I get this errors.

call to FilenameSpace.name errored: Internal JSON-RPC error. { "code": 1, "message": "failed to apply message: CallWithGas failed: call raw get actor: resolution lookup failed (t410f366hujro2xm2s6zhp5rlncq7nehm3zidztndcia): resolve address t410f366hujro2xm2s6zhp5rlncq7nehm3zidztndcia: actor not found" }

This maybe be not user friendly for the new visitors when they browse the fvm dapps and make them lost interests. It will be better if the actor can be auto created or the actor can be ignored when only execute the view functions.

arajasek commented 1 year ago

@shepherliu Thanks for the issue! I agree that this is quite cryptic and confusing, especially to new visitors. There's a few problems here:

Some thoughts / questions:

It will be better if the actor can be auto created or the actor can be ignored when only execute the view functions.

Auto-creation sounds difficult to do, because someone needs to be paying for the cost of that. Ignoring the send actor is possible, but a little tricky in Lotus (the client you're using) today, because the message "simulation" logic is used by a few different pieces that would break if this check was removed.