feat(core): implement core/scheduler - #466
Conversation
- Add `Scheduler` struct (WIP) - Add `new_slot_ticker`
- Fix duplicated code
- `valcache` is required by scheduler - Fixes cyclical dependency issue
- Use `valcache` to get the list of active validators.
- TODO's regarding concurrent access while resolving duties
- Try to reuse existing infrastructure
- Preserve only Actor API
|
@claude Re-review this PR. Check for your previous review and recent comments. |
|
Claude finished @emlautarom1's task in 2m 15s —— View job Re-review:
|
- Has `ValidatorCache` as a field
- Make `BeaconNodeClient` always have a valid `ValidatorCache` on construction
Resolve validatorapi conflicts against main's newer sibling PRs: - types.rs: adopt main's real SignedVoluntaryExit + selection response types; drop the branch's obsolete placeholder structs. - testutils.rs: union both sides' TestHandler fields/builders/impls. - router.rs: keep the branch's proxy-wired new_router + attestation/ aggregation handlers and tests; adopt main's typed selections handlers (bounded_post body limits + sync variant); drop the 3 superseded branch selection tests in favour of main's 7 (adapted to test_router). - component.rs: take main's beacon_committee_selections impl + downcast helpers; keep the branch's timeout-wrapped validators call and the attestation/aggregation handlers/tests. Reconcile the attestation resolver onto main's #466 duty-definition model: main replaced the generic DutyDefinitionSet<T> with a non-generic HashMap<PubKey, DutyDefinition>. Extend AttesterDutyDefinition with committee_index / committee_length / committees_at_slot / validator_committee_index (mirroring Charon's eth2v1.AttesterDuty, which core's thin definition had dropped), populate them in the beacon-datum TryInto, and rewrite resolve_attestation_validator_index + its tests to match DutyDefinition::Attester. fmt, clippy -D warnings, and the full workspace test suite pass. Co-Authored-By: Bohdan Ohorodnii <35969035+varex83@users.noreply.github.com>
…atorapi-pr2-attestation-aggregation Re-sync PR2 onto its actual stack base (PR1, which already contains main) rather than merging main directly, so the PR diff stays scoped to PR2's attestation/aggregation changes. Conflict resolutions match the prior main-merge (validatorapi types/router/ component/testutils unions + the duty-definition model reconciliation onto main's #466 non-generic DutyDefinitionSet); additionally preserves PR1's 16 MiB PROPOSAL_BODY_LIMIT / sized_post block-submission change. fmt, clippy -D warnings, and the full pluto-core test suite (502) pass. Co-Authored-By: Bohdan Ohorodnii <35969035+varex83@users.noreply.github.com>
Closes #176
Uses an Actor model to implement the
core/schedulermodule, solving some concurrency hacks that the original implementation had.Metrics have been ported using the existing Vise patterns but are untested.