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

Stratum: submit share #6258

Closed
akandratovich opened this issue Aug 8, 2017 · 4 comments · Fixed by #6260
Closed

Stratum: submit share #6258

akandratovich opened this issue Aug 8, 2017 · 4 comments · Fixed by #6260
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.

Comments

@akandratovich
Copy link

akandratovich commented Aug 8, 2017

Hello, I'm using stratum protocol in Parity.
When I submit invalid work package, Parity returns me okay response, but should return failure.
In parity console I can read error message.

➜  telnet 127.0.0.1 8009
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
{"id": 1, "method": "mining.subscribe", "params": []}
{"result":["0x","0x0af13ffce1f58840c73dbe6620c1fbae71b1597c14f9288cfc24564d53fd752d","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000442c8c3c029690f2e7392750b8b733761883347c23be3b26167b60ceda2a","0x537"],"id":1}
{"id": 3, "method": "mining.authorize", "params": ["87d9d3abbd40849370e6b4bae08bb0659360a822.RIG","87d9d3abbd40849370e6b4bae08bb0659360a822.RIG"]}
{"result":true,"id":3}
{"id": 4, "method": "mining.submit", "params": ["87d9d3abbd40849370e6b4bae08bb0659360a822.RIG","0x","0xd98ed6f29e59f16a","0xf6d586828e6f68e17143f8879e1e5b4d39383fc318cf5770da54b1d2c06bcad8","0x29c5286a266e47da92601eb3eb006d459d60f084a1a559853e40954607212769"]}
{"result":true,"id":4}
{ "id": 521, "method": "mining.notify", "params": ["0x", "0x0af13ffce1f58840c73dbe6620c1fbae71b1597c14f9288cfc24564d53fd752d","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000442c8c3c029690f2e7392750b8b733761883347c23be3b26167b60ceda2a","0x537"] }
...
2017-08-08 19:58:14     0/25 peers   117 KiB chain 5 MiB db 0 bytes queue 448 bytes sync  RPC:  0 conn,  0 req/s,  59 µs
2017-08-08 19:58:44  Submitted solution rejected: Block unknown or out of date.
2017-08-08 19:58:44  submit_seal error: PowHashInvalid
2017-08-08 19:58:44     0/25 peers   117 KiB chain 5 MiB db 0 bytes queue 448 bytes sync  RPC:  0 conn,  0 req/s,  59 µs
...

I'm using Olympic chain. Main chain has the same behaviour.

[20:48:51] andrew in ~ $ parity --version
Parity
  version Parity/v1.7.0-beta-5f2cabd-20170727/x86_64-macos/rustc1.18.0
Copyright 2015, 2016, 2017 Parity Technologies (UK) Ltd
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

By Wood/Paronyan/Kotewicz/Drwięga/Volf
   Habermeier/Czaban/Greeff/Gotchac/Redmann

I think the problem cause is here (no error handling): https://github.com/paritytech/parity/blob/master/ethcore/src/miner/stratum.rs#L147

Unfortunately, I'm not familiar with Rust.

@5chdn 5chdn added F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust. labels Aug 8, 2017
@5chdn
Copy link
Contributor

5chdn commented Aug 8, 2017

Which version of Parity is that?

@akandratovich
Copy link
Author

@5chdn I've updated issue.

@akandratovich
Copy link
Author

I think the problem cause is here (no error handling): https://github.com/paritytech/parity/blob/master/ethcore/src/miner/stratum.rs#L147

Unfortunately, I'm not familiar with Rust.

@debris
Copy link
Collaborator

debris commented Aug 8, 2017

thanks for tips @Kondratovich . #6260 should fix the issue

arkpar added a commit that referenced this issue Aug 19, 2017
* overflow check in addition

* add test

* Unexpose methods on UI RPC. (#6295)

* Add more descriptive error when signing/decrypting using hw wallet.

* format instant change proofs correctly

* propagate stratum submit share error upstream, fixes #6258 (#6260)

* updated jsonrpc (#6264)

* Using multiple NTP servers (#6173)

* Small improvements to time estimation.

* Allow multiple NTP servers to be used.

* Removing boxing.

* Be nice.

* Be nicer.

* Update list of servers and add reference.

* Fix dapps CSP when UI is exposed externally (#6178)

* Allow embeding on any page when ui-hosts=all and fix dev_ui

* Fix tests.

* Fix cache path when using --base-path (#6212)

* Time should not contribue to overall status. (#6276)

* v1.7.1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants