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

per payload-builder payload builder validator registration #5431

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Conversation

tersec
Copy link
Contributor

@tersec tersec commented Sep 15, 2023

No description provided.

if not node.config.payloadBuilderEnable: return

var builderKeys: Table[string, seq[ValidatorPubKey]]
for pubkey in node.attachedValidators[].validators.keys:
Copy link
Member

Choose a reason for hiding this comment

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

where do vc-based validators get registered?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By the VC, which has to do this signing anyway for validators it controls (and the vast majority of what's happening here is signing some messages):

proc registerValidators*(service: DutiesServiceRef) {.async.} =
let vc = service.client
let
currentSlot = vc.getCurrentSlot().get(Slot(0))
genesisFork = vc.forks[0]
registrations =
try:
await vc.prepareRegistrationList(getTime(), genesisFork)
except CancelledError as exc:
debug "Validator registration preparation was interrupted",
slot = currentSlot, fork = genesisFork
raise exc
except CatchableError as exc:
var default: seq[SignedValidatorRegistrationV1]
error "Unexpected error occured while preparing validators " &
"registration data", slot = currentSlot, fork = genesisFork,
err_name = exc.name, err_msg = exc.msg
default
count =
if len(registrations) > 0:
try:
await registerValidator(vc, registrations)
except ValidatorApiError as exc:
warn "Unable to register validators", slot = currentSlot,
fork = genesisFork, err_name = exc.name,
err_msg = exc.msg, reason = exc.getFailureReason()
0
except CancelledError as exc:
debug "Validator registration was interrupted", slot = currentSlot,
fork = genesisFork
raise exc
except CatchableError as exc:
error "Unexpected error occured while registering validators",
slot = currentSlot, fork = genesisFork, err_name = exc.name,
err_msg = exc.msg
0
else:
0

@github-actions
Copy link

Unit Test Results

         9 files  ±0    1 089 suites  ±0   44m 6s ⏱️ + 5m 16s
  3 847 tests ±0    3 568 ✔️ ±0  279 💤 ±0  0 ±0 
15 892 runs  ±0  15 587 ✔️ ±0  305 💤 ±0  0 ±0 

Results for commit f96310c. ± Comparison against base commit 5a29ad7.

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