Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitshares txbuffer must be reset when switching workers #505

Closed
bitphage opened this issue Mar 3, 2019 · 0 comments
Closed

Bitshares txbuffer must be reset when switching workers #505

bitphage opened this issue Mar 3, 2019 · 0 comments
Assignees
Labels
component: core WorkerInfrastructure, Storage, Config, node manager [2] Good First Issue Good First Issue [3] Type: Bug [5] Small Task Indicates size of task. Est. between one and two hours

Comments

@bitphage
Copy link
Collaborator

bitphage commented Mar 3, 2019

  1. Setup one SO worker with no key
2019-03-03 15:29:39,841 (worker:124) - worker6 - ERROR - in ontick()
Traceback (most recent call last):
  File "/home/vvk/devel/DEXBot-prod/dexbot/worker.py", line 122, in on_block
    self.workers[worker_name].ontick(data)
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.6/site-packages/Events-0.3-py3.6.egg/events/events.py", line 95, in __call__
    f(*a, **kw)
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/staggered_orders.py", line 1952, in tick
    self.maintain_strategy()
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/staggered_orders.py", line 296, in maintain_strategy
    self.execute()
  File "/home/vvk/devel/DEXBot-prod/dexbot/strategies/base.py", line 993, in execute
    r = self.bitshares.txbuffer.broadcast()
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.6/site-packages/bitshares-0.2.1-py3.6.egg/bitshares/transactionbuilder.py", line 402, in broadcast
    self.sign()
  File "/home/vvk/.local/share/virtualenvs/DEXBot-prod-N9mtHQyI/lib/python3.6/site-packages/bitshares-0.2.1-py3.6.egg/bitshares/transactionbuilder.py", line 380, in sign
    raise MissingKeyError
bitshares.exceptions.MissingKeyError
  1. Error will be raised in another workers too because self.bitshares.txbuffer is common for all workers.

Soluition: reset txbuffer on error

@bitphage bitphage added [1] Status: Available [3] Type: Bug [2] Good First Issue Good First Issue [5] Small Task Indicates size of task. Est. between one and two hours labels Mar 3, 2019
@bitphage bitphage changed the title Bitshares txbuffer must reset when switching workers Bitshares txbuffer must be reset when switching workers Mar 11, 2020
@bitphage bitphage self-assigned this Mar 18, 2020
@bitphage bitphage added the component: core WorkerInfrastructure, Storage, Config, node manager label Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: core WorkerInfrastructure, Storage, Config, node manager [2] Good First Issue Good First Issue [3] Type: Bug [5] Small Task Indicates size of task. Est. between one and two hours
Projects
None yet
Development

No branches or pull requests

1 participant