linera_service/config.rs
1// Copyright (c) Zefchain Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4pub use linera_exporter::config::{
5 BlockExporterConfig, Destination, DestinationConfig, DestinationId, DestinationKind,
6 LimitsConfig,
7};
8
9/// How a shard reaches the other validators when exporting the blocks it executes.
10///
11/// A trade-off between this validator's own proxy load and keeping shards off the internet, left
12/// to the operator because relaying's cost is not predictable from the code. Neither setting
13/// changes what the *receiving* proxy absorbs, though relaying does concentrate the connections.
14#[derive(Clone, Copy, Debug, PartialEq, Eq, clap::ValueEnum)]
15pub enum BlockExportTransport {
16 /// Send through this validator's own proxy, which forwards to the destination. Shards need no
17 /// outbound access, which matters because a shard holds the validator secret key.
18 Relay,
19 /// Send straight from the shard to the destination validator's public endpoint. Takes the
20 /// sending proxy out of the path entirely, at the cost of giving shards — which hold the
21 /// validator secret key — outbound access to the other validators.
22 Direct,
23}