lotus
lotus copied to clipboard
Handle different API version communication between lotus daemon & client
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)
There was a mismatch between client and daemon. Daemon restarted fixed the problem
Keeping open as a UX fix where the error message reports an API mismatch.
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:
- Version the API itself, possibly with SemVer
- Build some infrastructure to test for API breakage
- 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?
Sounds sensible to me!
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?