lotus icon indicating copy to clipboard operation
lotus copied to clipboard

Handle different API version communication between lotus daemon & client

Open dineshshenoy opened this issue 4 years ago • 5 comments

Describe the bug Tried to import a 128MB file and then make a deal using the CLI. Got the following error using the interactive deal CLI ERROR: RPC error (-32601): method ‘Filecoin.ClientDealPieceCID’ not found

To Reproduce $ lotus client import /srv/reltest/128m_testfile.txt Import 6, Root bafykbzacebqqc6nio3n4vfextco6fvj27xansfsjhw7z2woj5ezcgue2a5pe2 $ lotus client deal Data CID (from lotus client import): bafykbzacebqqc6nio3n4vfextco6fvj27xansfsjhw7z2woj5ezcgue2a5pe2 .. calculating data size ERROR: RPC error (-32601): method 'Filecoin.ClientDealPieceCID' not found

Version (run lotus version): lotus version 1.1.2+git.90dd39d58 (1.1.3 release candidate)

dineshshenoy avatar Nov 11 '20 18:11 dineshshenoy

There was a mismatch between client and daemon. Daemon restarted fixed the problem

dineshshenoy avatar Nov 11 '20 18:11 dineshshenoy

Keeping open as a UX fix where the error message reports an API mismatch.

dineshshenoy avatar Nov 11 '20 19:11 dineshshenoy

I think we should always emit an error when the client is newer than the daemon -- though I am not sure whether this is communicated anywhere in the API in a way we can use.

Regarding the opposite: when a client is older than the daemon, this is more an issue of compatibility. And raises some bigger questions about the API:

Up till now, we have broken that API willy-nilly. I think in post release, we probably need to at minimum:

  1. Version the API itself, possibly with SemVer
  2. Build some infrastructure to test for API breakage
  3. Commit to not breaking it as much, or at least annoucing breakages whenever they happen.

The client, which may not always be the lotus CLI, should really just have a breaking API version it can work with -- we can accept a Lotus deamon that is slightly newer, as long as the API changes aren't breaking.

Thoughts?

hannahhoward avatar Nov 11 '20 20:11 hannahhoward

Sounds sensible to me!

pooja avatar Nov 12 '20 23:11 pooja

same is true for the miner and the daemon.

{"level":"warn","ts":"2020-11-16T02:43:28.006Z","logger":"providerstates","caller":"providerstates/provider_states.go:482","msg":"deal bafyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3i failed: error calling node: reserving funds: RPC error (-32601): method 'Filecoin.MarketReserveFunds' not found"}

miner 1.1.3 - daemon 1.1.2

shouldn't there be a different version (like 1.2.0) if the two are not compatible with each other?

f8-ptrk avatar Nov 16 '20 08:11 f8-ptrk