CI: set difficulties for fake stratum clients

Client 1: autodiff
Client 2: fixed 1000 diff
Client 3: fixed 10M diff
This commit is contained in:
SChernykh 2023-05-25 09:44:44 +02:00
parent fbc0159453
commit d08ac60fd9
2 changed files with 25 additions and 17 deletions

View file

@ -32,9 +32,9 @@ jobs:
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py stratum_dummy1.log &
python ../tests/src/stratum_dummy.py stratum_dummy2.log &
python ../tests/src/stratum_dummy.py stratum_dummy3.log &
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
TSAN_OPTIONS="suppressions=../tests/src/tsan_sup.txt halt_on_error=1" ./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6
grep 'Synchronization finished successfully' p2pool.log
@ -110,9 +110,9 @@ jobs:
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py stratum_dummy1.log &
python ../tests/src/stratum_dummy.py stratum_dummy2.log &
python ../tests/src/stratum_dummy.py stratum_dummy3.log &
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
MSAN_OPTIONS="halt_on_error=1" ./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6
grep 'Synchronization finished successfully' p2pool.log
@ -153,9 +153,9 @@ jobs:
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py stratum_dummy1.log &
python ../tests/src/stratum_dummy.py stratum_dummy2.log &
python ../tests/src/stratum_dummy.py stratum_dummy3.log &
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
UBSAN_OPTIONS="suppressions=../tests/src/ubsan_sup.txt halt_on_error=1" ./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6
grep 'Synchronization finished successfully' p2pool.log
@ -193,9 +193,9 @@ jobs:
run: |
cd build
mkdir data
python ../tests/src/stratum_dummy.py stratum_dummy1.log &
python ../tests/src/stratum_dummy.py stratum_dummy2.log &
python ../tests/src/stratum_dummy.py stratum_dummy3.log &
python ../tests/src/stratum_dummy.py 1 &
python ../tests/src/stratum_dummy.py 2 &
python ../tests/src/stratum_dummy.py 3 &
./p2pool --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6
grep 'Synchronization finished successfully' p2pool.log
@ -233,9 +233,9 @@ jobs:
run: |
cd build/Debug
mkdir data
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py stratum_dummy1.log"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py stratum_dummy2.log"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py stratum_dummy3.log"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 1"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 2"
Start-Process python -ArgumentList "../../tests/src/stratum_dummy.py 3"
./p2pool.exe --host xmrnode.facspro.net --rpc-port 18089 --zmq-port 18084 --wallet 44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F9YMEiMNjN6W4Shn4pLcfNAja621jwyg --data-api data --local-api --loglevel 6
findstr /C:"Synchronization finished successfully" p2pool.log

View file

@ -2,7 +2,7 @@ import socket
import time
import sys
f = open(sys.argv[1], 'wb');
f = open('stratum_dummy' + sys.argv[1] + '.log', 'wb');
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(1)
@ -15,7 +15,15 @@ while sock.connect_ex(('127.0.0.1', 3333)) != 0:
print('.')
time.sleep(1)
sock.sendall(b'{"id":1,"method":"login","params":{"login":"x"}}\n')
diff = '';
if (sys.argv[1] == '2'):
diff = '+1000';
if (sys.argv[1] == '3'):
diff = '+10000000';
request = '{"id":1,"method":"login","params":{"login":"x' + diff + '"}}\n'
sock.sendall(request.encode('utf-8'))
while True:
data = sock.recv(1024)