ExchangeUnion / raiden

Raiden Network
https://developer.raiden.network
MIT License
0 stars 0 forks source link

Raiden process logs show exceptions when resolving a hash #4

Open ghost opened 5 years ago

ghost commented 5 years ago

Maker:

➜  xud-simnet git:(master) xucli sell 0.1 WETH/BTC 0.022
no matches found
remaining 0.1 WETH entered the order book as 43d914b0-a89e-11e9-84bc-67e28140a478

maker-xud-log: https://paste.ubuntu.com/p/Tf6TD3gr5p/ maker-raiden-log: https://paste.ubuntu.com/p/FzspCPJVwB/

Taker:

➜  xud-simnet git:(master) xucli buy 0.1 WETH/BTC 0.022
swapped 0.1 WETH with peer order 43d914b0-a89e-11e9-84bc-67e28140a478

taker-xud-log: https://paste.ubuntu.com/p/Pdxm5pChW8/ taker-raiden-log: https://paste.ubuntu.com/p/S4dQ7Z2yYr/

offerm commented 5 years ago

@erkarl logs are not available any more. Can you please try to reproduce and attach logs?

This is not a P1 as swap is working fine. It will be resolved once we sync with raiden dev branch and we remove the feature of supporting sha256 and sha3 in parallel.

offerm commented 5 years ago

Reducing to P3 and taking out of 1.0.0-bounty project

ghost commented 5 years ago
--- Logging error ---
Traceback (most recent call last):
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/structlog/processors.py", line 201, in _json_fallback_handler
    return obj.__structlog__()
AttributeError: 'RevealSecret' object has no attribute '__structlog__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/logging/handlers.py", line 68, in emit
    if self.shouldRollover(record):
  File "/usr/lib/python3.7/logging/handlers.py", line 184, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 880, in format
    return fmt.format(record)
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/structlog/stdlib.py", line 490, in format
    record.msg = self.processor(logger, meth_name, ed)
  File "/home/ar/raiden/raiden/log_config.py", line 31, in wrapper
    result = first_func(*args, **kwargs)
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/structlog/processors.py", line 187, in __call__
    return self._dumps(event_dict, **self._dumps_kw)
  File "/usr/lib/python3.7/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/usr/lib/python3.7/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python3.7/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/structlog/processors.py", line 203, in _json_fallback_handler
    return repr(obj)
  File "/home/ar/raiden/raiden/messages.py", line 841, in __repr__
    self.__class__.__name__, self.message_identifier, pex(self.secrethash), pex(self.hash)
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/cachetools/__init__.py", line 46, in wrapper
    v = func(*args, **kwargs)
  File "/home/ar/raiden/raiden/messages.py", line 849, in secrethash
    elif hashalgo == HashAlgo.SHA256:
NameError: name 'hashalgo' is not defined
Call stack:
  File "/home/ar/raiden/raiden/raiden_service.py", line 720, in _handle_event
    raiden=self, chain_state=chain_state, event=raiden_event
  File "/home/ar/raiden/raiden/raiden_event_handler.py", line 100, in on_raiden_event
    self.handle_send_secretreveal(raiden, event)
  File "/home/ar/raiden/raiden/raiden_event_handler.py", line 162, in handle_send_secretreveal
    raiden.transport.send_async(reveal_secret_event.queue_identifier, reveal_secret_message)
  File "/home/ar/raiden/raiden/network/transport/matrix/transport.py", line 520, in send_async
    queue_identifier=queue_identifier,
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/structlog/stdlib.py", line 63, in debug
    return self._proxy_to_logger("debug", event, *args, **kw)
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/structlog/stdlib.py", line 119, in _proxy_to_logger
    method_name, event=event, **event_kw
  File "/home/ar/raiden/venv/lib/python3.7/site-packages/structlog/_base.py", line 192, in _proxy_to_logger
    return getattr(self._logger, method_name)(*args, **kw)
Unable to print the message and arguments - possible formatting error.