8000 feat: inclusion lists by jayrabjohns · Pull Request #158 · gattaca-com/helix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: inclusion lists #158

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

8000
Merged
merged 10 commits into from
May 27, 2025
Merged

feat: inclusion lists #158

merged 10 commits into from
May 27, 2025

Conversation

jayrabjohns
Copy link
Contributor
@jayrabjohns jayrabjohns commented May 20, 2025

Working V1 for relay support of inclusion lists.

  • Each slot we fetch the inclusion list from a configured external node. (so all relays have a single authoritative source for the list)
  • If this takes longer than 6 seconds or the validator has opted out then we just don't set a list
  • Also a new API for builders /relay/v1/builder/inclusion_list which returns a copy of this slots relay list (if one exists)

We fetch the IL as part of the housekeeper and communicate with the API through a redis pub sub channel. We also store inclusion lists in postgres so we can look back at things if needed.

@jayrabjohns jayrabjohns force-pushed the jr/inclusion-lists branch 2 times, most recently from dc885d1 to c5dfae8 Compare May 21, 2025 11:43
@jayrabjohns jayrabjohns marked this pull request as ready for review May 21, 2025 11:59
empty api

basic api & IL fetching

move list fetching into chain event updater

better IL slot cutoff timing

.gitignore local config etc

lint

cleanup
@jayrabjohns jayrabjohns force-pushed the jr/inclusion-lists branch from bfad01f to 3af26b2 Compare May 21, 2025 12:55
@gd-0 gd-0 requested review from 0w3n-d, vladimir-ea and gd-0 May 21, 2025 13:53
crates/api/src/builder/inclusion_list.rs Outdated Show resolved Hide resolved
@jayrabjohns jayrabjohns force-pushed the jr/inclusion-lists branch from a2c69f5 to 3923e3c Compare May 27, 2025 12:48
@jayrabjohns jayrabjohns requested a review from gd-0 May 27, 2025 16:25
let slot: i32 = self.head_slot.try_into().unwrap();
let slot_coordinate = get_slot_coordinate(slot, pub_key, parent_hash);
let (postgres_result, redis_result) = tokio::join!(
self.database.save_inclusion_list(&inclusion_list, slot),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be a good not to join on the db task here. We've seen some spikes when writing to the db lately and wouldn't want to delay the completion of this process_slot task.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's a fair point - we could move the error handling, etc., into the future and leave it as a tokio::spawn, so we don't await it?

@0w3n-d 0w3n-d merged commit ee9aeb1 into develop May 27, 2025
1 of 2 checks passed
@0w3n-d 0w3n-d deleted the jr/inclusion-lists branch May 27, 2025 18:49
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.

371B
3 participants
0