Trying to understand: eth_getWork and eth_submitWork

Hey guys im trying to understand the ethereum mining process.

1. Question:
eth_getWork gives this example output:

{
"id":1,
"jsonrpc":"2.0",
"result": [
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"0x5EED00000000000000000000000000005EED0000000000000000000000000000",
"0xd1ff1c01710000000000000000000000d1ff1c01710000000000000000000000"
]
}
And in this result there is the target part: DATA, 32 Bytes - the boundary condition ("target"), 2^256 / difficulty.

Let's say my miner is hashing at 20mh/s. How can i reqeuest Work which fits the miner speed or is it possible to replace the target with a new one based on the miner hashrate? When you can replace it: How to calculate a valid target (based on miner hashrate / miner difficulty) to replace it?


2. Question:
eth_submitWork requires this data:

params: [
"0x0000000000000001",
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"
]
Is this data a share or the solution for a block? If it is a share how can you determine the difficulty of this share?
Sign In or Register to comment.