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

🐛 Use uint32 for flush count packing #176

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

AlexV525
Copy link
Contributor

Traceback (most recent call last):
  File "/data/atomicals-electrumx/electrumx_server", line 47, in main
    asyncio.run(controller.run())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/data/atomicals-electrumx/electrumx/lib/server_base.py", line 129, in run
    await server_task
  File "/data/atomicals-electrumx/electrumx/lib/server_base.py", line 102, in serve
    await self.serve(shutdown_event)
  File "/data/atomicals-electrumx/electrumx/server/controller.py", line 134, in serve
    async with OldTaskGroup() as group:
  File "/usr/local/lib/python3.10/dist-packages/aiorpcX-0.22.1-py3.10.egg/aiorpcx/curio.py", line 297, in __aexit__
    await self.join()
  File "/data/atomicals-electrumx/electrumx/lib/util.py", line 370, in join
    task.result()
  File "/data/atomicals-electrumx/electrumx/server/block_processor.py", line 3587, in fetch_and_process_blocks
    async with OldTaskGroup() as group:
  File "/usr/local/lib/python3.10/dist-packages/aiorpcX-0.22.1-py3.10.egg/aiorpcx/curio.py", line 297, in __aexit__
    await self.join()
  File "/data/atomicals-electrumx/electrumx/lib/util.py", line 370, in join
    task.result()
  File "/data/atomicals-electrumx/electrumx/server/block_processor.py", line 3540, in _process_prefetched_blocks
    await self._first_caught_up()
  File "/data/atomicals-electrumx/electrumx/server/block_processor.py", line 3556, in _first_caught_up
    await self.flush(True)
  File "/data/atomicals-electrumx/electrumx/server/block_processor.py", line 464, in flush
    await self.run_in_thread_with_lock(flush)
  File "/data/atomicals-electrumx/electrumx/server/block_processor.py", line 313, in run_in_thread_with_lock
    return await asyncio.shield(run_in_thread_locked())
  File "/data/atomicals-electrumx/electrumx/server/block_processor.py", line 312, in run_in_thread_locked
    return await run_in_thread(func, *args)
  File "/usr/local/lib/python3.10/dist-packages/aiorpcX-0.22.1-py3.10.egg/aiorpcx/curio.py", line 57, in run_in_thread
    return await get_event_loop().run_in_executor(None, func, *args)
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/data/atomicals-electrumx/electrumx/server/block_processor.py", line 462, in flush
    self.db.flush_dbs(self.flush_data(), flush_utxos,
  File "/data/atomicals-electrumx/electrumx/server/db.py", line 439, in flush_dbs
    self.flush_history()
  File "/data/atomicals-electrumx/electrumx/server/db.py", line 515, in flush_history
    self.history.flush()
  File "/data/atomicals-electrumx/electrumx/server/history.py", line 160, in flush
    flush_id = pack_be_uint16(self.flush_count)
struct.error: 'H' format requires 0 <= number <= 65535

@AlexV525 AlexV525 marked this pull request as draft April 29, 2024 03:26
@AlexV525 AlexV525 marked this pull request as ready for review April 29, 2024 11:58
@AlexV525 AlexV525 merged commit 341abdc into develop May 6, 2024
2 checks passed
@AlexV525 AlexV525 deleted the fix/flush-count branch May 6, 2024 08:14
@AlexV525 AlexV525 mentioned this pull request May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants