Skip to content

Commit

Permalink
Rename trin-bridge to portal-bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
njgheorghita committed Jul 11, 2023
1 parent a061f83 commit b407f86
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 55 deletions.
64 changes: 32 additions & 32 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ members = [
"ethportal-api",
"ethportal-peertest",
"light-client",
"portal-bridge",
"rpc",
"trin-beacon",
"trin-bridge",
"trin-history",
"trin-state",
"trin-utils",
Expand Down
3 changes: 1 addition & 2 deletions book/src/developers/core_concepts/bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ sequenceDiagram
Execution-->>Bridge: block
Bridge-->>Portal: block
```
Currently the bridge functionality exists as a separate python application
with plans to implement in Trin.
Currently the bridge functionality exists as a separate executable under `portal-bridge`.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ COPY ./light-client ./light-client
COPY ./rpc ./rpc
COPY ./src ./src
COPY ./trin-beacon ./trin-beacon
COPY ./trin-bridge ./trin-bridge
COPY ./portal-bridge ./portal-bridge
COPY ./trin-history ./trin-history
COPY ./trin-state ./trin-state
COPY ./trin-utils ./trin-utils
Expand Down
8 changes: 4 additions & 4 deletions docker/Dockerfile.bridge
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY ./portalnet ./portalnet
COPY ./light-client ./light-client
COPY ./src ./src
COPY ./trin-beacon ./trin-beacon
COPY ./trin-bridge ./trin-bridge
COPY ./portal-bridge ./portal-bridge
COPY ./trin-history ./trin-history
COPY ./trin-state ./trin-state
COPY ./trin-utils ./trin-utils
Expand All @@ -31,14 +31,14 @@ COPY ./portal-accumulators ./portal-accumulators
COPY ./rpc ./rpc

# build for release
RUN cargo build -p trin -p trin-bridge --release
RUN cargo build -p trin -p portal-bridge --release

# final base
FROM ubuntu:22.04

# copy build artifacts from build stage
COPY --from=builder /trin/target/release/trin /usr/bin/
COPY --from=builder /trin/target/release/trin-bridge /usr/bin/
COPY --from=builder /trin/target/release/portal-bridge /usr/bin/
COPY --from=builder /trin/target/release/purge_db /usr/bin/
# These steps copy over the epoch accumulators repo for the bridge to use
# This data is too large to be kept inside trin-source code
Expand All @@ -51,4 +51,4 @@ RUN apt-get update && apt-get install libcurl4 -y

ENV RUST_LOG=debug

ENTRYPOINT ["/usr/bin/trin-bridge"]
ENTRYPOINT ["/usr/bin/portal-bridge"]
2 changes: 1 addition & 1 deletion ethportal-api/src/types/execution/receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl ssz::Decode for Receipts {
}

// Deserialize is currently only implemented for BATCHED responses from an execution client
// Used inside trin-bridge
// Used inside portal-bridge
impl<'de> Deserialize<'de> for Receipts {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
Expand Down
2 changes: 1 addition & 1 deletion ethportal-peertest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ tracing = "0.1.36"
tracing-subscriber = "0.3.15"
tree_hash = "0.4.0"
trin = { path = ".." }
trin-bridge = { path = "../trin-bridge" }
portal-bridge = { path = "../portal-bridge" }
trin-history = { path = "../trin-history" }
trin-state = { path = "../trin-state" }
trin-utils = { path = "../trin-utils" }
Expand Down
4 changes: 2 additions & 2 deletions ethportal-peertest/src/scenarios/bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use crate::Peertest;
use ethportal_api::jsonrpsee::http_client::HttpClient;
use ethportal_api::types::content_value::PossibleHistoryContentValue;
use ethportal_api::{HistoryContentKey, HistoryContentValue};
use portal_bridge::bridge::Bridge;
use portal_bridge::mode::BridgeMode;
use serde_json::json;
use tokio::time::{sleep, Duration};
use trin_bridge::bridge::Bridge;
use trin_bridge::mode::BridgeMode;
use trin_validation::accumulator::MasterAccumulator;
use trin_validation::oracle::HeaderOracle;

Expand Down
1 change: 1 addition & 0 deletions newsfragments/791.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename `trin-bridge` to `portal-bridge`.
4 changes: 2 additions & 2 deletions trin-bridge/Cargo.toml → portal-bridge/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "trin-bridge"
name = "portal-bridge"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/ethereum/trin/tree/main/trin-bridge"
repository = "https://github.com/ethereum/trin/tree/main/portal-bridge"
license = "GPL-3.0"
readme = "README.md"
keywords = ["ethereum", "portal-network"]
Expand Down
8 changes: 4 additions & 4 deletions trin-bridge/README.md → portal-bridge/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Trin-Bridge
Process to feed the portal network by gossiping data retrieved from a trusted provider. Currently, this is only compatible with `Trin`, but it is intended to be client-agnostic, at some point.
# Portal-Bridge
Process to feed the portal network by gossiping data retrieved from a trusted provider. Currently, this is only compatible with `Trin` & `Fluffy` clients.

ex.
```
cargo run -p trin-bridge -- --node-count 1 --executable-path ./target/debug/trin --epoch-accumulator-path ./portal-accumulators trin
cargo run -p portal-bridge -- --node-count 1 --executable-path ./target/debug/trin --epoch-accumulator-path ./portal-accumulators trin
```

## Must specify a client
To run Trin-Bridge, you must specify what kind of client exists at the provided executable path.
To run Portal-Bridge, you must specify what kind of client exists at the provided executable path.
Current options include `"trin"` / `"fluffy"`.

### Bridge modes
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions trin-bridge/src/cli.rs → portal-bridge/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use url::Url;
// - reliably calculate spaced private keys in a reasonable time
// - for values b/w 16 - 256, calculated spaced private keys are
// less and less evenly spread
// - running more than 16 trin nodes simultaneously is not thoroughly tested
// - running more than 16 nodes simultaneously is not thoroughly tested
pub const MAX_NODE_COUNT: u8 = 16;
const DEFAULT_SUBNETWORK: &str = "history";

Expand All @@ -20,7 +20,7 @@ const DEFAULT_SUBNETWORK: &str = "history";
pub struct BridgeConfig {
#[arg(
long,
help = "number of trin nodes to launch - must be between 1 and 16",
help = "number of nodes to launch - must be between 1 and 16",
default_value = "1",
value_parser = check_node_count
)]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions trin-bridge/src/main.rs → portal-bridge/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use clap::Parser;
use ethportal_api::jsonrpsee::http_client::{HttpClient, HttpClientBuilder};
use portal_bridge::bridge::Bridge;
use portal_bridge::cli::BridgeConfig;
use portal_bridge::utils::generate_spaced_private_keys;
use tokio::time::{sleep, Duration};
use trin_bridge::bridge::Bridge;
use trin_bridge::cli::BridgeConfig;
use trin_bridge::utils::generate_spaced_private_keys;
use trin_utils::log::init_tracing_logger;
use trin_validation::accumulator::MasterAccumulator;
use trin_validation::oracle::HeaderOracle;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit b407f86

Please sign in to comment.