-
Notifications
You must be signed in to change notification settings - Fork 79
feat: Add RPC-enabled DataStore for lazy loading #1487
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
base: next
Are you sure you want to change the base?
feat: Add RPC-enabled DataStore for lazy loading #1487
Conversation
Refactor note_screener initialization to use with_rpc method.
mmagician
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also make sure to run lint jobs to clear the CI jobs?
| Ok(note_script) | ||
| }, | ||
| Err(rpc_err) => Err(DataStoreError::other(format!( | ||
| "Note script with root {script_root} not found locally or via RPC: {rpc_err}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this error message should not say "locally" since it's within the rpc-call match statement
| if let Err(err) = store | ||
| .upsert_note_scripts(core::slice::from_ref(¬e_script)) | ||
| .await | ||
| { | ||
| // Log but don't fail - we still have the script to return | ||
| // In a no_std environment, we can't easily log, so we just continue | ||
| let _ = err; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be good to understand the situation(s) when a script cannot be upserted and handle those error cases. It's a bit weird if we are able to fetch the script but not upsert it.
Also, at this point upsert shouldn't be necessary (we know it's not in the store, right?), is a pure insert available?
Refactor error handling and logging for fetching note scripts.
Reformatted import statements for better readability.
Adds RPC support to DataStore for lazy loading of note scripts and foreign account inputs when not found locally.
Resolves #1456