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

Mining false on authority nodes in POA chain #7939

Closed
AyushyaChitransh opened this issue Feb 19, 2018 · 1 comment
Closed

Mining false on authority nodes in POA chain #7939

AyushyaChitransh opened this issue Feb 19, 2018 · 1 comment
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M6-rpcapi 📣 RPC API. P7-nicetohave 🐕 Issue is worth doing eventually.
Milestone

Comments

@AyushyaChitransh
Copy link

AyushyaChitransh commented Feb 19, 2018

I'm running:

  • Which Parity version?: v1.8.4-beta-c74c8c1-20171211/x86_64-linux-gnu/rustc1.22.1
  • Which operating system?: Linux
  • How installed?: via installer
  • Are you fully synchronized?: NA
  • Which network are you connected to?: Private
  • Did you try to restart the node?: NA

Command:

curl --data '{"method":"eth_mining","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545

Expected Behavior

eth_mining returns true if validator node is actively issuing blocks.

Output:

{"jsonrpc":"2.0","result":true,"id":1}

Actual behavior

eth_mining returns false for authority nodes.

Output:

{"jsonrpc":"2.0","result":false,"id":1}

@5chdn 5chdn added this to the 1.10 milestone Feb 19, 2018
@5chdn 5chdn added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. M6-rpcapi 📣 RPC API. P7-nicetohave 🐕 Issue is worth doing eventually. F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. and removed Z1-question 🙋‍♀️ Issue is a question. Closer should answer. labels Feb 19, 2018
@5chdn 5chdn modified the milestones: 1.10, 1.11 Feb 19, 2018
@5chdn 5chdn modified the milestones: 1.11, 1.12 Mar 1, 2018
@AyushyaChitransh
Copy link
Author

The function which requires change is most probably this one:

https://github.com/paritytech/parity/blob/14361cc7b154af46ea0efca79d1c297d32181b40/ethcore/src/miner/miner.rs#L951

fn is_currently_sealing(&self) -> bool {
	self.sealing.lock().queue.is_in_use()
}

I think the above function does not take into account internal sealing. Not sure though. Here are the miner logs from authority nodes which might help in figuring out the issue:

2018-04-24 06:26:10 UTC Verifier #1 INFO import  Imported #1702086 09a6…4e05 (0 txs, 0.00 Mgas, 0.57 ms, 0.57 KiB)
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  update_sealing
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  requires_reseal: sealing enabled
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  requires_reseal: should_disable_sealing=false; best_block=1702086, last_request=0
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  update_sealing: preparing a block
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  prepare_block: No existing work - making new block
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  Pushed 0/0 transactions
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  update_sealing: engine indicates internal sealing
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  seal_block_internally: attempting internal seal.
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  chain_new_blocks
2018-04-24 06:26:15 UTC IO Worker #3 DEBUG miner  minimal_gas_price: recalibrating...
2018-04-24 06:26:15 UTC IO Worker #3 DEBUG miner  minimal_gas_price: Got gas price! 0
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  update_sealing
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  requires_reseal: sealing enabled
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  requires_reseal: should_disable_sealing=false; best_block=1702087, last_request=0
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  update_sealing: preparing a block
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  prepare_block: No existing work - making new block
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  Pushed 0/0 transactions
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  update_sealing: engine indicates internal sealing
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  seal_block_internally: attempting internal seal.

This authority sealed block number #1702087. So logs before and after the block issuance have been provided.

2018-04-24 06:26:15 UTC IO Worker #3 INFO import  Imported #1702087 3c07…2b5d (0 txs, 0.00 Mgas, 4.49 ms, 0.57 KiB)
2018-04-24 06:26:15 UTC IO Worker #3 TRACE miner  update_sealing: imported internally sealed block
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  update_sealing
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  requires_reseal: sealing enabled
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  requires_reseal: should_disable_sealing=false; best_block=1702087, last_request=0
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  update_sealing: preparing a block
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  prepare_block: No existing work - making new block
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  Pushed 0/0 transactions
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  update_sealing: engine indicates internal sealing
2018-04-24 06:26:20 UTC IO Worker #0 TRACE miner  seal_block_internally: attempting internal seal.
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  chain_new_blocks
2018-04-24 06:26:20 UTC Verifier #0 DEBUG miner  minimal_gas_price: recalibrating...
2018-04-24 06:26:20 UTC Verifier #0 DEBUG miner  minimal_gas_price: Got gas price! 0
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  update_sealing
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  requires_reseal: sealing enabled
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  requires_reseal: should_disable_sealing=false; best_block=1702088, last_request=0
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  update_sealing: preparing a block
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  prepare_block: No existing work - making new block
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  Pushed 0/0 transactions
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  update_sealing: engine indicates internal sealing
2018-04-24 06:26:20 UTC Verifier #0 TRACE miner  seal_block_internally: attempting internal seal.
2018-04-24 06:26:20 UTC Verifier #0 INFO import  Imported #1702088 2368…6bdb (0 txs, 0.00 Mgas, 0.56 ms, 0.57 KiB)

@5chdn 5chdn modified the milestones: 1.12, 1.13 Apr 24, 2018
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. M6-rpcapi 📣 RPC API. P7-nicetohave 🐕 Issue is worth doing eventually.
Projects
None yet
Development

No branches or pull requests

2 participants