Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

setMode(offline) results in: Cannot sleep - syncing ongoing #10687

Closed
MatthiasLohr opened this issue May 22, 2019 · 4 comments · Fixed by #10814
Closed

setMode(offline) results in: Cannot sleep - syncing ongoing #10687

MatthiasLohr opened this issue May 22, 2019 · 4 comments · Fixed by #10814
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Milestone

Comments

@MatthiasLohr
Copy link

I want to control parity's syncing behavior with the parity_setMode api call (https://wiki.parity.io/JSONRPC-parity_set-module#parity_setmode). But this does not work reliable.

System Details

  • Parity Ethereum version: v2.5.1
  • Operating system: Linux (Ubuntu 18.04 LTS)
  • Installation: docker
  • Fully synchronized: no
  • Network: ethereum
  • Restarted: no

Actual Behavior

Calling parity_setMode('offline') only stops syncing if the queue size is small enough (https://github.com/paritytech/parity-ethereum/blob/21a27fee9f0e23777d9f14b3d3d74fa3d1b63a9d/ethcore/src/client/client.rs#L1211).

Expected Behavior

If I call parity_setMode('offline') I would except that the sync process stops - regardless of queue size. If I want to stop the node, I'm completely ok with throwing the queue contents away. I can also see no reason for this limitation.

Further Notes

  • The current behavior should be documented, there's nothing about this limitation
  • One solution could be to add a force=True parameter
@SvenPeldszus
Copy link

I also had this struggle, hopefully you can fix this behavior soon or add something like a "force" parameter

@jam10o-new jam10o-new added F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. labels May 22, 2019
@jam10o-new jam10o-new added this to the 2.6 milestone May 22, 2019
@MatthiasLohr
Copy link
Author

@joshua-mir, thanks for scheduling this! Any idea when 2.6 will be released?

@jam10o-new
Copy link
Contributor

jam10o-new commented May 22, 2019

@MatthiasLohr we don't use milestones to schedule features, just look at some of our older open issues 😅- they are implemented when they are implemented. They are primarily used to know which branch to backport features if they are implemented - so new features part of the 2.6 milestone, if labelled for backporting, would end up in 2.5.x Beta, and bugfixes would be in the 2.4.x Stable branch.

This process is currently in flux however, so most new features and fixes are sitting in nightly for now.

@MatthiasLohr
Copy link
Author

Just found out there's also a bug here: If I set the mode via parity_setMode to offline and I get this error message, I would expect that parity_mode still says active - but it says offline (while parity is still syncing)!

This was referenced Jun 11, 2019
dvdplm added a commit that referenced this issue Jun 28, 2019
…leep

Closes #10687

`sleep()` is called from several places but when called from `disable()` or through the `setMode` RPC, we should ignore queue contents and go to sleep.
dvdplm added a commit that referenced this issue Jul 2, 2019
…leep (#10814)

Closes #10687

`sleep()` is called from several places but when called from `disable()` or through the `setMode` RPC, we should ignore queue contents and go to sleep.
s3krit pushed a commit that referenced this issue Aug 12, 2019
…leep (#10814)

Closes #10687

`sleep()` is called from several places but when called from `disable()` or through the `setMode` RPC, we should ignore queue contents and go to sleep.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. F8-enhancement 🎊 An additional feature request. M4-core ⛓ Core client code / Rust. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
3 participants