core-geth icon indicating copy to clipboard operation
core-geth copied to clipboard

docs/tutorials: draft gpu/stratum mining doc

Open meowsbits opened this issue 3 years ago • 4 comments

We've had a couple questions lately (#494, #492) regarding GPU and Stratum mining.

This document is a work in progress, but I'll get the PR up and running so it can be of use. @maxima7787 and @feculay, please feel welcome to give feedback and/or contributions here as you navigate your projects.

meowsbits avatar Aug 08 '22 14:08 meowsbits

In my situation i think core-geth launched with "--classic" command switching to PoA instead PoW. Because when i launched Ethereum mainnet i received "commit new mining work".

All miners work with right epoch=261.

I can't test ethminer, because it's not support etchash.

maxima7787 avatar Aug 08 '22 16:08 maxima7787

In my situation i think core-geth launched with "--classic" command switching to PoA instead PoW.

I'm not sure what you mean here... --classic will only configure the Ethereum Classic chain and network parameters, which are definitely still Proof of Work. Can you clarify?

Note that your core-geth node will need to be synced with the network (working at the latest block height, importing new blocks one at a time) in order to start committing work.

meowsbits avatar Aug 08 '22 19:08 meowsbits

In my situation i think core-geth launched with "--classic" command switching to PoA instead PoW.

I'm not sure what you mean here... --classic will only configure the Ethereum Classic chain and network parameters, which are definitely still Proof of Work. Can you clarify?

Note that your core-geth node will need to be synced with the network (working at the latest block height, importing new blocks one at a time) in order to start committing work.

in geth attach, eth.syncing give "false". Later i will send log from geth window.

maxima7787 avatar Aug 08 '22 19:08 maxima7787

In my situation i think core-geth launched with "--classic" command switching to PoA instead PoW.

I'm not sure what you mean here... --classic will only configure the Ethereum Classic chain and network parameters, which are definitely still Proof of Work. Can you clarify?

Note that your core-geth node will need to be synced with the network (working at the latest block height, importing new blocks one at a time) in order to start committing work.

I'm using this command: geth --classic --cache 21000 --http --miner.etherbase 0x8d091BabCC1EA354AcEab1a34a06A1035b9e7600 --txlookuplimit 1000 --mine

INFO [08-09|00:36:35.926] Disk storage enabled for ethash caches dir=C:\Users\MyPC\AppData\Local\Ethereum\classic\geth\etchash count=3 INFO [08-09|00:36:35.928] Disk storage enabled for ethash DAGs dir=C:\Users\MyPC\AppData\Local\Etchash count=2 INFO [08-09|00:36:35.930] Initialising Ethereum protocol network=1 dbversion=8 INFO [08-09|00:36:36.021] Loaded most recent local header number=15,696,581 hash=3e4e61..9dafd4 td=2,120,004,944,152,537,223,558 age=2h7m46s INFO [08-09|00:36:36.023] Loaded most recent local full block number=15,696,581 hash=3e4e61..9dafd4 td=2,120,004,944,152,537,223,558 age=2h7m46s INFO [08-09|00:36:36.025] Loaded most recent local fast block number=15,696,581 hash=3e4e61..9dafd4 td=2,120,004,944,152,537,223,558 age=2h7m46s INFO [08-09|00:36:36.027] Loaded last fast-sync pivot marker number=15,692,577 WARN [08-09|00:36:36.029] Head state missing, repairing number=15,696,581 hash=3e4e61..9dafd4 snaproot=d80f8c..9cc469 INFO [08-09|00:36:36.921] Loaded most recent local header number=15,696,581 hash=3e4e61..9dafd4 td=2,120,004,944,152,537,223,558 age=2h7m46s INFO [08-09|00:36:36.923] Loaded most recent local full block number=15,692,577 hash=8f0850..49ee12 td=2,118,418,366,755,883,423,087 age=16h45m55s INFO [08-09|00:36:36.925] Loaded most recent local fast block number=15,696,581 hash=3e4e61..9dafd4 td=2,120,004,944,152,537,223,558 age=2h7m46s INFO [08-09|00:36:36.927] Loaded last fast-sync pivot marker number=15,692,577 WARN [08-09|00:36:36.929] Enabling snapshot recovery chainhead=15,692,577 diskbase=15,692,765 WARN [08-09|00:36:36.940] Snapshot is not continuous with chain snaproot=eb25e8..e0e508 chainroot=88ba51..fa8434 INFO [08-09|00:36:36.942] Loaded local transaction journal transactions=0 dropped=0 INFO [08-09|00:36:36.944] Regenerated local transaction journal transactions=0 accounts=0 WARN [08-09|00:36:36.946] Switch sync mode from snap sync to full sync INFO [08-09|00:36:36.947] Gasprice oracle is ignoring threshold set threshold=2 WARN [08-09|00:36:36.949] Unclean shutdown detected booted=2022-08-08T22:31:36+0500 age=2h5m INFO [08-09|00:36:36.952] Starting peer-to-peer node instance=CoreGeth/v1.12.7-stable-a374c2e8/windows-amd64/go1.18.2 INFO [08-09|00:36:36.964] New local node record seq=1,659,924,646,325 id=3845ec04e32775e0 ip=127.0.0.1 udp=30303 tcp=30303 INFO [08-09|00:36:36.967] Started P2P networking self=enode://88d802f97d9f98b1cc44b71def9c8595309f4003d0f78ea40390b1919e26a566f803efbae5f95757ccf6ccf6a5186848d9dce1d82f71df460e00b7fb14b6a1c8@127.0.0.1:30303 INFO [08-09|00:36:36.967] IPC endpoint opened url=\.\pipe\geth.ipc INFO [08-09|00:36:36.972] HTTP server started endpoint=127.0.0.1:8545 auth=false prefix= cors= vhosts=localhost INFO [08-09|00:36:36.974] Transaction pool price threshold updated price=1,000,000,000 INFO [08-09|00:36:36.975] Updated mining threads threads=0 INFO [08-09|00:36:36.977] Transaction pool price threshold updated price=1,000,000,000 INFO [08-09|00:36:36.978] Commit new sealing work number=15,692,578 sealhash=7ae4ad..1dfab5 uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:36:36.981] Commit new sealing work number=15,692,578 sealhash=7ae4ad..1dfab5 uncles=0 txs=0 gas=0 fees=0 elapsed=2.554ms INFO [08-09|00:36:37.010] Mapped network port proto=tcp extport=30303 intport=30303 interface=NAT-PMP(192.168.2.1) INFO [08-09|00:36:37.030] Mapped network port proto=udp extport=30303 intport=30303 interface=NAT-PMP(192.168.2.1) INFO [08-09|00:36:37.080] New local node record seq=1,659,924,646,326 id=3845ec04e32775e0 ip=192.168.100.18 udp=30303 tcp=30303 INFO [08-09|00:36:47.076] Looking for peers peercount=0 tried=25 static=0 INFO [08-09|00:36:57.151] Looking for peers peercount=0 tried=25 static=0 INFO [08-09|00:36:58.381] Block synchronisation started INFO [08-09|00:36:58.382] Mining aborted due to sync INFO [08-09|00:37:02.277] Downloader queue stats receiptTasks=0 blockTasks=190 itemSize=57.30B throttle=8192 INFO [08-09|00:37:02.294] Importing sidechain segment start=15,696,564 end=15,696,582 INFO [08-09|00:37:02.384] Extend chain add=3987 number=15,696,564 hash=6ac540..c6dbeb INFO [08-09|00:37:02.709] Imported new chain segment blocks=19 txs=64 mgas=1.476 elapsed=413.592ms mgasps=3.568 number=15,696,582 hash=13179a..62a853 age=2h7m17s dirty=370.23KiB INFO [08-09|00:37:02.712] Unindexed transactions blocks=1 txs=0 tail=15,695,583 elapsed=0s INFO [08-09|00:37:02.723] Imported new chain segment blocks=2 txs=53 mgas=1.306 elapsed=11.010ms mgasps=118.590 number=15,696,584 hash=b18ad5..10b18d age=2h6m14s dirty=567.65KiB INFO [08-09|00:37:02.726] Unindexed transactions blocks=2 txs=1 tail=15,695,585 elapsed=0s INFO [08-09|00:37:02.855] Imported new chain segment blocks=11 txs=54 mgas=1.144 elapsed=18.954ms mgasps=60.339 number=15,696,595 hash=34d17a..ea6090 age=2h3m51s dirty=843.75KiB INFO [08-09|00:37:02.858] Unindexed transactions blocks=11 txs=63 tail=15,695,596 elapsed=0s INFO [08-09|00:37:02.862] Imported new chain segment blocks=2 txs=0 mgas=0.000 elapsed=3.571ms mgasps=0.000 number=15,696,597 hash=bb5e35..224aa4 age=2h3m40s dirty=852.69KiB INFO [08-09|00:37:02.865] Unindexed transactions blocks=2 txs=0 tail=15,695,598 elapsed=0s INFO [08-09|00:37:03.619] Imported new chain segment blocks=107 txs=1361 mgas=30.585 elapsed=381.578ms mgasps=80.153 number=15,696,704 hash=3b0e7c..c3b56b age=1h44m43s dirty=6.07MiB INFO [08-09|00:37:03.624] Unindexed transactions blocks=107 txs=896 tail=15,695,705 elapsed=2.001ms INFO [08-09|00:37:03.999] Imported new chain segment blocks=226 txs=1281 mgas=31.018 elapsed=376.932ms mgasps=82.289 number=15,696,930 hash=1c48ee..0acc21 age=51m35s dirty=7.57MiB INFO [08-09|00:37:04.007] Unindexed transactions blocks=226 txs=1647 tail=15,695,931 elapsed=5.005ms INFO [08-09|00:37:04.384] Imported new chain segment blocks=233 txs=1094 mgas=29.331 elapsed=381.991ms mgasps=76.785 number=15,697,163 hash=129be4..fab15d age=1m8s dirty=9.57MiB INFO [08-09|00:37:04.391] Unindexed transactions blocks=233 txs=2783 tail=15,696,164 elapsed=4.003ms INFO [08-09|00:37:06.619] Imported new chain segment blocks=2 txs=0 mgas=0.000 elapsed=4.005ms mgasps=0.000 number=15,697,165 hash=3d07fe..78f47e dirty=9.55MiB INFO [08-09|00:37:06.622] Unindexed transactions blocks=2 txs=5 tail=15,696,166 elapsed=0s INFO [08-09|00:37:06.799] Commit new sealing work number=15,697,166 sealhash=3383eb..76076d uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:37:06.802] Commit new sealing work number=15,697,166 sealhash=8b02f3..d13135 uncles=0 txs=8 gas=171,920 fees=0.0002947 elapsed=3.013ms INFO [08-09|00:37:07.151] Looking for peers peercount=1 tried=34 static=0

After few minutes:

INFO [08-09|00:42:54.558] Commit new sealing work number=15,697,194 sealhash=8f7bfa..6e4e1f uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:42:54.558] Unindexed transactions blocks=1 txs=18 tail=15,696,194 elapsed=0s INFO [08-09|00:42:54.562] Commit new sealing work number=15,697,194 sealhash=8f7bfa..6e4e1f uncles=0 txs=0 gas=0 fees=0 elapsed=4.003ms INFO [08-09|00:42:58.198] Imported new chain segment blocks=1 txs=0 mgas=0.000 elapsed=2.001ms mgasps=0.000 number=15,697,194 hash=ebc028..32c482 dirty=9.87MiB af=true INFO [08-09|00:42:58.201] Commit new sealing work number=15,697,195 sealhash=5994e6..2ed94c uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:42:58.201] Unindexed transactions blocks=1 txs=17 tail=15,696,195 elapsed=0s INFO [08-09|00:42:58.203] Commit new sealing work number=15,697,195 sealhash=5994e6..2ed94c uncles=0 txs=0 gas=0 fees=0 elapsed=2.001ms INFO [08-09|00:43:07.232] Commit new sealing work number=15,697,195 sealhash=29f943..7f8013 uncles=0 txs=1 gas=21000 fees=2.1e-05 elapsed=0s INFO [08-09|00:43:10.246] Commit new sealing work number=15,697,195 sealhash=34a742..fb8a93 uncles=0 txs=6 gas=126,000 fees=0.000546 elapsed=5.487ms INFO [08-09|00:43:15.269] Imported new chain segment blocks=1 txs=6 mgas=0.126 elapsed=2.055ms mgasps=61.299 number=15,697,195 hash=bf08b6..cba997 dirty=9.89MiB af=true INFO [08-09|00:43:15.272] Unindexed transactions blocks=1 txs=0 tail=15,696,196 elapsed=0s INFO [08-09|00:43:15.272] Commit new sealing work number=15,697,196 sealhash=4c5563..3e5971 uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:43:15.277] Commit new sealing work number=15,697,196 sealhash=4c5563..3e5971 uncles=0 txs=0 gas=0 fees=0 elapsed=5.004ms INFO [08-09|00:43:18.277] Commit new sealing work number=15,697,196 sealhash=d5fb22..53c5f7 uncles=0 txs=2 gas=42000 fees=4.2e-05 elapsed=0s INFO [08-09|00:43:21.159] Imported new chain segment blocks=1 txs=0 mgas=0.000 elapsed=2.001ms mgasps=0.000 number=15,697,196 hash=a245c6..67a0cd dirty=9.89MiB af=true INFO [08-09|00:43:21.162] Unindexed transactions blocks=1 txs=4 tail=15,696,197 elapsed=0s INFO [08-09|00:43:21.162] Commit new sealing work number=15,697,197 sealhash=a93168..c4ecb0 uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:43:21.167] Commit new sealing work number=15,697,197 sealhash=18d6fe..4714ab uncles=0 txs=2 gas=42000 fees=4.2e-05 elapsed=5.004ms INFO [08-09|00:43:23.053] Imported new chain segment blocks=1 txs=2 mgas=0.042 elapsed=2.024ms mgasps=20.751 number=15,697,197 hash=55a77c..12dec2 dirty=9.90MiB af=true INFO [08-09|00:43:23.056] Unindexed transactions blocks=1 txs=10 tail=15,696,198 elapsed=0s INFO [08-09|00:43:23.056] Commit new sealing work number=15,697,198 sealhash=1c2b7b..4c2e51 uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:43:23.061] Commit new sealing work number=15,697,198 sealhash=926ecf..bc0a87 uncles=0 txs=1 gas=43993 fees=0.00175972 elapsed=5.006ms

Launching T-rex: t-rex.exe -a etchash -o http://127.0.0.1:8545 -u 0x8d091BabCC1EA354AcEab1a34a06A1035b9e7600 -p x

T-rex window

20220809 00:48:33 Using protocol: stratum1. 20220809 00:48:33 Start working in get-work mode... 20220809 00:48:33 GPU #0: intensity 22, auto-fan (memory) 86C, mclock 1100MHz, core clock locked 1100MHz 20220809 00:48:33 etchash epoch: 261, block: 15697219, diff: 390.58 T 20220809 00:48:35 GPU #0: generating DAG 3.04 GB for epoch 261(522) ... 20220809 00:48:35 etchash epoch: 261, block: 15697220, diff: 390.20 T 20220809 00:48:39 GPU #0: DAG generated [crc: 8fe1cd01, time: 3927 ms], memory left: 19.74 GB 20220809 00:48:43 etchash epoch: 261, block: 15697221, diff: 390.39 T 20220809 00:48:54 GPU #0: using kernel #4 20220809 00:49:17 etchash epoch: 261, block: 15697222, diff: 390.00 T 20220809 00:49:19 etchash epoch: 261, block: 15697223, diff: 390.00 T

-----------20220809 00:49:33 ----------- Mining at 127.0.0.1:8545, diff: 390.00 T GPU #0: Gigabyte RTX 3090 - 121.22 MH/s, [T:46/84C, P:302W, F:0%, E:431kH/W] Shares/min: 0 Uptime: 1 min | Algo: etchash | Driver: 516.59 | T-Rex 0.26.4

20220809 00:49:50 etchash epoch: 261, block: 15697224, diff: 389.62 T

DAG file size ok epoch ok diff ok

But in geth i see the next error^

WARN [08-09|00:46:02.727] Served eth_submitHashrate conn=127.0.0.1:58251 reqid=9 duration=0s err="invalid argument 0: json: cannot unmarshal hex number with leading zero digits into Go value of type hexutil.Uint64" INFO [08-09|00:46:10.838] Imported new chain segment blocks=1 txs=0 mgas=0.000 elapsed=2.001ms mgasps=0.000 number=15,697,210 hash=b1ab39..0d1e94 dirty=9.92MiB af=true INFO [08-09|00:46:10.841] Commit new sealing work number=15,697,211 sealhash=3364b6..a8bddd uncles=0 txs=0 gas=0 fees=0 elapsed=0s INFO [08-09|00:46:10.841] Unindexed transactions blocks=1 txs=18 tail=15,696,211 elapsed=0s INFO [08-09|00:46:10.846] Commit new sealing work number=15,697,211 sealhash=d0e8a1..e9e907 uncles=0 txs=35 gas=735,000 fees=0.001323 elapsed=5.004ms

Now i can test only Windows machine, in the morning I can try to install etc stratum on Ubuntu machine

maxima7787 avatar Aug 08 '22 19:08 maxima7787