diff --git a/CLAUDE.md b/CLAUDE.md index 2951863a..836c1b90 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -5,6 +5,17 @@ The `main` branch contains current work. The `legacy` branch is under long-term maintenance and may receive active work. +## Releases + +The `legacy` branch is tagged on the `0.16.x` line. These crates cannot be +published to crates.io. + +To release: +1. Run standard pre-push checks (clippy both feature sets + fmt). +2. Create a new signed git tag (`git tag -s v0.16.x`). +3. Push the tag to GitHub. +4. Create a GitHub release from the tag. Do NOT mark it as latest. + ## Commands - `cargo +nightly fmt` - format diff --git a/Cargo.toml b/Cargo.toml index 1ca6411c..ab47f9cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["crates/*"] resolver = "2" [workspace.package] -version = "0.16.0-rc.10" +version = "0.16.0" edition = "2024" rust-version = "1.88" authors = ["init4"] @@ -34,29 +34,29 @@ debug = false incremental = false [workspace.dependencies] -signet-bundle = "0.16.0-rc.8" -signet-constants = "0.16.0-rc.8" -signet-evm = "0.16.0-rc.8" -signet-extract = "0.16.0-rc.8" -signet-test-utils = "0.16.0-rc.8" -signet-tx-cache = "0.16.0-rc.8" -signet-types = "0.16.0-rc.8" -signet-zenith = "0.16.0-rc.8" -signet-journal = "0.16.0-rc.8" -signet-blobber = { version = "0.16.0-rc.10", path = "crates/blobber" } -signet-block-processor = { version = "0.16.0-rc.10", path = "crates/block-processor" } -signet-db = { version = "0.16.0-rc.10", path = "crates/db" } -signet-genesis = { version = "0.16.0-rc.10", path = "crates/genesis" } -signet-node = { version = "0.16.0-rc.10", path = "crates/node" } -signet-node-config = { version = "0.16.0-rc.10", path = "crates/node-config" } -signet-node-tests = { version = "0.16.0-rc.10", path = "crates/node-tests" } -signet-node-types = { version = "0.16.0-rc.10", path = "crates/node-types" } -signet-rpc = { version = "0.16.0-rc.10", path = "crates/rpc" } - -init4-bin-base = { version = "0.18.0-rc.13", features = ["alloy"] } +signet-bundle = "0.16.0" +signet-constants = "0.16.0" +signet-evm = "0.16.0" +signet-extract = "0.16.0" +signet-test-utils = "0.16.0" +signet-tx-cache = "0.16.0" +signet-types = "0.16.0" +signet-zenith = "0.16.0" +signet-journal = "0.16.0" +signet-blobber = { version = "0.16.0", path = "crates/blobber" } +signet-block-processor = { version = "0.16.0", path = "crates/block-processor" } +signet-db = { version = "0.16.0", path = "crates/db" } +signet-genesis = { version = "0.16.0", path = "crates/genesis" } +signet-node = { version = "0.16.0", path = "crates/node" } +signet-node-config = { version = "0.16.0", path = "crates/node-config" } +signet-node-tests = { version = "0.16.0", path = "crates/node-tests" } +signet-node-types = { version = "0.16.0", path = "crates/node-types" } +signet-rpc = { version = "0.16.0", path = "crates/rpc" } + +init4-bin-base = { version = "0.19.0", features = ["alloy"] } # ajj -ajj = { version = "0.3.4" } +ajj = { version = "0.7.0" } # trevm trevm = { version = "0.34.0", features = ["full_env_cfg"] } diff --git a/crates/rpc/src/debug/endpoints.rs b/crates/rpc/src/debug/endpoints.rs index 4933705c..293c0ba7 100644 --- a/crates/rpc/src/debug/endpoints.rs +++ b/crates/rpc/src/debug/endpoints.rs @@ -90,7 +90,7 @@ where tracing::debug!(tx_index = idx, tx_hash = ?tx.hash(), "Traced transaction"); } - ResponsePayload::Success(frames) + ResponsePayload(Ok(frames)) } .instrument(span); @@ -163,7 +163,7 @@ where let res = response_tri!(crate::debug::tracer::trace(trevm, &opts, tx_info)).0; - ResponsePayload::Success(res) + ResponsePayload(Ok(res)) } .instrument(span); diff --git a/crates/rpc/src/eth/endpoints.rs b/crates/rpc/src/eth/endpoints.rs index c6ae5166..5973b33f 100644 --- a/crates/rpc/src/eth/endpoints.rs +++ b/crates/rpc/src/eth/endpoints.rs @@ -474,7 +474,7 @@ where let execution_result = response_tri!(trevm.call().map_err(EvmErrored::into_error)).0; - ResponsePayload::Success(execution_result) + ResponsePayload(Ok(execution_result)) } .instrument(span); @@ -498,14 +498,14 @@ where normalize_gas_stateless(&mut params.0, max_gas); await_handler!(@response_option hctx.spawn_with_ctx(|hctx| async move { - let res = match run_call(hctx, params, ctx).await { - ResponsePayload::Success(res) => res, - ResponsePayload::Failure(err) => return ResponsePayload::Failure(err), + let res = match run_call(hctx, params, ctx).await.0 { + Ok(res) => res, + Err(err) => return ResponsePayload(Err(err)), }; match res { ExecutionResult::Success { output, .. } => { - ResponsePayload::Success(output.data().clone()) + ResponsePayload(Ok(output.data().clone())) } ExecutionResult::Revert { output, .. } => { ResponsePayload::internal_error_with_message_and_obj( @@ -577,7 +577,7 @@ where let (estimate, _) = response_tri!(trevm.estimate_gas().map_err(EvmErrored::into_error)); match estimate { - EstimationResult::Success { limit, .. } => ResponsePayload::Success(U64::from(limit)), + EstimationResult::Success { limit, .. } => ResponsePayload(Ok(U64::from(limit))), EstimationResult::Revert { reason, .. } => { ResponsePayload::internal_error_with_message_and_obj( "execution reverted".into(), diff --git a/crates/rpc/src/inspect/endpoints.rs b/crates/rpc/src/inspect/endpoints.rs index e5155ffe..e8f4c6d8 100644 --- a/crates/rpc/src/inspect/endpoints.rs +++ b/crates/rpc/src/inspect/endpoints.rs @@ -30,7 +30,7 @@ where ); }; - ResponsePayload::Success(output) + ResponsePayload(Ok(output)) }; await_handler!(@response_option hctx.spawn_blocking(task)) diff --git a/crates/rpc/src/interest/subs.rs b/crates/rpc/src/interest/subs.rs index 36583d99..1fb164dd 100644 --- a/crates/rpc/src/interest/subs.rs +++ b/crates/rpc/src/interest/subs.rs @@ -211,7 +211,9 @@ impl SubscriptionTask { ) { let SubscriptionTask { id, filter, token, mut notifs } = self; - let Some(sender) = ajj_ctx.notifications() else { return }; + if !ajj_ctx.notifications_enabled() { + return; + }; // Buffer for notifications to be sent to the client let mut notif_buffer = filter.empty_sub_buffer(); @@ -230,7 +232,9 @@ impl SubscriptionTask { if !notif_buffer.is_empty() { // NB: we reserve half the capacity to avoid blocking other // usage. This is a heuristic and can be adjusted as needed. - sender.reserve_many(min(sender.max_capacity() / 2, notif_buffer.len())).await + ajj_ctx + .permit_many(min(ajj_ctx.notification_capacity() / 2, notif_buffer.len())) + .await } else { // If the notification buffer is empty, just never return pending().await @@ -263,7 +267,7 @@ impl SubscriptionTask { permits = permit_fut => { let _guard = span.enter(); // channel closed - let Ok(permits) = permits else { + let Some(permits) = permits else { trace!("channel to client closed"); break }; @@ -291,7 +295,7 @@ impl SubscriptionTask { trace!(?item, "failed to serialize notification"); continue }; - permit.send(brv); + let _ = permit.send(brv); } } notif_res = notifs.recv() => { diff --git a/crates/rpc/src/signet/endpoints.rs b/crates/rpc/src/signet/endpoints.rs index 4abda489..10ed0876 100644 --- a/crates/rpc/src/signet/endpoints.rs +++ b/crates/rpc/src/signet/endpoints.rs @@ -62,7 +62,7 @@ where response_tri!(trevm.drive_bundle(&mut driver).map_err(|e| e.into_error())); - ResponsePayload::Success(driver.into_response()) + ResponsePayload(Ok(driver.into_response())) }; let task = async move {