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
5 changes: 1 addition & 4 deletions Cargo.lock

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

4 changes: 0 additions & 4 deletions crates/block-producer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ anyhow = { workspace = true }
futures = { workspace = true }
itertools = { workspace = true }
miden-node-proto = { workspace = true }
miden-node-proto-build = { features = ["internal"], workspace = true }
miden-node-utils = { features = ["testing"], workspace = true }
miden-protocol = { default-features = true, workspace = true }
miden-remote-prover-client = { features = ["batch-prover", "block-prover"], workspace = true }
miden-tx-batch-prover = { workspace = true }
rand = { workspace = true }
thiserror = { workspace = true }
tokio = { features = ["macros", "net", "rt-multi-thread"], workspace = true }
tokio-stream = { features = ["net"], workspace = true }
tonic = { default-features = true, features = ["transport"], workspace = true }
tonic-reflection = { workspace = true }
tower-http = { features = ["util"], workspace = true }
tracing = { workspace = true }
url = { workspace = true }

Expand Down
6 changes: 3 additions & 3 deletions crates/block-producer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
Contains code defining the [Miden node's block-producer](/README.md#architecture) component. It is responsible for
ordering transactions into blocks and submitting these for inclusion in the blockchain.

It serves a small [gRPC](https://grpc.io) API which the node's RPC component uses to submit new transactions. In turn,
the `block-producer` uses the store's gRPC API to submit blocks and query chain state.
It exposes an in-process API which the node's RPC component uses to submit new transactions. In turn, the
`block-producer` uses the store's gRPC API to submit blocks and query chain state.

For more information on the installation and operation of this component, please see the [node's readme](../../README.md).

## API

The full gRPC API can be found [here](../../proto/proto/block_producer.proto).
The API is exposed by `BlockProducerApi`.

---

Expand Down
3 changes: 3 additions & 0 deletions crates/block-producer/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ pub enum MempoolSubmissionError {
#[error("mempool lock is poisoned")]
#[grpc(internal)]
MempoolPoisoned(#[source] MempoolPoisonError),

#[error("missing proposed batch")]
MissingProposedBatch,
}

// Mempool submission conflicts with current state
Expand Down
3 changes: 2 additions & 1 deletion crates/block-producer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ pub mod errors;
mod errors;

pub mod server;
pub use server::BlockProducer;
pub use errors::MempoolSubmissionError;
pub use server::{BlockProducer, BlockProducerApi, BlockProducerApiConfig, BlockProducerRuntime};

// CONSTANTS
// =================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion crates/block-producer/src/mempool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ mod tests;
// MEMPOOL CONFIGURATION
// ================================================================================================

#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct SharedMempool(Arc<Mutex<Mempool>>);

#[derive(Debug, Error, Clone, Copy, PartialEq, Eq)]
Expand Down
Loading
Loading