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

feat: onchain filtering for prover version #87

Open
3 tasks
jac18281828 opened this issue Oct 31, 2024 · 0 comments
Open
3 tasks

feat: onchain filtering for prover version #87

jac18281828 opened this issue Oct 31, 2024 · 0 comments

Comments

@jac18281828
Copy link
Contributor

Issue: Upgrade Bonsol Onchain Contract to Support Version-Based Request Queue for Execution

Summary

Upgrade the Bonsol onchain contract to implement a version-based request queue. This enhancement ensures that node operators receive execution request messages only for clients compatible with the current contract version, reducing unnecessary processing and improving system efficiency.

User Story

As a node operator
I want to receive execution request messages only for compatible clients
So that I can avoid processing requests that are incompatible with my client's current version

Requirements

1. Version-Based Filtering of Execution Requests

  • Introduce a version-checking mechanism within the Bonsol onchain contract.
  • Only dispatch execution requests to node operators that are compatible with the version specified in the request.
  • Maintain a mapping of supported client versions and associated queue for efficient request dispatching.

2. Queue Management

  • Implement a version-specific queue system:
    • Each request should be tagged with a version identifier. Implemented in Managment of Risc0 versions #29
    • Separate queues should be maintained for different versions.
    • Requests should be automatically assigned to the correct queue based on the specified client version.

3. Compatibility Check

  • Implement logic to check client compatibility against the Bonsol contract version before processing each request. Implemented in Managment of Risc0 versions #29
  • If a client is incompatible with a given request version, the request should not be dispatched to that client.

4. Fallback Mechanism

  • Create a fallback mechanism for handling requests with unrecognized or deprecated versions.
  • Optionally, send an alert or error message back to the request initiator if their request is incompatible with available node operators.

Technical Details

  • Contract Modifications: Modify the Bonsol contract to store and check version-specific information associated with each execution request.
  • Queue Structure: Define a data structure for managing version-based queues within the onchain contract.
  • Error Handling: Implement error handling to gracefully handle mismatches between the request version and supported client versions.

Acceptance Criteria

  1. Version Filtering: Execution requests should only be received by clients compatible with the specified version.
  2. Queue Isolation: Execution requests for different versions should be processed independently, with each version maintaining its own queue.
  3. Error Response: If a request is incompatible with a node's client version, an error message or alert should be generated, and the request should not be processed.
  4. Documentation: Provide clear documentation for node operators on the new version-based request queue system, including setup, compatibility requirements, and troubleshooting steps.

Dependencies

  • Update client versions and ensure they have the necessary compatibility checks.
  • Contract audit to validate the integrity of the version-based queue mechanism.

Additional Information

This enhancement is aimed at improving the operational efficiency of node operators by eliminating the need to process incompatible execution requests. This system should be flexible to accommodate future updates to the Bonsol contract without major overhauls to the versioning mechanism.

Tasks

  1. Implement version-based queue management system within the contract.
  2. Set up error handling for incompatible version requests.
  3. Document changes and provide a guide for node operators.

Related Issues

Milestones

  • Development Phase: Complete implementation of version-based request queue system.
  • Testing Phase: Conduct extensive testing to verify the compatibility checks, queue management, and error handling.
  • Deployment Phase: Roll out to production with version-specific instructions for node operators.

Notes

This upgrade will help in scaling the network by ensuring compatibility between node operators and the clients they serve. Node operators should see an improvement in operational efficiency with reduced processing of incompatible requests.

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

No branches or pull requests

1 participant