Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncle block not showing on pool #274

Closed
mvilera opened this issue Jan 10, 2018 · 4 comments
Closed

Uncle block not showing on pool #274

mvilera opened this issue Jan 10, 2018 · 4 comments

Comments

@mvilera
Copy link

mvilera commented Jan 10, 2018

System information

Parity version: 1.8.3

Redis version: Redis server v=4.0.2

OS & Version: Ubuntu 16.04

Commit branch and hash: latest master commit.

Expected behaviour

All found blocks be shown and rewarded to miners.

Actual behaviour

Some uncle blocks are not being shown/rewarded by the pool.

Backtrace

Uncle block was found at 2018/01/10 1:05 AM

This is the log for the unlocker:

Unlocker.log

2018/01/10 00:50:01 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 00:50:01 Running with 1 threads
2018/01/10 00:50:01 Backend check reply: PONG
2018/01/10 00:50:01 Starting block unlocker
2018/01/10 00:50:01 Set block unlock interval to 10m0s
2018/01/10 00:50:01 No block candidates to unlock
2018/01/10 00:50:01 No immature blocks to credit miners
2018/01/10 01:00:01 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 01:00:01 Running with 1 threads
2018/01/10 01:00:01 Backend check reply: PONG
2018/01/10 01:00:01 Starting block unlocker
2018/01/10 01:00:01 Set block unlock interval to 10m0s
2018/01/10 01:00:01 No block candidates to unlock
2018/01/10 01:00:01 No immature blocks to credit miners
2018/01/10 01:10:01 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 01:10:01 Running with 1 threads
2018/01/10 01:10:01 Backend check reply: PONG
2018/01/10 01:10:01 Starting block unlocker
2018/01/10 01:10:01 Set block unlock interval to 10m0s
2018/01/10 01:10:02 No block candidates to unlock
2018/01/10 01:10:02 No immature blocks to credit miners
2018/01/10 01:20:01 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 01:20:01 Running with 1 threads
2018/01/10 01:20:01 Backend check reply: PONG
2018/01/10 01:20:01 Starting block unlocker
2018/01/10 01:20:01 Set block unlock interval to 10m0s
2018/01/10 01:20:01 No block candidates to unlock
2018/01/10 01:20:01 No immature blocks to credit miners
2018/01/10 01:30:01 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 01:30:01 Running with 1 threads
2018/01/10 01:30:01 Backend check reply: PONG
2018/01/10 01:30:01 Starting block unlocker
2018/01/10 01:30:01 Set block unlock interval to 10m0s
2018/01/10 01:30:01 No block candidates to unlock
2018/01/10 01:30:01 No immature blocks to credit miners
2018/01/10 01:40:01 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 01:40:01 Running with 1 threads
2018/01/10 01:40:01 Backend check reply: PONG
2018/01/10 01:40:01 Starting block unlocker
2018/01/10 01:40:01 Set block unlock interval to 10m0s
2018/01/10 01:40:01 No block candidates to unlock
2018/01/10 01:40:01 No immature blocks to credit miners
2018/01/10 01:50:01 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 01:50:01 Running with 1 threads
2018/01/10 01:50:01 Backend check reply: PONG
2018/01/10 01:50:01 Starting block unlocker
2018/01/10 01:50:01 Set block unlock interval to 10m0s
2018/01/10 01:50:01 No block candidates to unlock
2018/01/10 01:50:01 No immature blocks to credit miners
2018/01/10 02:00:02 Loading config: /home/user/open-ethereum-pool/config/unlocker.json
2018/01/10 02:00:02 Running with 1 threads
2018/01/10 02:00:02 Backend check reply: PONG
2018/01/10 02:00:02 Starting block unlocker
2018/01/10 02:00:02 Set block unlock interval to 10m0s
2018/01/10 02:00:02 No block candidates to unlock
2018/01/10 02:00:02 No immature blocks to credit miners

On stratum.log it only shows Valid shares from our clients, and new block broadcast jobs, nothing else.

I have found on this issue tracker another person with the same problem but there was no solution due to lack of information available, @sammy007 suggested it was possible to add this blocks manually by using ZSET routine of eth:block:candidate, could anyone provide me an example of this ZSET routine? I found the right line on redis.go which perform this operation but my Go skill is quite limited and don't understand how to mimic it.

Edit:

This is actually the error which caused the uncle not being included as a candidate

2018/01/10 00:57:33 Block submission failure at height 4883536 for 0xfc0bda9494ecfaa64c9406b58403fb0c804dc55e3bae29f9e28486bd8f1da876: Post http://xxx.xxx.xxx.xxx:7645: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

Any hint on what could be causing that timeout on Parity?

@kulisu
Copy link

kulisu commented Jan 10, 2018

127.0.0.1:6379> TYPE "eth:blocks:candidates"
zset
127.0.0.1:6379> ZRANGE "eth:blocks:candidates" 0 -1 withscores
1) "0x3279a1c8032e39c6:0x9c0321c526820a6ad6c6d508037b2a2698e8113c7ab993556c6b307acb5498d8:0xb851aa6c9908751ed01421a0ae9e99929b7e1b7848ced00946616e4e052deb76:1515580987:1940274824360475:536182650000000"
2) "4884804"

below columns could be found on etherchain and etherscan block explorer.

"Nonce:i_dont_know_maybe_mixDigest:PoW Mix Hash:TimeStamp:Difficulty:your_pool_total_shares"
"0x3279a1c8032e39c6:0x9c0321c526820a6ad6c6d508037b2a2698e8113c7ab993556c6b307acb5498d8:0xb851aa6c9908751ed01421a0ae9e99929b7e1b7848ced00946616e4e052deb76:1515580987:1940274824360475:536182650000000"

  • Nonce: 0x3279a1c8032e39c6
  • PoW Mix Hash: 0xb851aa6c9908751ed01421a0ae9e99929b7e1b7848ced00946616e4e052deb76
  • TimeStamp: 1515580987
  • Difficulty: 1515580987

second column could be set to 0x00000000000000000..snipped manually.
and you can unlock your mined block once you write above record back to Redis.

Chris

@mvilera
Copy link
Author

mvilera commented Jan 10, 2018

Thanks @kulisu you're the man!.

I have been looking through params definition and on miner.go found this:

nonceHex := params[0]
hashNoNonce := params[1]
mixDigest := params[2]

This are the 3 first parameters used on ZSET routine at writeBlock() (if they're not modified anywhere else), so the unknown field would be 'hashNoNonce', is there anyway to get this?

@mvilera
Copy link
Author

mvilera commented Jan 11, 2018

This is actually the error which caused the uncle not being included as a candidate

2018/01/10 00:57:33 Block submission failure at height 4883536 for 0xfc0bda9494ecfaa64c9406b58403fb0c804dc55e3bae29f9e28486bd8f1da876: Post http://xxx.xxx.xxx.xxx:7645: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

Any hint on what could be causing that timeout on Parity?

@kulisu
Copy link

kulisu commented Jan 11, 2018

This is actually the error which caused the uncle not being included as a candidate
Any hint on what could be causing that timeout on Parity?

increase your upstream timeout setting, and that problem wont happen again

"upstream": [
    {
      "name": "main",
      "url": "http://127.0.0.1:8545",
      "timeout": "90s"
    }
  ]

@mvilera mvilera closed this as completed Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants