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

efficient receipts transfer #339

Merged
merged 76 commits into from
Jan 13, 2025
Merged

Conversation

kkowalski-reef
Copy link
Collaborator

@kkowalski-reef kkowalski-reef commented Dec 4, 2024

General ideas:

  • Miners append serialized receipts to jsonl files, a file is equivalent to a "page" of receipts.
  • Page files are append-only.
  • Receipts are always appended to the "current" page.
  • Current page number is determined by global clock so that we don't need to add additional communication about the pages themselves.
  • Current page changes every 5 minutes, so as not to make the pages too big. (this may be tweaked or could be moved to a dynamic config)
  • Validators keep up with receipts by continuously requesting 2 most recent pages - that's 2 to allow for slight desync between their clocks.
  • Validators use Range request header to only retrieve receipts added since their last request - or in most cases get an empty response indicating there's nothing new to serve.
  • When starting up, validators will request all pages for the latest 5 hours - so that they have 2 full cycles worth of data to work with.

# Conflicts:
#	compute_horde/uv.lock
#	validator/app/src/compute_horde_validator/validator/tasks.py
@kkowalski-reef kkowalski-reef force-pushed the COM-253-efficient-receipts-transfer branch from 6d08b42 to bfe0c72 Compare December 12, 2024 20:30
@kkowalski-reef kkowalski-reef force-pushed the COM-253-efficient-receipts-transfer branch 2 times, most recently from f5dd22d to e36ed43 Compare December 12, 2024 20:48
@kkowalski-reef kkowalski-reef force-pushed the COM-253-efficient-receipts-transfer branch from e36ed43 to bc034a3 Compare December 12, 2024 20:51
@kkowalski-reef kkowalski-reef force-pushed the COM-253-efficient-receipts-transfer branch from e3f0d65 to 3e45c7a Compare January 6, 2025 07:57
@kkowalski-reef kkowalski-reef force-pushed the COM-253-efficient-receipts-transfer branch from 0b03021 to 8d2da9b Compare January 8, 2025 17:00
# Conflicts:
#	compute_horde/pyproject.toml
#	miner/app/src/compute_horde_miner/settings.py
#	validator/app/src/compute_horde_validator/settings.py
#	validator/envs/runner/data/docker-compose.yml
@kkowalski-reef kkowalski-reef force-pushed the COM-253-efficient-receipts-transfer branch from 25bcb52 to 6ed7daa Compare January 13, 2025 14:04
@kkowalski-reef kkowalski-reef merged commit 9b894f2 into master Jan 13, 2025
13 of 15 checks passed
@kkowalski-reef kkowalski-reef deleted the COM-253-efficient-receipts-transfer branch January 13, 2025 14:08
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