Skip to content

Specifing a local node lead to HTTP error with blocks cmd

When I use the command:

./src/silkaj.py issuers 50

I successfully get the result:

### Issuers for last 50 blocks from block n° 41087 to block n° 41137
| uid       |   blocks |   percent |
|-----------+----------+-----------|
| cgeek     |        7 |      14.0 |
| moul      |        6 |      12.0 |
| nay4      |        6 |      12.0 |
| cler53    |        5 |      10.0 |
| simille   |        4 |       8.0 |
| pafzedog  |        4 |       8.0 |
| inso      |        4 |       8.0 |
| kimamila  |        3 |       6.0 |
| gege53    |        2 |       4.0 |
| hacky     |        2 |       4.0 |
| Jean-F    |        2 |       4.0 |
| charles   |        1 |       2.0 |
| gnu-tux   |        1 |       2.0 |
| vincentux |        1 |       2.0 |
| modulix   |        1 |       2.0 |
| mmpio     |        1 |       2.0 |

But if select a particular peer which is very close to me (same network) then I get a 503 HTTP error:

./src/silkaj.py issuers 50 --peer cgeek.fr:9330
Traceback (most recent call last):
  File "./src/silkaj.py", line 54, in <module>
    manage_cmd(ep, c)
  File "./src/silkaj.py", line 32, in manage_cmd
    list_issuers(ep, int(c.subsubcmd), c.contains_switches('last'))
  File "/home/cgeek/dev/silkaj/src/commands.py", line 91, in list_issuers
    issuer["pubkey"] = request(ep, "blockchain/block/" + str(blk_nbr))["issuer"]
  File "/home/cgeek/dev/silkaj/src/network_tools.py", line 62, in request
    response = urllib.request.urlopen(request)
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 503: Service Unavailable

This is most probably because of Duniter HTTP limiter, which returns an error if a particular URL is called too many times in a second.

Edited by Moul
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information