params: ["agent", null]
result: [null, "nonce1", "nonce2 size"]
nonce_1 is first part of the block header nonce in hex.
request:
{
"id": 1,
"method": "mining.subscribe",
"params": ["kdaminer-v1.0.0", null]
}
response:
{
"id": 1,
"result": [null, "012345", 5],
"error": null
}
params: ["username", "password"]
result: true
request:
{
"id": 2,
"method": "mining.authorize",
"params": ["900703b6dd2493696068af72957a94129e54e85f269becc665672bf4730fc6a3", "x"]
}
response:
{
"id": 2,
"result": true,
"error": null
}
params: ["32 bytes target in big endian hex"]
{
"id": null,
"method": "mining.set_target",
"params": ["0001000000000000000000000000000000000000000000000000000000000000"]
}
params: ["jobId", "header", cleanJob]
{
"id": null,
"method": "mining.notify",
"params": [
"1234",
"286 bytes header in hex",
true
]
}
https://github.com/kadena-io/chainweb-node/wiki/Block-Header-Binary-Encoding
Size Bytes Value
8 0-7 nonce
8 8-15 time
32 16-47 parent
110 48-157 adjacents
32 158-189 target
32 190-221 payload
4 222-225 chain
32 226-257 weight
8 258-265 height
4 266-269 version
8 270-277 epoch start
8 278-285 flags
old version
params: ["username.worker", "jobId", "nonce2"]
result: true / false
request:
{
"id": 102,
"method": "mining.submit",
"params": [
"900703b6dd2493696068af72957a94129e54e85f269becc665672bf4730fc6a3.worker1",
"1234",
"6789abcdef"
]
}
===========================
GPU Mining Speedup Announcement
===========================
tl;dr New GPU miners are now available that mine 5x faster than before.
Hi Everyone,
We would like to announce a new development that is of likely interest to the Kadena mining community. A new version of NoncerPro is now available [1] that can mine more than five times faster than the previous version. A similar improvement is available for the bigolchungus miner as well [2].
For those wondering about what made this speedup possible, the last 64 bits of the block header had been reserved for future protocol changes. It was discovered that miners could use these bits as the nonce. Since these bits are at the end of the block header this makes it possible to mine significantly more efficiently. We’re announcing this to make the information available as broadly as possible to encourage a fair and decentralized mining ecosystem. We expect that other mining software, pools, etc will also come out with improvements to take advantage of this development.
If you are interested in getting more detailed information about this please reach out to us and we’ll be happy to assist.
[1] https://github.com/NoncerPro/Kadena/releases/tag/2.1.1
[2] https://github.com/kadena-community/bigolchungus/pull/20
new version
# new mining submit
params: ["username.worker", "jobId", "nonce2", "extraNonce(hex encoded `flags` field in the header)"]
result: true / false
for example:
{
"id": 102,
"method": "mining.submit",
"params": [
"900703b6dd2493696068af72957a94129e54e85f269becc665672bf4730fc6a3.worker1",
"1234",
"6789abcdef",
"0123456789abcdef"
]
}
response:
accepted share response:
{
"id": 102,
"result": true,
"error": null
}
rejected share response:
{
"id": 102,
"result": false,
"error": [21, "low difficulty", null]
}
in this example:
nonce = nonce1 + nonce2 = 0123456789abcdef (hex in big endian)
we should do `reverse_bytes(hex_decode(nonce))` before writing this to the 286 header
blake2s_256(block header) not equal block hash ,why ?
block header:
0000000000000000d9f38a3a1bc20500d4e8b94b1f2e26539408152a0c09a136c2f9b4cb0c8dacbab7413b480bab83fa0300070000007e0bb745c379e348540e1c2548cb912d2188a82c1a23aa77090182a701feaafc0c00000044795fba6dd40b1f336b68a37b0114d3d3eb62f7feb74dcfb3c479f93bd323a911000000ad8356d747f19699f2260a50f84d7f7853b88796dc2138e330e506cccf72a752ffac3c9444c7277f6cbc8e57dcfabc2784fdbbb82acd7ed7510037f07acf7903d9a3081f255e23048e1822d8598a2effab0dc63a19e53ac9afa05d6457dbe20f02000000f70bcf5800000000000000000000000000000000000000000000000000000000fe0200000000000001000000a0fc18a20bc20500010085d0e51c0000
blake2s_256(block header)==8991b95fc0ea0192527669b0e75a4ae8bcbc4ff819e888624d73654700000000
but block hash is b1a285013898dc40e130ce20d66859645485693d827418de798f2b098a97f0cf