Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

feat: update tce config addresses #415

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Conversation

Freyskeyd
Copy link
Member

@Freyskeyd Freyskeyd commented Dec 19, 2023

Description

This PR updates the configuration of the TCE by removing libp2p_api_addr which was originally binding and exposing the address of the node. Now the configuration uses a dedicated P2PConfig to hold specific p2p config, the two first parameters are:

  • listen_addresses which accept a list of multiaddr that the node will listen on for new incoming connection
  • public_addresses which define the list of addresses that are publicly exposed by the node and will be advertised by the identify protocol.

Future breaking change

  • The libp2p_api_addr is deprecated

Example

example of a new configuration:

[base]
name = "local"
role = "validator"
subnet = "topos"

[edge]

[tce]
db-path = "/tmp/data/tce_rocksdb"
graphql-api-addr = "0.0.0.0:4030"
grpc-api-addr = "0.0.0.0:1340"
metrics-api-addr = "0.0.0.0:3000"

[tce.p2p]
public-addresses = ["/ip4/0.0.0.0/tcp/9090", "/dns/mysupernode.org/tcp/1234"]
listen-addresses = ["/ip4/0.0.0.0/tcp/9090"]

PR Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@Freyskeyd Freyskeyd requested a review from a team as a code owner December 19, 2023 10:32
@Freyskeyd Freyskeyd requested review from dvdplm and JDawg287 and removed request for a team December 19, 2023 10:32
@Freyskeyd Freyskeyd force-pushed the feature/updating-p2p-config-file branch from 83478e0 to cff0aa8 Compare December 19, 2023 10:34
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (beca28b) 66.97% compared to head (cc9165a) 69.39%.

Files Patch % Lines
crates/topos-p2p/src/runtime/mod.rs 82.35% 3 Missing ⚠️
crates/topos-p2p/src/network.rs 95.00% 1 Missing ⚠️
crates/topos-test-sdk/src/tce/mod.rs 0.00% 1 Missing ⚠️
...ates/topos/src/components/node/services/process.rs 94.11% 1 Missing ⚠️
crates/topos/tests/config.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #415      +/-   ##
==========================================
+ Coverage   66.97%   69.39%   +2.41%     
==========================================
  Files         223      223              
  Lines       11923    11970      +47     
==========================================
+ Hits         7986     8307     +321     
+ Misses       3937     3663     -274     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Freyskeyd Freyskeyd marked this pull request as draft December 20, 2023 12:29
@Freyskeyd Freyskeyd marked this pull request as ready for review December 20, 2023 12:29
@Freyskeyd Freyskeyd changed the base branch from chore/fixing-peer-info-publication to main December 20, 2023 12:30
@Freyskeyd Freyskeyd changed the base branch from main to chore/fixing-peer-info-publication December 20, 2023 12:31
@Freyskeyd Freyskeyd marked this pull request as draft December 20, 2023 12:33
@Freyskeyd Freyskeyd marked this pull request as ready for review December 20, 2023 12:33
@Freyskeyd Freyskeyd changed the base branch from chore/fixing-peer-info-publication to main December 20, 2023 12:36
@Freyskeyd Freyskeyd marked this pull request as draft December 20, 2023 12:37
@Freyskeyd Freyskeyd marked this pull request as ready for review December 20, 2023 12:37
@Freyskeyd Freyskeyd requested review from a team, dvdplm and atanmarko and removed request for a team December 20, 2023 12:37
@Freyskeyd Freyskeyd changed the base branch from main to chore/fixing-peer-info-publication December 20, 2023 12:38
@Freyskeyd Freyskeyd marked this pull request as draft December 20, 2023 12:48
@Freyskeyd Freyskeyd added this to the Soft-fork investigation milestone Dec 20, 2023
@Freyskeyd Freyskeyd force-pushed the chore/fixing-peer-info-publication branch 2 times, most recently from e8c9c87 to 70acf64 Compare December 20, 2023 17:52
@Freyskeyd Freyskeyd force-pushed the feature/updating-p2p-config-file branch from cff0aa8 to b5202d1 Compare December 20, 2023 18:03
@Freyskeyd Freyskeyd marked this pull request as ready for review December 20, 2023 19:08
@Freyskeyd Freyskeyd requested review from atanmarko and JDawg287 and removed request for a team December 20, 2023 20:09
Use a dedicated config struct for P2P stuff, expose two types of addresses and support defining
multiple addresses per category.

BREAKING CHANGE: The `libp2p_api_addr` is replaced by `listen_addresses` and `advertised_addresses`

Signed-off-by: Simon Paitrault <[email protected]>
@Freyskeyd Freyskeyd force-pushed the feature/updating-p2p-config-file branch from b5202d1 to 1fc7346 Compare December 21, 2023 14:05
@Freyskeyd Freyskeyd changed the base branch from chore/fixing-peer-info-publication to main December 21, 2023 14:06
@Freyskeyd Freyskeyd mentioned this pull request Dec 21, 2023
4 tasks
@Freyskeyd Freyskeyd marked this pull request as draft December 21, 2023 14:09
@Freyskeyd Freyskeyd marked this pull request as ready for review December 21, 2023 14:09
@Freyskeyd Freyskeyd force-pushed the feature/updating-p2p-config-file branch 5 times, most recently from 3c45f4c to e19650d Compare December 21, 2023 20:16
@Freyskeyd Freyskeyd requested a review from hadjiszs December 21, 2023 20:16
crates/topos-p2p/src/runtime/mod.rs Outdated Show resolved Hide resolved
crates/topos/src/components/node/services/process.rs Outdated Show resolved Hide resolved
crates/topos-p2p/src/network.rs Outdated Show resolved Hide resolved
Signed-off-by: Simon Paitrault <[email protected]>
@Freyskeyd Freyskeyd force-pushed the feature/updating-p2p-config-file branch from e19650d to cc9165a Compare December 22, 2023 09:25
@Freyskeyd Freyskeyd merged commit 476948f into main Jan 8, 2024
19 checks passed
@Freyskeyd Freyskeyd deleted the feature/updating-p2p-config-file branch January 8, 2024 20:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants