-
Notifications
You must be signed in to change notification settings - Fork 19
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
Create new NativeQuery operation to get encrypted data from the omni-executor #3260
Open
silva-fj
wants to merge
28
commits into
dev
Choose a base branch
from
p-1321-create-a-new-nativecall-getter-to-get-the-accountstore
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
Create new NativeQuery operation to get encrypted data from the omni-executor #3260
silva-fj
wants to merge
28
commits into
dev
from
p-1321-create-a-new-nativecall-getter-to-get-the-accountstore
Conversation
This file contains 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
Refactors the NativeCall concept into a more generic NativeOperation trait to better represent different types of blockchain interactions. This change prepares the codebase for supporting both state-modifying calls and read-only queries in a consistent way. The main changes include: - Create NativeOperation trait with common behavior - Rename native_call.rs to native_operation.rs - Update all related imports and type references - Refactor authentication to be generic over NativeOperation
Extends the executor's native operation system to support query operations for reading blockchain state. This separates the concerns between state-modifying calls and read-only queries. Changes include: - Add NativeQuery enum for read-only operations - Create separate handlers for calls and queries - Split RPC methods into call and query endpoints - Refactor task handling to support both operation types
…tivecall-getter-to-get-the-accountstore
Changes the account store query response to return only Identity objects instead of MemberAccount enum. This simplifies the response type and reduces unnecessary wrapping since we always convert private accounts to public identities during the query.
Removes the unused UnexpectedCall variant from NativeOperationError enum as it's no longer needed after recent refactoring of the native operation handling logic.
Renames createNativeCallOperation to createNativeAuthenticatedOperation for better clarity and consistency with the new type system. Updates all related imports and usages across integration tests.
Adds createNativeQuery helper function and extends createNativeAuthenticatedOperation to handle both NativeCall and NativeQuery operation types. This enables proper type creation and authentication for native query operations in tests.
Adds sendPlainRequestFromNativeQuery helper function to handle plain requests specifically for native query operations. This complements the existing sendPlainRequestFromNativeCall for better separation of concerns.
Add generic type parameter to createNativeAuthenticatedOperation function to provide better type safety and inference for different operation types (NativeCall vs NativeQuery). This change allows TypeScript to properly distinguish between operation types at compile time.
Add a new make target 'clean-data' that removes log and storage database directories in the omni executor. This helps developers clean up test data and reset the environment between test runs.
Move CPU-intensive operations in get_account_store handler to a blocking task using tokio::task::spawn_blocking. This prevents blocking the async runtime with database and crypto operations, improving overall system responsiveness.
Move request decoding and verification into spawn_blocking tasks to prevent blocking the async runtime. This improves performance by handling CPU and crypto operations on dedicated threads while keeping the async RPC handlers responsive.
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.
NativeCall
andNativeQuery
).get_account_store
NativeQuery have been added.