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

CE 134: Work-package sharing #303

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from
Draft

CE 134: Work-package sharing #303

wants to merge 30 commits into from

Conversation

MacOMNI
Copy link
Contributor

@MacOMNI MacOMNI commented Feb 25, 2025

No description provided.

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 21.97802% with 142 lines in your changes missing coverage. Please review.

Project coverage is 85.21%. Comparing base (6c4bb08) to head (2204eff).

Files with missing lines Patch % Lines
...ces/Blockchain/Validator/GuaranteeingService.swift 3.30% 117 Missing ⚠️
...urces/Node/NetworkingProtocol/NetworkManager.swift 8.33% 11 Missing ⚠️
...es/Blockchain/RuntimeProtocols/RuntimeEvents.swift 43.75% 9 Missing ⚠️
...NetworkingProtocol/CommonEphemeral/CERequest.swift 44.44% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #303      +/-   ##
==========================================
- Coverage   85.53%   85.21%   -0.33%     
==========================================
  Files         307      307              
  Lines       25092    25253     +161     
==========================================
+ Hits        21463    21519      +56     
- Misses       3629     3734     +105     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// 4. TODO: Send the bundle to other guarantors
for guarantor in guarantors {
// 5. TODO: Something needs to do, when receive workpackage bundle
try await guarantor.receiveWorkPackageBundle(
Copy link
Member

Choose a reason for hiding this comment

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

we can't directly invoke methods on other guarantors. this should be emit an event.
and the networking code should listen to this event to make network request
and the networking code to handle the request by emit another event
and guaranteeing service listen to the event and call receiveWorkPackageBundle

private func refinePkg(package: WorkPackageRef) async throws {
// Work Package Sharing (Send Side)
public func shareWorkPackage(coreIndex _: CoreIndex, workPackage: WorkPackageRef, extrinsics: [Data]) async throws {
try await refinePkg(workPackage: workPackage, extrinsics: extrinsics)
Copy link
Member

Choose a reason for hiding this comment

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

refine is not part of share work package
the tasks to do when received a work package should be:

validate
share work package
refine
share work bundle

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