dashpay / sentinel

DashCore Sentinel Engine
https://www.dash.org
MIT License
32 stars 193 forks source link

Crashes on 12.2 TestNet #23

Closed ryansd92 closed 7 years ago

ryansd92 commented 7 years ago

I am running the latest version of Sentinel on 12.2 testnet and some of my nodes (at least 4) are failing with the following error. All 4 went WATCHDOG_EXPIRED at the same time. When i run with -b all four nodes fail after about 20-30 seconds.

ubuntu@ip-10-0-4-209:~/.dashcore/sentinel$ venv/bin/python bin/sentinel.py
Traceback (most recent call last):
  File "bin/sentinel.py", line 265, in <module>
    main()
  File "bin/sentinel.py", line 218, in main
    prune_expired_proposals(dashd)
  File "bin/sentinel.py", line 65, in prune_expired_proposals
    for proposal in Proposal.expired(dashd.superblockcycle()):
  File "lib/models.py", line 383, in expired
    for proposal in self.select():
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2193, in next
    obj = self.qrw.iterate()
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2253, in iterate
    return self.process_row(row)
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2331, in process_row
    setattr(instance, column, func(row[i]))
  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 1072, in python_value
    return decimal.Decimal(str(value))
  File "/usr/lib/python2.7/decimal.py", line 548, in __new__
    "Invalid literal for Decimal: %r" % value)
  File "/usr/lib/python2.7/decimal.py", line 3872, in _raise_error
    raise error(explanation)
decimal.InvalidOperation: Invalid literal for Decimal: '47,5'
ryansd92 commented 7 years ago

Update: All four nodes just returned to ENABLED but still sentinel fails to run without an error when i bypass the scheduler.

nmarley commented 7 years ago

Thanks for reporting @ryansd92 . I almost want to chalk this up to an issue w/Peewee (the ORM) as it seems to first want to coerce the value into a string before "Decimalizing" here:

  File "/home/ubuntu/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 1072, in python_value
    return decimal.Decimal(str(value))

Looking in to patching this now.

UdjinM6 commented 7 years ago

fixed by #24