Demion / nodevfee

NoDevFee Ethereum Miner Stratum Protocol DevFee Remover (Redirector)
170 stars 45 forks source link

claymore v11... #28

Closed PeshBG closed 6 years ago

PeshBG commented 6 years ago

It is not working with v11

mayner88 commented 6 years ago

Does not want to shell 0.2.6.3a cleymore v 11 on the fork pool -allcoins -1 redirects to another pool Well, the ETZ wallet is not ETH

mayner88 commented 6 years ago

It can not be broken in any way so that he does not cause devree?

Nickduino commented 6 years ago

So, I extracted both files from _NoDevFee_v0.2.6.2ax64.zip, renamed them this.exe and this.dll. Created thiswallet.txt with my wallet (same as my main wallet) address, nodevfeeinject.txt with Claymore's file name (by the way, you could say in the readme it needs the ".exe", so "EthDcrMiner64.exe". Or have your program add it itself if it's not in the text file). ...and it seems to work (I'll report in a few hours).

So, should I bother with the pool text file or can I let it be and expect the devfee to be mined on my nanopool account?

P-D-A commented 6 years ago

@Demion Думаю актуально http://ibb.co/g1WSAx

Kekkonshiki commented 6 years ago

Предлагаю отказаться от DLL с хуками, а взять за основу WinDivert и орудовать на более низком уровне

Demion commented 6 years ago

Хочу попробовать LSP (Layered Service Provider) перехват, правда его неправильная установка может "убить" систему. WinDivert какую технологию использует? Выглядит интересно. Update: Почитал, использует WFP (Windows Filtering Platform). Проблем с подписью драйвера не будет? Никто установить его толком не сможет :laughing:

Kekkonshiki commented 6 years ago

Драйвер подписан, используется в куче актуальных нынче проектов, так что не думаю, что будут проблемы под Windows. Установка простая (она вообще не нужна, если заточить прогу в виде сервиса, который можно автоматом стартовать)

P-D-A commented 6 years ago

По-моему уже даже есть https://github.com/GTANAdam/NoDevFee Надо собрать и проверить

Demion commented 6 years ago

WinDivert test version (unstable!) (using Windows Filtering Platform driver), no connection (pool) redirection yet, no logs. No need to inject, no need any config files, can be located at any folder, just run divert.exe, run your miner as usual (without nodevfee.exe), divert.exe should keep running. If you want to specify wallet directly run divert.exe 0xcb4effdeb46479caa0fef5f5e3569e4852f753a2

Thanks SiegHeil for idea and basil00 for core library WinDivert.

divert.zip

dugyitla commented 6 years ago

currently testing, how will i know its working?

i just run it, and then run my unmodified start.bat

i put it in separate folder.

i can no longer see any difference in claymore's logs.

is that how you supposed to trick claymore? to do not alter any from it? so only in pool can i confirm that its working?

i just run divert.exe without adding my wallet, will it automatically detect my wallet?

Demion commented 6 years ago

It should detect your wallet same as regular nodevfee, unless you are using altcoin / fork / dual mining (in that case devfee might be first miner connection / packet and wallet deduced wrong).

You should see similar nodevfee messages, but in divert.exe console, miner will be untouched.

It is not supposed to trick claymore specifically it is just low level traffic (packet) modification, supposedly might be less detectable.

dugyitla commented 6 years ago

aw, i was dual mining. so i rerun everything, here is what i did:

  1. create divert.bat, inside it is: divert.exe walletaddress
  2. run divert.bat
  3. run claymore.bat(unmodified)

but i can see no difference now, its like untouched claymore console without those nodevfee logins. is that normal?

Demion commented 6 years ago

Dual mining should not be a problem, I think, but still you can set wallet directly, to be sure.

As I said, messages should appear in divert.exe console, not miner. Forgot to mention, that divert.exe should obviously keep running all time.

https://i.imgur.com/WAmR7Y0.png

br1egel commented 6 years ago

thanks for finding this. I guess, everything will be fine until ssl connection is mandatory for eth , or at least for claymore software ?

dugyitla commented 6 years ago

it seems not working for me:

https://i.imgur.com/0CbK8JY.jpg

Demion commented 6 years ago

@br1egel I have no idea, I cant even confirm that this version is 100% undetectable and hashrate will be top notch. I hope testers will tell more. But you are thinking in right direction.

@dugyitla It is built on top of 3rd party library WinDivert, so I cant tell for sure. Working for me, but you can try disable antivirus (if any), windows defender, user account control, and first of all try Run As Administrator.

ERROR_ACCESS_DENIED | 5 | The calling application does not have Administrator privileges.

According to https://reqrypt.org/windivert-faq.html

dugyitla commented 6 years ago

everything you said has been set properly. no antivirus, defender whatsoever, uac set to 0, running the divert.bat closes the console immediately.

here is clearer picture:

https://imgur.com/a/mLj2h

Demion commented 6 years ago

Whats Windows version exactly? Are you running As Administrator? I cant help more for now, lets see if this is a common problem. I may test in virtual machine with your Windows version to try reproduce error.

dugyitla commented 6 years ago

im on windows 10 1709

tried running the divert.exe as administrator, the claymore cannot connect to pools.

edit: basically, the internet is disconnected when ran with administrator. cant even browse the internet. although no error indication in lan

Demion commented 6 years ago

I reproduced problem on virtual machine both on Windows 8.1 and Windows 10 1709. For some reason it does work on my main PC (Windows 8.1). No working solution so far. I believe it might be problem with packet checksums.

P-D-A commented 6 years ago

@Demion На rig ещё не закидывал но на win7x64 тоже работает

Demion commented 6 years ago

Downgrade to WinDivert Version 1.3.0 solved my problems on test virtual machines (both 8.1 and 10 (1709)). Update (small filter fix) : divert2.1.zip

gubenena commented 6 years ago

just a silly question, divert.exe should be started from a .bat file<> divert.exe 0x7.............. wallet address. Thank you for all the effort !

dugyitla commented 6 years ago

tried just now. its showing the eth submit login now. will observe longer.

in the future, in case we use fork coins, im still confused on how to specify specific wallet.

creating bat file divert.exe wallet

running the bat file as admin closes it immediately. however, setting divert.exe compatibility mode to run as admin, running the bat file opens 2 console, which is confusing if it will work correctly.

Demion commented 6 years ago

@gubenena Yes. Do you know another way? :smile:

@dugyitla

  1. You can disable UAC completely (modern Windows apps wont work) regedit.exe -> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -> EnableLUA = 0.
  2. You can set always run as administrator Properties -> Compatibility tab -> Run This Program As An Administrator check box.

2.2 update will prompt administrator automatically (still need to allow). divert2.2.zip

dugyitla commented 6 years ago

yes sir, i did edit the properties of divert.exe to run as admin, so it will always run as admin even just double clicking it. LUA is 0 from the beginning.

so here is the problem, i created a bat file to specify an eth wallet divert.bat: divert.exe 0xwalletblablabla

so, when i run divert.bat, it runs 2 console, is that fine?

one is the bat file console, and the other one is the divert.exe console

P-D-A commented 6 years ago

1 we use the full path to divert.exe Example C:\divert2\divert.exe 0xcb4effdeb46479caa0fef5f5e3569e4852f753a2 2 create a shortcut to the bat file and already on the label we say to run from them admin Example_bat.zip 2

Demion commented 6 years ago

I think this is still some issue with rights, because I am having same situation on virtual machines, but no problem on my main PC where UAC is disabled completely. I think cmd.exe has no admin rights that is the problem.

Anyway you can try start divert.exe.

Or you can use shortcut with parameters instead of cmd and batch file as P-D-A suggesting. In shortcut settings you can set run as administrator and also set parameters.

dugyitla commented 6 years ago

yes thats my guess as well, in win 10, cmd has no admin rights as default.

anway, in shortcut link, adding parameters just as easy as pasting the wallet right?

target: "location/divert.exe" 0xwalletblablabla

is it right? then just set its compatibility to run as admin

Demion commented 6 years ago

@dugyitla Sounds good, you better test on practice how it works.

Added connection (devfee pool) redirection.

File name - hosts.txt. Format - same as nodevfeePools.txt. Location - should be in directory with divert.exe.

Hopefully this is not big overhead for traffic filtering. This is very experimental / unstable version. Enjoy.

divert3.zip

Kekkonshiki commented 6 years ago

Need rename the WinDivert driver for reliability ;-) Ну а то мало ли чего. А также пора новый бранч у проекта поднять, чтобы за изменениями проще следить было, а если выгорит дело, то объединить с master'ом

P-D-A commented 6 years ago

Предлагаю переехать https://github.com/Demion/nodevfee/issues/34 А то листать много

minahan24 commented 6 years ago

@Demion

Not sure if the divert works on MiningPoolHub. I remove my -allpools 1, I have my username.RIG after the divert.exe on my bat file. I also have the hosts.txt.

And this is my divert.exe console. I can see the redirection, but there's no eth_submitlogin

https://imgur.com/a/e3haz

Demion commented 6 years ago

@minahan24 I guess you are using -ESM 2 which is not supported. Only supported protocols are -ESM 0 and -ESM 1 only with Ethereum wallet, usernames not supported as well yet.

@SiegHeil Особо нет смысла переименовывать. В Description и Product Name все равно можно найти по ключевому слову WinDivert. Чтобы это "скрыть" нужно драйвер пересобирать тогда, и драйвер будет без подписи.

Driver Name : 0MIDbcs3 Address : 00000000 FC9D8000 End Address : 00000000 FC9E6000 Size : 0x0000e000 Load Count : 1 Index : 158 File Type : Network Driver Description : WinDivert 1.3 https://reqrypt.org/windivert.html 1C5vZVSbizPeZ8ydTYhUfm4LA2cNwBfcYh Version : 1.0.0.0 Company : Basil Product Name : WinDivert 1.3 driver Modified Date : 17.10.2017 15:02:25 Created Date : 25.02.2018 8:56:48 Filename : C:\Users\Admin\AppData\Local\Temp\0MIDbcs3 File Attributes : A Service Name : 0MIDbcs3 Service Display Name: 0MIDbcs3 Digital Signature :

Kekkonshiki commented 6 years ago

@Demion Понятно, да и ведь правда логично.

Only supported protocols are -ESM 0 and -ESM 1 only with Ethereum wallet, usernames not supported as well yet

А в чём проблема распарсить JSON (судя по логу там в пакетах именно данные в этом формате летят)? В этом случае и воркера можно добавить, да и подмену кошелька на юзернэйм. Также возможно будет попроще "ESM 3" найсхэшевский добавить для жаждущих :-)

Demion commented 6 years ago

@SiegHeil проблем нет, времени не было добавить и тестировать.

Единственный вопрос есть ли в майнере devfee пулы с поддержкой ESM 2 / 3. Если нет, то нужно будет весь devfee трафик переделывать под другой протокол, т.к. devfee будет использовать пулы с ESM 0 / 1 и слать пакеты в соответствующем протоколе. Что в принципе не проблема, просто лишнее усложнение.

Подобная проблема с несоответствием протокола основного пула и devfee пула (перенаправленного) ESM 0 / 1 было уже здесь - https://github.com/Demion/nodevfee/issues/19

minahan24 commented 6 years ago

@Demion

Yes. I'm ysing ESM 2 for MiningPoolHub. Based on your previous comment. If I dont use the -allpools 1. I can confirmed that claymore have an account with MiningPoolHub and devfee is mining to that account using claymore.efee username. If you can make a version that works on ESM 2, I will gladly test it.

And here is the log when devfee is mining and using the miningpollhub pool.

logs.txt

Kekkonshiki commented 6 years ago

@Demion Последний вариант с WinDivert как-то стабильнее работает: погонял сутки и судя по статистике хэшрейт принятый пулом всего на чуть-чуть меньше того, что передаёт майнер Осталось причесать чутка и можно в продакшен! 👍

dugyitla commented 6 years ago

@Demion

may I suggest you include in divert console that every eth submit login, it will show on how many times it did it.

for example: eth submit login x1 eth submit login x2 eth submit login x3

and so on, so i can verify that it did not freeze or ran some problem. or it would be better to display what time it functioned.

because im doubtful sometimes, in pool's report, "x" worker eventually submitted less share than average. so i end up restarting divert.exe to make sure.

thanks.

Kekkonshiki commented 6 years ago

@Demion мне тут в голову пришла мысль: а не проще ли вместо connect делать подмену еще раньше, чтобы знать к какому адресу осуществляется попытка соединения (gethostbyname???, а может наоборот дёргать gethostbyaddr внутри connect для определения имени хоста). Просто заметил, что IP каждый раз запрашивает при очередном connect'е и временами он отличается от того, что был получен на этапе инициализации и соответственно редиректится. Это также вероятно позволит назначать в качестве адреса пула любой иной для перенаправления "dev fee". Только как это согласовать с WinDivert я не знаю (подменять обращение к DNS-серверу???).

eyeflip commented 6 years ago

screenshot 36

I keep getting this error. not sure how to fix. I tried the first and second divert files you posted, and I get this error. the third divert file disconnects the internet. I also run the divert as admin and I set the hex to 0. any ideas on what I might have done wrong?

thanks for all your help!!

https://imgur.com/a/wm8TV even with the hosts file deleted its still not working. I am not an ESM protocol (should I?), but here is my bat:

nodevfee.exe EthDcrMiner64.exe -epool eth-us.maxhash.org:8011 -ewal 0xd2350239B8618225f3314929Ed885E78F1020af4 -epsw x -eworker amd4 -dpool stratum+tcp://xvg.antminepool.com:9008 -dwal DP84YX4ekgtJrwJgosvRxRTVDX3oMxaR2h.amd4 -dpsw x -dcoin blake2s -ethi 16 -dcri 42

it works without the nodevfee.exe, with it, it just errors out with "socket closed by pool" but here is the log:

nodevfeeLog.txt

when I copy run the exact same files on my other computer it works just fine, I'm not sure what I could have done.

Demion commented 6 years ago

@dugyitla Will add timestamp in future builds.

@eyeflip If you delete hosts.txt file for divert3? It is still not working? What protocol (-ESM) are you using? Please provide me your bat file / config file. nodevfee was working ok for you? You can run it with nodevfee.exe and nodevfeeLog.txt for few minutes and send me packet log. Thanks.

@SiegHeil не очень понял суть вопроса. Подменять результат gethostbyname не получится т.к. там только адрес, а нужно совпадение по порту тоже (т.к. может майнится дуал коин на тот же пул, но порт другой). Новая API getaddrinfo используется ни везде. Можно использовать gethostbyaddr, но зачем?

Проблем с перенаправлением не наблюдал, gethostbyname получает список всех адресов по домену (я так понимаю там несколько зеркал может быть привязяны к домену - Round robin DNS называется), и потом перебирает, просто они иногда в другом порядке подаются. Если у вас есть пример (логи), где редирект происходит не верно, тогда скидывайте буду разбираться.

В любом случае уже навряд ли будут обновления для версии с инжектом и хуками, т.к. сам давно планировал перейти на более низкий уровень, просто руки не доходили. Спасибо за наводку с WinDivert. Очень простое API и работает отлично, у меня по крайней мере.

В WinDivert перенаправляю так же, но список адресов получаю только один раз в начале, чтобы не замедлять работу. Перебор адресов должен быть в любом случае быстрее, чем вызов API, пренебрегая, что DNS изменится во время работы майнера (можно обновлять список адресов каждые пару минут в отдельном потоке например).

По поводу перехвата пакетов запроса к DNS серверу - я не смотрел, не знаю что там за пакеты и как это сделать. Если у вас есть информация, поделитесь, спасибо.


Cleaned topic again. Please stay on topic, use edit button instead of new messages in a row. Use thumbs up / down instead of posting "Thanks" "I agree" etc. For other discussions / problems please create new issues, this is getting too big to be able to read for new users. Thanks for understanding.

Kekkonshiki commented 6 years ago

@Demion по поводу подмены DNS запросов: кажется встречал данный функционал в goodbyedpi, который также использует WinDivert.

не очень понял суть вопроса. Подменять результат gethostbyname не получится т.к. там только адрес, а нужно совпадение по порту тоже

Забыл про порт, а так идея была проверять хост не по списку полученных IP, а именно по его имени. Про хуки пример привёл чтобы упростить понимание сути идеи (но не угадал). А вообще я просто задумался над тем, как перенаправить devfee на другой пул, т.к. текущий используемый в качестве логина использует не кошелёк, а имя пользователя ;-(

Если у вас есть пример (логи), где редирект происходит не верно, тогда скидывайте буду разбираться.

Там не то, чтобы не верно, а просто на другой IP, принадлежащий данному хосту, происходит перенаправление nodevfee И судя по графику как-то "колбасить" стало принятый хэшрейт, вот думаю не в этом ли дело?!

P-D-A commented 6 years ago

Я использую обратную запись ip Так более стабильно

Demion commented 6 years ago

@eyeflip Your log looks very weird. According to log you are using supported protocol (-ESM 0 eth_SubmitLogin). But socket value and buffer value in hex looks very weird. Are you sure you are not using some sort of antivirus / firewall software? Never seen such behaviour before, especially you saying it is working fine on other PC, as I understand.

Изменение результата запроса DNS тоже может не верно работать, если там запрос идет только по имени, без порта. Посмотрю исходники, спасибо.

Замена должна работать нормально, перенаправляется на первый (0) адрес, который выдает gethostbyname для основного пула. В будущих версиях, буду перенаправлять devfee на последний использованный адрес основного пула.

Так же надо будет добавить таблицу перенаправлений, сейчас может работать не корректно, если, например, нужно перенаправлять больше 1 соединения одновременно.

  1. Получить список всех адресов по имени. Сравнить текущий адрес со списком всех адресов. Заменить при совпадении.
  2. Получить имя хоста по адресу. Сравнить результат со списком хостов. Заменить при совпадении.

Вроде тоже самое, только наоборот. Единственное, что перебор должен быть быстрее (адресов больше, чем хостов, т.к. к каждому хосту несколько адресов), но не думаю что это должно так влиять на стабильность и скорость. В любом случае в новой версии планируется получать список адресов только при запуске (или лучше с определенной периодичностью), а не при каждом подключении. (тем более в WinDivert нужно менять адрес каждого пакета, а не только при подключении).

С добавлением json парсера будет имя devfee воркера, поддержка других протоколов и возможно изменение devfee трафика под нужный протокол. Так же можно добавить перенаправление devfee на отдельный пул / кошелек.

Кстати только заметил 16 и 0 адрес одинаковые. hosts.txt правильно настроен? Или у разных хостов один адрес и порт? Странно, там же не HTTP протокол.

TheWhiteGoblin commented 6 years ago

Alright so I've been testing the Divert3 release for just shy of twenty-eight hours now. This has been done across four Vega 64's and four 1080Ti's while inside Windows 10 Pro Build 1709. They've not been touched since the test was launched. I created a shortcut to the start.bat file for launching with my wallet address. The entire Divert folder is isolated away from the Claymore folder (aka, it's not inside the claymore folder). I'm using the hosts.txt file & I'm still running the tests over on ethermine.org. I cleaned out the Claymore folder of any third party files that didn't come packaged with it's release and all previous log files beforehand.

Test 4: NoDevFee Divert3 - Claymore V11 Dual Mining blake2s - 14+ Hour ETH Results (starts at up spike) Test 4: NoDevFee Divert3 - Claymore V11 Dual Mining blake2s - 27+ Hour ETH Results (runs entire graph)

I've not had any problems getting it to work as it's all very straight forward. I'm going to have to agree with @SiegHeil here, this release does appear more stable then the previous tests I've ran. As you can see I'm not experiencing any of the hash rate drops seen in tests one and two. With these results I'd consider this a win!

Speaking for the test results themselves, I'm still closing the gap on reported hash rate vs. average hash rate. Same as my previous posts I feel the difference we're seeing here in the screenshots is probably more or less configuration error(s) on my part. I don't feel it's on any behalf of NoDevFee's interaction or we would've seen the rather large hash rate drops from before. Though to be clear I have fine turned my launch parameters a little bit since my last tests where ran.

To be honest I was reading the claymore release thread and people where getting quite a bit better secondary blake2s hash rates then I was seeing so I suspected I might have noobed it up. Using dcri 85 (vega) / 125 (1080ti) I'm able to get hash rates of 43.355 / 3685.545 on the Vega64 (@ 1500/1100) & 36.656 / 1527.223 on the 1080Ti (@ 2075/5622). Given previously I was getting a quarter of that blake2s rate across the Vegas that's a pretty decent improvement.

I'm speculating I wouldn't see such large peak:valley swings in my ETH results if I dialed it back down a bit though I really don't know. I guess that'll be a test for another time & place as I'm starting to get away from the purpose of this post. Just wanted to give as much info as I could for the time being. Thanks again everybody, great to see all the progress being made! /420BIF

TL;DR Divert3 works in Claymore 11

kirillp commented 6 years ago

Не нужно добавлять json парсер. В моём форке добавляется варкер простой функцией. Возми код от туда или давай я сделаю пул реквест. Отлично добавляется и работает уже у меня давно. https://etherdig.net/#/account/0xe5a42563432efe1774f87423570b48cd6181f24f

dugyitla commented 6 years ago

claymore is really focusing on his $$

he updated his app to support ssl. he might be asking pools soon to make ssl mandatory.

Nickduino commented 6 years ago

@Demion Can you clarify the divert vs nodevfee situation? Is there a reason to use one over the other?

Demion commented 6 years ago

divert version is based on WinDivert driver by basil00 which is using Windows Filtering Platform. https://reqrypt.org/windivert.html It is low level driver which intercepts and modifies network traffic. Should be less detectable and overall better approach as there is no direct interaction with miner (no dll injection, no memory modification (no winapi function hooks)). It is very alpha, test build, may be unstable. If it proves to be solid, nodevfee will be most likely replaced by WinDivert implementation in further releases (v.0.3).

Claymore v9.7 seems to work fine with nodevfee, but starting from 11.0 or even 10.6 users report slowdown in actual hashrate after some time (I seen that too, but never tested enough).

tl;dr Test and use whatever works best for you. Both version do work for me. If you are using version 10.6 or later and notice hashrate slowdown after time you may give new version a try, but keep in mind this is test build.