diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd2868cd9..8ae89ec343 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ - Replaced blocking-in-async LargeSmt and account state forest operations in the store with wrappers using Tokio's `block_in_place()` ([#2076](https://github.com/0xMiden/node/pull/2076)). - [BREAKING] Reworked note proto types for multi-attachment support: `NoteMetadata` now carries `attachment_schemes` (repeated) and `attachments_commitment` instead of a single `attachment`. `Note` and `NetworkNote` gained an `attachments` field. `NoteSyncRecord` now embeds full `NoteMetadata` instead of `NoteMetadataHeader`. Removed `NoteAttachmentKind` enum and `NoteMetadataHeader` message ([#2078](https://github.com/0xMiden/node/pull/2078)). - [BREAKING] Changed `SyncChainMmr` endpoint: the upper end of the block range we're syncing is now the chain tip with the requested finality level. Validator signature is also returned ([#2075](https://github.com/0xMiden/node/pull/2075)). +- [BREAKING] Renamed `SubmitProvenTransaction` RPC endpoint to `SubmitProvenTx` ([#2094](https://github.com/0xMiden/node/pull/2094)). +- [BREAKING] Renamed `SubmitProvenBatch` RPC endpoint to `SubmitProvenTxBatch` ([#2094](https://github.com/0xMiden/node/pull/2094)). ## v0.14.10 (2026-05-29) diff --git a/bin/network-monitor/src/counter.rs b/bin/network-monitor/src/counter.rs index 327d2193d2..6bc589b278 100644 --- a/bin/network-monitor/src/counter.rs +++ b/bin/network-monitor/src/counter.rs @@ -283,7 +283,7 @@ impl IncrementService { let block_height: BlockNumber = self .rpc_client - .submit_proven_transaction(request) + .submit_proven_tx(request) .await .context("Failed to submit proven transaction to RPC")? .into_inner() diff --git a/bin/network-monitor/src/deploy/mod.rs b/bin/network-monitor/src/deploy/mod.rs index 7cf162b5a4..cb99b24d5e 100644 --- a/bin/network-monitor/src/deploy/mod.rs +++ b/bin/network-monitor/src/deploy/mod.rs @@ -39,7 +39,7 @@ pub mod counter; pub mod wallet; /// Create an RPC client configured with the correct genesis metadata in the -/// `Accept` header so that write RPCs such as `SubmitProvenTransaction` are +/// `Accept` header so that write RPCs such as `SubmitProvenTx` are /// accepted by the node. pub async fn create_genesis_aware_rpc_client( rpc_url: &Url, @@ -79,7 +79,7 @@ pub async fn create_genesis_aware_rpc_client( let genesis = genesis_commitment.to_hex(); // Rebuild the client, this time including the required genesis metadata so that - // write RPCs like SubmitProvenTransaction are accepted by the node. + // write RPCs like SubmitProvenTx are accepted by the node. let rpc_client = Builder::new(rpc_url.clone()) .with_tls() .context("Failed to configure TLS for RPC client")? @@ -220,7 +220,7 @@ pub async fn deploy_counter_account(counter_account: &Account, rpc_url: &Url) -> }; rpc_client - .submit_proven_transaction(request) + .submit_proven_tx(request) .await .context("Failed to submit proven transaction to RPC")?; diff --git a/bin/ntx-builder/src/actor/execute.rs b/bin/ntx-builder/src/actor/execute.rs index 6648cacd75..d58ec5b00d 100644 --- a/bin/ntx-builder/src/actor/execute.rs +++ b/bin/ntx-builder/src/actor/execute.rs @@ -358,7 +358,7 @@ impl NtxContext { #[instrument(target = COMPONENT, name = "ntx.execute_transaction.submit", skip_all, err)] async fn submit(&self, proven_tx: &ProvenTransaction) -> NtxResult<()> { self.block_producer - .submit_proven_transaction(proven_tx) + .submit_proven_tx(proven_tx) .await .map_err(NtxError::Submission) } diff --git a/bin/ntx-builder/src/clients/block_producer.rs b/bin/ntx-builder/src/clients/block_producer.rs index c58522165b..b761e7dde1 100644 --- a/bin/ntx-builder/src/clients/block_producer.rs +++ b/bin/ntx-builder/src/clients/block_producer.rs @@ -41,18 +41,15 @@ impl BlockProducerClient { Self { client: block_producer } } - #[instrument(target = COMPONENT, name = "ntx.block_producer.client.submit_proven_transaction", skip_all, err)] - pub async fn submit_proven_transaction( - &self, - proven_tx: &ProvenTransaction, - ) -> Result<(), Status> { + #[instrument(target = COMPONENT, name = "ntx.block_producer.client.submit_proven_tx", skip_all, err)] + pub async fn submit_proven_tx(&self, proven_tx: &ProvenTransaction) -> Result<(), Status> { let request = proto::transaction::ProvenTransaction { transaction: proven_tx.to_bytes(), transaction_inputs: None, /* Transaction inputs are only required for Validator * transaction re-execution. */ }; - self.client.clone().submit_proven_transaction(request).await?; + self.client.clone().submit_proven_tx(request).await?; Ok(()) } diff --git a/crates/block-producer/README.md b/crates/block-producer/README.md index e1d84552cd..eb35acc27d 100644 --- a/crates/block-producer/README.md +++ b/crates/block-producer/README.md @@ -14,7 +14,7 @@ The full gRPC API can be found [here](../../proto/proto/block_producer.proto). --- -### SubmitProvenTransaction +### SubmitProvenTx Submits a proven transaction to the block-producer, returning the current chain height if successful. diff --git a/crates/block-producer/src/server/mod.rs b/crates/block-producer/src/server/mod.rs index f0266c98aa..54f11ba93d 100644 --- a/crates/block-producer/src/server/mod.rs +++ b/crates/block-producer/src/server/mod.rs @@ -297,11 +297,11 @@ impl BlockProducerRpcServer { #[instrument( target = COMPONENT, - name = "block_producer.server.submit_proven_transaction", + name = "block_producer.server.submit_proven_tx", skip_all, err )] - async fn submit_proven_transaction( + async fn submit_proven_tx( &self, request: proto::transaction::ProvenTransaction, ) -> Result { @@ -341,11 +341,11 @@ impl BlockProducerRpcServer { #[instrument( target = COMPONENT, - name = "block_producer.server.submit_proven_batch", + name = "block_producer.server.submit_proven_tx_batch", skip_all, err )] - async fn submit_proven_batch( + async fn submit_proven_tx_batch( &self, request: proto::transaction::TransactionBatch, ) -> Result { @@ -382,22 +382,22 @@ impl BlockProducerRpcServer { impl api_server::Api for BlockProducerRpcServer { type MempoolSubscriptionStream = MempoolEventSubscription; - async fn submit_proven_transaction( + async fn submit_proven_tx( &self, request: tonic::Request, ) -> Result, Status> { - self.submit_proven_transaction(request.into_inner()) + self.submit_proven_tx(request.into_inner()) .await .map(tonic::Response::new) // This Status::from mapping takes care of hiding internal errors. .map_err(Into::into) } - async fn submit_proven_batch( + async fn submit_proven_tx_batch( &self, request: tonic::Request, ) -> Result, Status> { - self.submit_proven_batch(request.into_inner()) + self.submit_proven_tx_batch(request.into_inner()) .await .map(tonic::Response::new) // This Status::from mapping takes care of hiding internal errors. diff --git a/crates/rpc/README.md b/crates/rpc/README.md index 486f3d90f9..654ac5af1f 100644 --- a/crates/rpc/README.md +++ b/crates/rpc/README.md @@ -20,7 +20,7 @@ The full gRPC method definitions can be found in the [proto](../proto/README.md) - [GetLimits](#getlimits) - [GetNotesById](#getnotesbyid) - [GetNoteScriptByRoot](#getnotescriptbyroot) -- [SubmitProvenTransaction](#submitproventransaction) +- [SubmitProvenTx](#submitproventx) - [SyncAccountVault](#SyncAccountVault) - [SyncNotes](#syncnotes) - [SyncAccountStorageMaps](#syncaccountstoragemaps) @@ -99,7 +99,7 @@ When script retrieval fails, detailed error information is provided through gRPC --- -### SubmitProvenTransaction +### SubmitProvenTx Submits a proven transaction to the Miden network for inclusion in future blocks. The transaction must be properly formatted and include a valid execution proof. diff --git a/crates/rpc/src/server/accept.rs b/crates/rpc/src/server/accept.rs index afc005d7d2..6cf68a4b84 100644 --- a/crates/rpc/src/server/accept.rs +++ b/crates/rpc/src/server/accept.rs @@ -51,7 +51,7 @@ pub struct AcceptHeaderLayer { genesis_commitment: Word, /// RPC method names for which the `genesis` parameter is mandatory. /// - /// These should be gRPC method names (e.g. `SubmitProvenTransaction`), + /// These should be gRPC method names (e.g. `SubmitProvenTx`), /// matched against the end of the request path like "/rpc.Api/". require_genesis_methods: Vec<&'static str>, } diff --git a/crates/rpc/src/server/api.rs b/crates/rpc/src/server/api.rs index c361edf4fa..8ceac6b511 100644 --- a/crates/rpc/src/server/api.rs +++ b/crates/rpc/src/server/api.rs @@ -436,7 +436,7 @@ impl api_server::Api for RpcService { /// Deserializes and rebuilds the transaction with MAST decorators stripped from output note /// scripts, verifies the transaction proof, optionally re-executes via the validator if /// transaction inputs are provided, then forwards the transaction to the block producer. - async fn submit_proven_transaction( + async fn submit_proven_tx( &self, request: Request, ) -> Result, Status> { @@ -516,12 +516,12 @@ impl api_server::Api for RpcService { return Err(Status::invalid_argument("Transaction inputs must be provided")); } - block_producer.clone().submit_proven_transaction(request).await + block_producer.clone().submit_proven_tx(request).await } /// Deserializes the batch, strips MAST decorators from full output note scripts, rebuilds /// the batch, then forwards it to the block producer. - async fn submit_proven_batch( + async fn submit_proven_tx_batch( &self, request: tonic::Request, ) -> Result, Status> { @@ -607,7 +607,7 @@ impl api_server::Api for RpcService { self.validator.clone().submit_proven_transaction(request).await?; } - block_producer.clone().submit_proven_batch(request).await + block_producer.clone().submit_proven_tx_batch(request).await } // -- Status & utility endpoints ---------------------------------------------------------- diff --git a/crates/rpc/src/server/mod.rs b/crates/rpc/src/server/mod.rs index f788a83642..21ca958e57 100644 --- a/crates/rpc/src/server/mod.rs +++ b/crates/rpc/src/server/mod.rs @@ -100,8 +100,8 @@ impl Rpc { // web-clients (which would experience CORS rejection). .layer( AcceptHeaderLayer::new(&rpc_version, genesis.commitment()) - .with_genesis_enforced_method("SubmitProvenTransaction") - .with_genesis_enforced_method("SubmitProvenBatch"), + .with_genesis_enforced_method("SubmitProvenTx") + .with_genesis_enforced_method("SubmitProvenTxBatch"), ) .add_service(api_service) // Enables gRPC reflection service. diff --git a/crates/rpc/src/tests.rs b/crates/rpc/src/tests.rs index a9236bd404..9084e48166 100644 --- a/crates/rpc/src/tests.rs +++ b/crates/rpc/src/tests.rs @@ -329,7 +329,7 @@ async fn rpc_server_rejects_proven_transactions_with_invalid_commitment() { transaction_inputs: None, }; - let response = rpc_client.submit_proven_transaction(request).await; + let response = rpc_client.submit_proven_tx(request).await; // Assert that the server rejected our request. assert!(response.is_err()); @@ -374,7 +374,7 @@ async fn rpc_server_rejects_proven_transactions_with_invalid_reference_block() { transaction_inputs: None, }; - let response = rpc_client.submit_proven_transaction(request).await; + let response = rpc_client.submit_proven_tx(request).await; // Assert that the server rejected our request. assert!(response.is_err()); @@ -414,7 +414,7 @@ async fn rpc_server_rejects_tx_submissions_without_genesis() { transaction_inputs: None, }; - let response = rpc_client.submit_proven_transaction(request).await; + let response = rpc_client.submit_proven_tx(request).await; // Assert that the server rejected our request. assert!(response.is_err()); diff --git a/docs/external/src/rpc.md b/docs/external/src/rpc.md index ad390b51c2..186870da06 100644 --- a/docs/external/src/rpc.md +++ b/docs/external/src/rpc.md @@ -19,7 +19,7 @@ The gRPC service definition can be found in the Miden node's `proto` [directory] - [GetNotesById](#getnotesbyid) - [GetNoteScriptByRoot](#getnotescriptbyroot) - [Status](#status) -- [SubmitProvenTransaction](#submitproventransaction) +- [SubmitProvenTx](#submitproventx) - [SyncAccountStorageMaps](#syncaccountstoragemaps) - [SyncAccountVault](#syncaccountvault) - [SyncChainMmr](#syncchainmmr) @@ -130,7 +130,7 @@ Request the script for a note by its root. Request the status of the node components. The response contains the current version of the RPC component and the connection status of the other components, including their versions and the number of the most recent block in the chain (chain tip). -### SubmitProvenTransaction +### SubmitProvenTx Submit a transaction to the network. diff --git a/docs/internal/src/rpc.md b/docs/internal/src/rpc.md index 7b13595c53..3870dedfe4 100644 --- a/docs/internal/src/rpc.md +++ b/docs/internal/src/rpc.md @@ -56,12 +56,12 @@ Error handling follows this pattern: 2. **gRPC Conversion**: Domain errors are converted to gRPC `Status` objects with structured details 3. **Error Details**: Specific error codes are embedded in `Status.details` as single bytes -### SubmitProvenTransaction Errors +### SubmitProvenTx Errors Transaction submission errors are: ```rust -enum SubmitProvenTransactionGrpcError { +enum SubmitProvenTxGrpcError { Internal = 0, DeserializationFailed = 1, InvalidTransactionProof = 2, diff --git a/proto/proto/internal/block_producer.proto b/proto/proto/internal/block_producer.proto index 02ed21afb0..407054cd89 100644 --- a/proto/proto/internal/block_producer.proto +++ b/proto/proto/internal/block_producer.proto @@ -17,14 +17,14 @@ service Api { rpc Status(google.protobuf.Empty) returns (rpc.BlockProducerStatus) {} // Submits proven transaction to the Miden network. Returns the node's current block height. - rpc SubmitProvenTransaction(transaction.ProvenTransaction) returns (blockchain.BlockNumber) {} + rpc SubmitProvenTx(transaction.ProvenTransaction) returns (blockchain.BlockNumber) {} // Submits a batch of transactions to the Miden network. // // All transactions in this batch will be considered atomic, and be committed together or not all. // // Returns the node's current block height. - rpc SubmitProvenBatch(transaction.TransactionBatch) returns (blockchain.BlockNumber) {} + rpc SubmitProvenTxBatch(transaction.TransactionBatch) returns (blockchain.BlockNumber) {} // Subscribe to mempool events. // diff --git a/proto/proto/rpc.proto b/proto/proto/rpc.proto index 78aed1c15b..060818726e 100644 --- a/proto/proto/rpc.proto +++ b/proto/proto/rpc.proto @@ -44,14 +44,14 @@ service Api { // -------------------------------------------------------------------------------------------- // Submits proven transaction to the Miden network. Returns the node's current block height. - rpc SubmitProvenTransaction(transaction.ProvenTransaction) returns (blockchain.BlockNumber) {} + rpc SubmitProvenTx(transaction.ProvenTransaction) returns (blockchain.BlockNumber) {} // Submits a batch of transactions to the Miden network. // // All transactions in this batch will be considered atomic, and be committed together or not all. // // Returns the node's current block height. - rpc SubmitProvenBatch(transaction.TransactionBatch) returns (blockchain.BlockNumber) {} + rpc SubmitProvenTxBatch(transaction.TransactionBatch) returns (blockchain.BlockNumber) {} // STATE SYNCHRONIZATION ENDPOINTS // --------------------------------------------------------------------------------------------