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

Schnorr MuSig Debugging + SDK improvements + SDK debugging #547

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions blueprint-manager/src/executor/event_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ pub(crate) async fn handle_tangle_event(
poll_result: EventPollResult,
client: &ServicesClient<TangleConfig>,
) -> color_eyre::Result<()> {
info!("Received notification {}", event.number);
trace!("Received notification {}", event.number);
const DEFAULT_PROTOCOL: Protocol = Protocol::Tangle;
warn!("Using Tangle protocol as default over Eigen. This is a temporary development workaround. You can alter this behavior here");
trace!("[WARNING] Using Tangle protocol as default over Eigen. This is a temporary development workaround. You can alter this behavior here");

// const DEFAULT_PROTOCOL: Protocol = Protocol::Eigenlayer;
// warn!("Using Eigen protocol as default over Tangle. This is a temporary development workaround. You can alter this behavior here");
Expand Down Expand Up @@ -321,7 +321,7 @@ pub(crate) async fn handle_tangle_event(
// Loop through every (blueprint_id, service_id) running. See if the service is still on-chain. If not, kill it and add it to to_remove
for (blueprint_id, process_handles) in &mut *active_gadgets {
for service_id in process_handles.keys() {
info!(
trace!(
"Checking service for on-chain termination: bid={blueprint_id}//sid={service_id}"
);

Expand Down
2 changes: 1 addition & 1 deletion blueprint-test-utils/src/tangle/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ pub async fn wait_for_completion_of_tangle_job(
while let Some(Ok(block)) = blocks.next().await {
let events = block.events().await?;
let results = events.find::<JobResultSubmitted>().collect::<Vec<_>>();
info!(
gadget_sdk::debug!(
%service_id,
%call_id,
%required_count,
Expand Down
20 changes: 2 additions & 18 deletions macros/context-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ mod eigenlayer;
mod evm;
/// Keystore context extension implementation.
mod keystore;
/// MPC context extension implementation.
mod mpc;
/// Services context extension implementation.
mod services;
/// Tangle Subxt Client context extension implementation.
mod subxt;
mod tangle;

const CONFIG_TAG_NAME: &str = "config";
const CONFIG_TAG_TYPE: &str = "gadget_sdk::config::GadgetConfiguration";
Expand Down Expand Up @@ -75,7 +73,7 @@ pub fn derive_tangle_client_context(input: TokenStream) -> TokenStream {
Ok((res, call_id_field))
})
.map(|(config_field, call_id_field)| {
subxt::generate_context_impl(input, config_field, call_id_field)
tangle::generate_context_impl(input, config_field, call_id_field)
});

match result {
Expand Down Expand Up @@ -111,17 +109,3 @@ pub fn derive_eigenlayer_context(input: TokenStream) -> TokenStream {
Err(err) => TokenStream::from(err.to_compile_error()),
}
}

/// Derive macro for generating Context Extensions trait implementation for `MPCContext`.
#[proc_macro_derive(MPCContext, attributes(config))]
pub fn derive_mpc_context(input: TokenStream) -> TokenStream {
let input = syn::parse_macro_input!(input as syn::DeriveInput);
let result =
cfg::find_config_field(&input.ident, &input.data, CONFIG_TAG_NAME, CONFIG_TAG_TYPE)
.map(|config_field| mpc::generate_context_impl(input, config_field));

match result {
Ok(expanded) => TokenStream::from(expanded),
Err(err) => TokenStream::from(err.to_compile_error()),
}
}
158 changes: 0 additions & 158 deletions macros/context-derive/src/mpc.rs

This file was deleted.

Loading
Loading