Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion bin/network-monitor/src/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions bin/network-monitor/src/deploy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")?
Expand Down Expand Up @@ -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")?;

Expand Down
2 changes: 1 addition & 1 deletion bin/ntx-builder/src/actor/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
9 changes: 3 additions & 6 deletions bin/ntx-builder/src/clients/block_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
Expand Down
2 changes: 1 addition & 1 deletion crates/block-producer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
16 changes: 8 additions & 8 deletions crates/block-producer/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<proto::blockchain::BlockNumber, MempoolSubmissionError> {
Expand Down Expand Up @@ -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<proto::blockchain::BlockNumber, MempoolSubmissionError> {
Expand Down Expand Up @@ -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<proto::transaction::ProvenTransaction>,
) -> Result<tonic::Response<proto::blockchain::BlockNumber>, 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<proto::transaction::TransactionBatch>,
) -> Result<tonic::Response<proto::blockchain::BlockNumber>, 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.
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/src/server/accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/<method>".
require_genesis_methods: Vec<&'static str>,
}
Expand Down
8 changes: 4 additions & 4 deletions crates/rpc/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<proto::transaction::ProvenTransaction>,
) -> Result<Response<proto::blockchain::BlockNumber>, Status> {
Expand Down Expand Up @@ -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<proto::transaction::TransactionBatch>,
) -> Result<tonic::Response<proto::blockchain::BlockNumber>, Status> {
Expand Down Expand Up @@ -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 ----------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions crates/rpc/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions crates/rpc/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions docs/external/src/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs/internal/src/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions proto/proto/internal/block_producer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
4 changes: 2 additions & 2 deletions proto/proto/rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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
// --------------------------------------------------------------------------------------------
Expand Down
Loading