forked from Qitmeer/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
james
committed
Nov 22, 2021
1 parent
0c595da
commit 8e6f144
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: Pool Stratum Protocol V1.0 | ||
weight: 5 | ||
#pre: "<b>1. </b>" | ||
# chapter: true | ||
--- | ||
|
||
**Q:** POW HASH | ||
|
||
**A**: POW Hash [GOlang HashMeerXKeccakV1](https://github.com/Qitmeer/qitmeer/blob/master/common/hash/hashfuncs_meer_crypto.go#L11) | ||
|
||
[C CODE HashMeerXKeccakV1](https://github.com/Qitmeer/qitmeer/blob/0.10-dev/cmd/miner/asic/meer/algo_meer.c) | ||
|
||
**Q:** Pool Stratum Protocol | ||
|
||
**A**: `stateRoot` can get from `GetBlockTemplate` RPC | ||
|
||
{"id": null,"method": "mining.notify","params": [ | ||
"job_id", | ||
"prev_hash", | ||
"cb1", | ||
"cb2", | ||
"cb3", | ||
"cb4", | ||
"txs", | ||
"version", | ||
"nBits", | ||
"nTime", | ||
"stateRoot", // | ||
"cleanJobs", | ||
]} | ||
|
||
**Q:** Pow Header | ||
|
||
**A**: [POW_HEADER](https://github.com/Qitmeer/qitmeer/blob/0.10-dev/core/types/block.go#L134) | ||
|
||
header = s.Version + prevHash + merkleRootStr2 + stateRoot + s.Nbits + hex.EncodeToString(ntime) + | ||
hex.EncodeToString([]byte{uint8(s.PowType)}) + nonceStr | ||
**Q:** Change Of CoinBase | ||
|
||
**A**: 1. [Coinbase amount struct] https://github.com/Qitmeer/qitmeer-miner/blob/master/symbols/qitmeer/coinbase/common.go#L104-L108 | ||
|
||
example | ||
old : amount : 12000000000 | ||
new : amount { Type : 0, Value: 12000000000} | ||
|
||
2. [CoinbaseFee](https://github.com/Qitmeer/qitmeer-miner/blob/master/symbols/qitmeer/coinbase_tx.go#L106) | ||
3. [Coinbase add extra output](https://github.com/Qitmeer/qitmeer-miner/blob/master/symbols/qitmeer/coinbase/common.go#L138) | ||
|
||
**Q:** Change Of Miner | ||
|
||
**A**: Submit Data | ||
|
||
{PoolUser, jobID, ExtraNonce2, timestampStr,nonceStr} | ||
|
||
|