Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove outdated trin-core #1076

Merged
merged 2 commits into from
Jan 3, 2024
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
4 changes: 0 additions & 4 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
- [Database](developers/architecture/database.md)
- [Testing](developers/architecture/testing.md)
- [Protocols](developers/protocols/README.md)
- [Portal wire protocol](developers/protocols/portal_wire.md)
- [Discovery](developers/protocols/discovery.md)
- [uTP](developers/protocols/utp.md)
- [JSON-RPC](developers/protocols/json_rpc.md)
- [SSZ](developers/protocols/ssz.md)
- [Core concepts](developers/core_concepts/README.md)
- [Finding peers](developers/core_concepts/finding_peers.md)
- [Chain tip](developers/core_concepts/chain_tip.md)
Expand Down
2 changes: 1 addition & 1 deletion book/src/developers/architecture/database.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Database

The database related code is located in `./trin-core/src/portalnet/storage.rs`.
The database related code is located in `./portalnet/storage.rs`.

There are three main database kinds:

Expand Down
47 changes: 20 additions & 27 deletions book/src/developers/architecture/process_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ stateDiagram-v2
```
Where for each sub-protocol implemented (History, State, Etc.,), a new thread is started.

Here are some of the major components of trin-core that are called on startup within `./trin-core/src/lib.rs`.
Here are some of the major components that are called on startup within `./src/lib.rs`.

```mermaid
stateDiagram-v2
trincore: trin-core
collection: configs and services

state trin {
Expand All @@ -42,25 +41,22 @@ stateDiagram-v2

}

state trincore {
portalnet_config --> collection
storage_config --> collection
discovery() --> collection
header_oracle() --> collection
utp_listener() --> collection
portalnet_config --> collection
storage_config --> collection
discovery() --> collection
header_oracle() --> collection
utp_listener() --> collection


state portalnet {
portalnet_config
storage_config
discovery()
}
state utp {
utp_listener()
}
state validation {
header_oracle()
}
state portalnet {
portalnet_config
storage_config
discovery()
}
state utp {
utp_listener()
}
state validation {
header_oracle()
}
```

Expand All @@ -71,7 +67,6 @@ used to start the JSON-RPC server.
An events listener awaits network activity that can be actioned.
```mermaid
stateDiagram-v2
trincore: trin-core
trinhistory: trin-history
jsonrpchistory: JSON-RPC History details
historyhandler: History handler
Expand All @@ -87,12 +82,10 @@ stateDiagram-v2
historyhandler --> events()
}

state trincore {
state portalnet {
events()
}

state portalnet {
events()
}

state trinhistory {
initialize_history_network()
state jsonrpc {
Expand All @@ -104,6 +97,6 @@ stateDiagram-v2
}
```

Then `./trin-core/portalnet/events.rs` is handles events at the level of the Portal Wire Protocol.
Then `./portalnet/events.rs` is handles events at the level of the Portal Wire Protocol.
These are defined messages that are compliant with the Discv5 protocol, and specific
to the Portal Network.
2 changes: 1 addition & 1 deletion book/src/developers/architecture/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This crate is responsible for the operation of the Trin node functionality.
- Starting threads for different important functions such as uTP, Discovery & JSON-RPC.
- These threads perform tasks such as listening for peers or requests from a user.

## `trin-core`
## `portalnet`

This crate is responsible for the code that defines the main functions and data structures required for the operation of a Trin node. This includes code for:

Expand Down
2 changes: 1 addition & 1 deletion book/src/developers/contributing/rust/imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
- In `*.rs` files, imports should be split into 3 groups [src](https://github.com/rust-dev-tools/fmt-rfcs/issues/131) and separated by a single line. Within a single group, imported items should be sorted alphabetically.
- Imports from `'std'`
- Imports from external crates
- Imports from within the same crate (`trin-core`, `trin-history`, `trin-state` inclusive).
- Imports from crates within trin
- Alphabetize imports in `Cargo.toml`
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ that the data is canonical.
## Accumulator distribution

The Accumulator is built once and then distributed in Trin (and other clients). It does not
change over time and so can be incorporated into the `trin-core` (`./trin-core/src/assets`) and
change over time and so can be incorporated into the `trin-validation` (`./trin-validation/src/assets`) and
included in binary releases.

The History network contains individual epoch hashes from the Master Accumulator and
Expand Down
9 changes: 7 additions & 2 deletions portal-bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "portal-bridge"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/ethereum/trin/tree/main/portal-bridge"
repository = "https://github.com/ethereum/trin/tree/master/portal-bridge"
license = "GPL-3.0"
readme = "README.md"
keywords = ["ethereum", "portal-network"]
Expand All @@ -22,7 +22,12 @@ ethereum-types = "0.14.1"
ethereum_ssz = "0.5.3"
ethereum_ssz_derive = "0.5.3"
futures = "0.3.21"
jsonrpsee = {version="0.20.0", features = ["async-client", "client", "macros", "server"]}
jsonrpsee = { version = "0.20.0", features = [
"async-client",
"client",
"macros",
"server",
] }
lazy_static = "1.4.0"
portalnet = { path = "../portalnet" }
serde = { version = "1.0.150", features = ["derive", "rc"] }
Expand Down
10 changes: 5 additions & 5 deletions portalnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "portalnet"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/ethereum/trin/tree/main/trin-core"
repository = "https://github.com/ethereum/trin/tree/master/portalnet"
license = "GPL-3.0"
readme = "README.md"
keywords = ["ethereum", "portal-network"]
Expand All @@ -21,7 +21,7 @@ discv5 = { version = "0.4.0", features = ["serde"] }
ethereum-types = "0.14.1"
ethereum_ssz = "0.5.3"
ethereum_ssz_derive = "0.5.3"
ethportal-api = { path="../ethportal-api" }
ethportal-api = { path = "../ethportal-api" }
fnv = "1.0.7"
futures = "0.3.21"
igd-next = "0.14.2"
Expand All @@ -45,9 +45,9 @@ tempfile = "3.3.0"
thiserror = "1.0.29"
tokio = { version = "1.14.0", features = ["full"] }
tracing = "0.1.36"
trin-metrics = {path = "../trin-metrics" }
trin-utils = { path="../trin-utils" }
trin-validation = { path="../trin-validation" }
trin-metrics = { path = "../trin-metrics" }
trin-utils = { path = "../trin-utils" }
trin-validation = { path = "../trin-validation" }
validator = { version = "0.13.0", features = ["derive"] }
url = "2.3.1"
utp-rs = "0.1.0-alpha.8"
Expand Down
6 changes: 3 additions & 3 deletions trin-validation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "trin-validation"
version = "0.1.0"
edition = "2021"
repository = "https://github.com/ethereum/trin/tree/main/trin-validation"
repository = "https://github.com/ethereum/trin/tree/master/trin-validation"
license = "GPL-3.0"
readme = "README.md"
keywords = ["ethereum", "portal-network"]
Expand All @@ -17,9 +17,9 @@ eth2_hashing = "0.2.0"
ethereum-types = "0.14.1"
ethereum_ssz = "0.5.3"
ethereum_ssz_derive = "0.5.3"
ethportal-api = { path="../ethportal-api" }
ethportal-api = { path = "../ethportal-api" }
lazy_static = "1.4.0"
rust-embed="6.6.1"
rust-embed = "6.6.1"
serde = { version = "1.0.150", features = ["derive"] }
serde_json = "1.0.89"
ssz_types = "0.5.4"
Expand Down