-
Notifications
You must be signed in to change notification settings - Fork 33
v2: sprint 0 #469
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
Open
MegaRedHand
wants to merge
19
commits into
dev
Choose a base branch
from
v2-dev-0
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
v2: sprint 0 #469
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes # ### What Changed? <!-- Describe the changes made in this pull request --> ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it --------- Co-authored-by: Damian Ramirez <damian.ramirez@lambdaclass.com> Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
### What Changed? This PR changed the previous sync RPC server to an async one using the [tarpc](https://docs.rs/tarpc/latest/tarpc/index.html) crate. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? This PR adds an example for the aggregator. 1. Create a contract that emits an event when a task is created. 2. To use the aggregator, you should implement the `TaskProcessor` and `TaskResponse` traits and create your own logic for processing the task. 3. Deploy the task contract 4. Create an operator set with a total delegated stake quorum 5. Register operators to the operator set 6. Start the aggregator 7. Emit a task with the contract 8. Send an RPC request to the aggregator with the task response and signature of both operators 9. Since the threshold is reached, the BLS aggregation service will send the aggregated response to the aggregator A channel was added to receive the response from the BLS Aggregator and compare it against a manually signature aggregator. ```rust // Aggregate the bls signatures manually let quorum_apks_g1 = aggregate_g1_public_keys(&[bls_key_pair.clone(), bls_key_pair_2.clone()]); let signers_apk_g2 = aggregate_g2_public_keys(&[bls_key_pair.clone(), bls_key_pair_2.clone()]); let signers_agg_sig_g1 = aggregate_g1_signatures(&[bls_signature.clone(), bls_signature_2.clone()]); // Wait for the aggregator to aggregate the responses and then compare the results let aggregated_response = receiver.recv().await.unwrap(); assert_eq!(aggregated_response.quorum_apks_g1, vec![quorum_apks_g1]); assert_eq!(aggregated_response.signers_apk_g2, signers_apk_g2); assert_eq!(aggregated_response.signers_agg_sig_g1, signers_agg_sig_g1); ``` --- To run the example: ```sh cargo run --example aggregator ```  ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? This PR adds an `operator` crate to the SDK. Now you can start an operator, which will subscribe to `TaskEvents` and process them according to its implementation in the `OperatorTaskProcessor` trait. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
…e `start()` (#437) ### What Changed? Based on the [example](#436), asked to move the creation of the `AvsRegistryChainReader` and the `ClientAggregator` inside the `start`. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it --------- Co-authored-by: Pablo Deymonnaz <pdeymon@fi.uba.ar> Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
… parameter in Aggregator (#457) ### What Changed? This PR removes the parameter that the `start()` function receives since we already have this value in `AggregatorConfig`. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? This PR adds an example of how to initialize and start a registered `operator`. The idea is to show what the dev experience would be to have an operator begin listening for tasks and processing them. Since I started from this [PR](#435), the diff appears quite large + the bindings. The example is located in `examples/operator` ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it --------- Co-authored-by: Pablo Deymonnaz <pdeymon@fi.uba.ar> Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
### What Changed? This PR adds a `task-generator` crate to the SDK. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? This PR adds a `challenger` crate ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it --------- Co-authored-by: Pablo Deymonnaz <pdeymon@fi.uba.ar>
# DO NOT MERGE UNTIL #442 ### What Changed? This PR adds a devX example of the `task generator` ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? - Improve how we were using the builder pattern in the Task Generator. - Create a trait that simulates the contract—users must implement it to define and create their tasks. - Accept a contract generated by the bindings in `TaskGeneratorBuilder` and use it for task creation. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? - Removed the `TaskProcessor` trait from `Operator`. - `Operator::start` now accepts any event type (`SolEvent`) and any task-response type (`SolType` + `SolValue`), making it fully generic. - Now `start()` receives a function as a parameter, where the user should put their business logic to respond to a task. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? In #460, we refactored the operator so it no longer uses the `OperatorTaskProcessor` trait, allowing us to remove this file. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
# DO NOT MERGE UNTIL #445 ### What Changed? This PR adds an example of the challenger devX ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What changed This PR updates the `TaskManagerContract` trait by changing the signature of `create_new_task`: - Removes the `SolCall` type. - `create_new_task` now returns an `impl Future<Output = Result<N::ReceiptResponse, TaskGeneratorError>> + Send`. Users no need to use the `SolCall` from the bindings. Now they need to call `.send()` and `.get_receipt()`. - Updates the example usage ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? Rename `Task Generator` to `Task Spammer` ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
### What Changed? This PR merges the `dev` branch into `v2` - Regenerated the bindings for the examples - Fixed the examples to reflect changes in the bindings ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
Fixes # ### What Changed? <!-- Describe the changes made in this pull request --> ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it --------- Co-authored-by: Pablo Deymonnaz <deymonnaz@gmail.com> Co-authored-by: Tomás Grüner <47506558+MegaRedHand@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Changed?
This PR contains the first iteration of the high-level modules.
Each module is implemented in a crate of the same name:
crates/aggregator/
for theAggregator
crates/operator/
for theOperator
crates/task-generator/
for theTask Spammer
crates/challenger/
for theChallenger
Usage examples for each module are included under the
examples/
directory.Links to each example:
Aggregator
Operator
Task Spammer
Challenger
Reviewer Checklist
changelog-X
labels (if applies)