參考 FPGA-accelerated TrustZone-enabled IOTA Swarm Nodes執行 2.4 dcurl’s POW using LampaLab/iota_fpga
root@lampa:~# ifconfig eth0 192.168.0.43
root@lampa:~# route add default gw 192.168.0.1
root@lampa:~# root@lampa:~# sh init_curl_pow.sh
ajubuntu@ubuntu:~$ uname -r
4.4.0-21-generic
PyOTA 2.0.5 -> PyOTA 2.0.6
root@lampa:~#uname -r
4.9.78-ltsi-06655-ge681fba
root@lampa:~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255
ether b2:b0:b6:5a:97:44 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 35 base 0xa000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 120 bytes 10904 (10.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 120 bytes 10904 (10.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@lampa:~# ifconfig eth0 192.168.0.43
root@lampa:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.43 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::b0b0:b6ff:fe5a:9744 prefixlen 64 scopeid 0x20<link>
inet6 2001:288:66b1:88:b0b0:b6ff:fe5a:9744 prefixlen 64 scopeid 0x0<g>
ether b2:b0:b6:5a:97:44 txqueuelen 1000 (Ethernet)
RX packets 3495 bytes 229814 (224.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 69 bytes 4726 (4.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 35 base 0xa000
root@lampa:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
root@lampa:~# route add default gw 192.168.0.1
vi /etc/resolv.conf
# cat /proc/version
Linux version 4.9.78-ltsi-06655-ge681fba (lampa@lampa) (gcc version 7.1.1 20170510 (Linaro GCC 7.1-2017.05) )
root@lampa:~/iota-swarm-node# python -V
Python 2.7.13
root@lampa:~/iota-swarm-node# make check
Running test suite...
==[ tests/generate_address.py ]==
Generating an unused address ...
Traceback (most recent call last):
File "tests/generate_address.py", line 22, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
==[ tests/get_tips.py ]==
Getting tips ...
Traceback (most recent call last):
File "tests/get_tips.py", line 26, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
/bin/sh: 6: kill: No such process
==[ tests/send_transfer.py ]==
Send send transfer command ...
Traceback (most recent call last):
File "tests/send_transfer.py", line 37, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_all_claims.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"get_all_claims","uuid": "V9TCFLAOGGTAQATTJBLABAG9WY"} "
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_claim_info.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"get_claim_info","hash_txn": "NFVYYZEQHZYJHILHNDONAWSHSCSCEXXEFUQORWGCMCBDIOMZTUKGMOJWOIJNU"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/new_claim.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid", "command":"new_claim","uuid": "V9TCFLAOGGTAQATTJBLABAG9WY", "part_a":"V9TCFLAOGGTAQATTJBLABAG9WY","p"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_all_revoke_claims.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"get_all_revoke_claims","uuid": "SD9BCRDGJYWDHPTDNOPRULFWWG"} "
/bin/sh: 6: kill: No such process
==[ tests/tangleid/login.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"login","uuid":"QQ9BCRDGJYWDHPTDNOPRULFWWG"} "
/bin/sh: 6: kill: No such process
==[ tests/tangleid/send_notify.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"send_notify","uuid":"SD9BCRDGJYWDHPTDNOPRULFWWG","receiver": "SD9BCRDGJYWDHPTDNOPRULFWWG","
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_all_notifies.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"get_all_notifies","uuid": "SD9BCRDGJYWDHPTDNOPRULFWWG"} "
/bin/sh: 6: kill: No such process
==[ tests/tangleid/new_user.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"new_user","first_name":"Huang","cosignerp":"KD9BCRDGJYWDHPTDNOPRULFWWG","cosigners":"SD9BC"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/new_group.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"new_group","group_name":"NCKU","group_picture":"https://s3-us-west-1.amazonaws.com/niusnew"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/revoke_claim.sh ]==
tests/common.sh: line 2: curl: command not found
Assert failed: " {"extension":"tangleid","command":"revoke_claim","uuid": "SD9BCRDGJYWDHPTDNOPRULFWWG","txnhash":"NFVYYZEQHZYJHILHNDONAWSHSCSC"
/bin/sh: 6: kill: No such process
/bin/sh: 8: kill: No such process
Makefile:18: recipe for target 'check' failed
make: *** [check] Error 1
[ 5.598068] socfpga-dwmac ff702000.ethernet eth0: registered PTP clock
[ 5.604770] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
done. erver:
[....] Cleaning up temporary files.... ok
INIT: Entering runlevel: 5
[....] Starting cgroup management daemon: cgmanager[....] Starting enhanced sys.
[....] Starting cgroup management proxy daemon: cgproxy. ok
[....] Starting periodic command scheduler: cron. ok
[....] Starting system message bus: dbus. ok
[....] Starting NTP server: ntpd. ok
[....] Starting OpenBSD Secure Shell server: sshd. ok
$ python server.py
Listening on localhost:8000
root@lampa:~/iota-swarm-node# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
root@lampa:~/iota-swarm-node# python tests/send_transfer.py
Send send transfer command ...
Get request data ... {"value": 0, "tag": "PYTHONTEST", "tips_type": 0, "address}
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 39638)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblok
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "server.py", line 54, in do_POST
dict_tips = get_tips(int(request_command['tips_type']))
File "/root/iota-swarm-node/swarm_node.py", line 44, in get_tips
return api.get_transactions_to_approve(DEPTH)
File "/usr/local/lib/python2.7/dist-packages/iota/api.py", line 368, in get_te
return core.GetTransactionsToApproveCommand(self.adapter)(depth=depth)
File "/usr/local/lib/python2.7/dist-packages/iota/commands/__init__.py", line_
self.response = self._execute(self.request)
File "/usr/local/lib/python2.7/dist-packages/iota/commands/__init__.py", linee
return self.adapter.send_request(request)
File "/usr/local/lib/python2.7/dist-packages/iota/adapter/__init__.py", line t
**kwargs
File "/usr/local/lib/python2.7/dist-packages/iota/adapter/__init__.py", line t
response = request(method=method, url=url, data=payload, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in ret
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 508,t
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 618,d
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 508,d
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='node1.puyuma.org', port=14266): Max r)
----------------------------------------
Traceback (most recent call last):
File "tests/send_transfer.py", line 37, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1201, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 438, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 402, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''
root@lampa:~/iota-swarm-node# python tests/generate_address.py
Generating an unused address ...
Get request data ... {"command": "generate_address"}
Generating an unused address ...
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 39636)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblok
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "server.py", line 45, in do_POST
result = generate_address()
File "/root/iota-swarm-node/swarm_node.py", line 33, in generate_address
return api.get_new_addresses(count=None, index=None)
File "/usr/local/lib/python2.7/dist-packages/iota/api.py", line 712, in get_ns
seed = self.seed,
File "/usr/local/lib/python2.7/dist-packages/iota/commands/__init__.py", line_
self.response = self._execute(self.request)
File "/usr/local/lib/python2.7/dist-packages/iota/commands/extended/get_new_ae
self._find_addresses(seed, index, count, security_level, checksum),
File "/usr/local/lib/python2.7/dist-packages/iota/commands/extended/get_new_as
addresses=[addy.address]
File "/usr/local/lib/python2.7/dist-packages/iota/commands/__init__.py", line_
self.response = self._execute(self.request)
File "/usr/local/lib/python2.7/dist-packages/iota/commands/__init__.py", linee
return self.adapter.send_request(request)
File "/usr/local/lib/python2.7/dist-packages/iota/adapter/__init__.py", line t
**kwargs
File "/usr/local/lib/python2.7/dist-packages/iota/adapter/__init__.py", line t
response = request(method=method, url=url, data=payload, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in ret
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 508,t
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 618,d
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 508,d
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='node1.puyuma.org', port=14266): Max r)
----------------------------------------
Traceback (most recent call last):
File "tests/generate_address.py", line 22, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1201, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 438, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 402, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''
make[1]: Entering directory '/root/iota-swarm-node/deps/dcurl'
CC build/curl.o
CC build/constants.o
CC build/trinary.o
CC build/dcurl.o
CC build/pow_c.o
CC build/test-trinary.o
LD build/test-trinary
CC build/test-curl.o
LD build/test-curl
CC build/test-pow_c.o
LD build/test-pow_c
LD build/libdcurl.so
Makefile:135: "skip build/test-multi_pow_cpu because PyIOTA is not installed."
rm build/test-trinary.o build/test-curl.o build/test-pow_c.o
make[1]: Leaving directory '/root/iota-swarm-node/deps/dcurl'
root@lampa:~/iota-swarm-node# make check
Running test suite...
Listening on localhost:8000
==[ tests/generate_address.py ]==
Generating an unused address ...
Traceback (most recent call last):
File "tests/generate_address.py", line 22, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
==[ tests/get_tips.py ]==
Getting tips ...
Traceback (most recent call last):
File "tests/get_tips.py", line 26, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
/bin/sh: 6: kill: No such process
==[ tests/send_transfer.py ]==
Send send transfer command ...
Traceback (most recent call last):
File "tests/send_transfer.py", line 37, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_all_claims.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"get_all_claims","uuid": "V9"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_claim_info.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"get_claim_info","hash_txn":"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/new_claim.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid", "command":"new_claim","uuid": "V9TCFL"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_all_revoke_claims.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"get_all_revoke_claims","uui"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/login.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"login","uuid":"QQ9BCRDGJYWD"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/send_notify.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"send_notify","uuid":"SD9BCR"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/get_all_notifies.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"get_all_notifies","uuid": ""
/bin/sh: 6: kill: No such process
==[ tests/tangleid/new_user.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"new_user","first_name":"Hua"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/new_group.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"new_group","group_name":"NC"
/bin/sh: 6: kill: No such process
==[ tests/tangleid/revoke_claim.sh ]==
curl: (7) Failed to connect to localhost port 8000: Connection refused
Assert failed: " {"extension":"tangleid","command":"revoke_claim","uuid": "SD9B"
/bin/sh: 6: kill: No such process
/bin/sh: 8: kill: No such process
Makefile:18: recipe for target 'check' failed
make: *** [check] Error 1
root@lampa:~/iota-swarm-node# python tests/get_tips.py
Getting tips ...
Get request data ... {"type": 0, "command": "get_tips"}
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 39640)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblok
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "server.py", line 47, in do_POST
result = get_tips(int(request_command['type']))
File "/root/iota-swarm-node/swarm_node.py", line 44, in get_tips
return api.get_transactions_to_approve(DEPTH)
File "/usr/local/lib/python2.7/dist-packages/iota/api.py", line 368, in get_te
return core.GetTransactionsToApproveCommand(self.adapter)(depth=depth)
File "/usr/local/lib/python2.7/dist-packages/iota/commands/__init__.py", line_
self.response = self._execute(self.request)
File "/usr/local/lib/python2.7/dist-packages/iota/commands/__init__.py", linee
return self.adapter.send_request(request)
File "/usr/local/lib/python2.7/dist-packages/iota/adapter/__init__.py", line t
**kwargs
File "/usr/local/lib/python2.7/dist-packages/iota/adapter/__init__.py", line t
response = request(method=method, url=url, data=payload, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in ret
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 508,t
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 618,d
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 508,d
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='node1.puyuma.org', port=14266): Max r)
----------------------------------------
Traceback (most recent call last):
File "tests/get_tips.py", line 26, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1201, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 438, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 402, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''
root@lampa:~/iota-swarm-node# make check
make: Warning: File 'Makefile' has modification time 1531196595 s in the future
Running test suite...
Listening on localhost:8000
==[ tests/generate_address.py ]==
Generating an unused address ...
Get request data ... {"command": "generate_address"}
Generating an unused address ...
Result ... {u'addresses': [Address('SJXKCIOFOCWFTOAEOLLCRRNSY9WTPUEAUTSWDXUNMSS}
127.0.0.1 - - [13/Jul/2018 05:56:58] "POST / HTTP/1.1" 200 -
Response ... {u'addresses': [Address('SJXKCIOFOCWFTOAEOLLCRRNSY9WTPUEAUTSWDXUNM}
Duration: 1531461158.92 seconds
==[ tests/get_tips.py ]==
Getting tips ...
Get request data ... {"type": 0, "command": "get_tips"}
Result ... {u'duration': 5, u'branchTransaction': TransactionHash('SRFGRAJXWOXF}
127.0.0.1 - - [13/Jul/2018 05:56:58] "POST / HTTP/1.1" 200 -
Response ... {u'duration': 5, u'branchTransaction': TransactionHash('SRFGRAJXWO}
Duration: 0.399559020996 seconds
==[ tests/send_transfer.py ]==
Send send transfer command ...
Get request data ... {"value": 0, "tag": "PYTHONTEST", "tips_type": 0, "address}
Start to sransfer ...
Setting output transaction ...
Bundle finalize ...
Do POW for this transaction ...
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 43454)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblok
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "server.py", line 57, in do_POST
request_command['value']), dict_tips, debug)
File "/root/iota-swarm-node/swarm_node.py", line 143, in send_transfer
tx_tryte = insert_to_trytes(2646, 2673, str(nonce), tx_tryte)
File "/root/iota-swarm-node/swarm_node.py", line 24, in insert_to_trytes
trytes = trytes[:index_start] + str_insert + trytes[index_end:]
File "/usr/local/lib/python2.7/dist-packages/iota/types.py", line 394, in __a_
return TryteString(self._trytes + other)
File "/usr/local/lib/python2.7/dist-packages/iota/types.py", line 269, in __i_
'trytes': trytes,
ValueError: Invalid character 'o' at position 2647 (expected A-Z or 9).
----------------------------------------
Traceback (most recent call last):
File "tests/send_transfer.py", line 37, in <module>
response = urllib2.urlopen(req, json.dumps(data))
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1201, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1121, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 438, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 402, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine: ''
[ 305.144495] EXT4-fs (mmcblk0p2): error count s1
[ 305.150572] EXT4-fs (mmcblk0p2): initial error at time 1: ext4_iget:4748: in6
[ 305.158409] EXT4-fs (mmcblk0p2): last error at time 44: ext4_iget:4748: inod5
shufps/dcurl/src/dcurl.c
...
et_trytes = PowFPGA(trytes, mwm, selected_mutex_id);
...
et_trytes: nonce+trytes ?
PowFPGA(){
...
int8_t *last_result = nonce_to_result(trytes_t, nonce);
...
}
https://github.com/shufps/dcurl/blob/dev/src/pow_fpga.c#L407
main(){
for (int i = 0; i < TRANSACTION_LEN; i=i+1)
if (i < NONCE_OFFSET)
otrytes[i] = itrytes[i];
else
otrytes[i] = nonce_trytes[i - NONCE_OFFSET];
}