[chain] Run Local Network#103
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds local network support to the chain module by updating dependencies, configuration, and documentation. Key changes include:
- Adding network-related dependencies and the new Peers struct with SocketAddr support.
- Introducing a new optional metrics port field in the configuration.
- Updating the README with detailed instructions for both local and remote network setups.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| chain/src/lib.rs | Added networking modules, a new metrics_port field in Config, and a Peers struct. |
| chain/README.md | Updated and expanded instructions for local and remote deployment. |
| pub share: String, | ||
| pub identity: String, | ||
|
|
||
| pub port: u16, |
There was a problem hiding this comment.
Consider adding an inline doc comment for 'metrics_port' to explain its purpose and any expected values for clarity.
| pub port: u16, | |
| pub port: u16, | |
| /// The port used for exposing metrics. If `None`, metrics will not be exposed. |
| /// | ||
| /// When run remotely, [commonware_deployer::ec2::Hosts] is used instead. | ||
| #[derive(Deserialize, Serialize)] | ||
| pub struct Peers { |
There was a problem hiding this comment.
Consider adding a brief comment explaining the expected format or use of the keys in 'addresses' to improve developer understanding.
| pub struct Peers { | |
| pub struct Peers { | |
| /// A mapping of peer identifiers (e.g., names or IDs) to their network addresses. |
Deploying alto with
|
| Latest commit: |
e757125
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fbc7f954.alto-8k4.pages.dev |
| Branch Preview URL: | https://local-network.alto-8k4.pages.dev |
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## v0.0.45 #103 +/- ##
===========================================
- Coverage 54.35% 51.13% -3.23%
===========================================
Files 21 21
Lines 3157 3356 +199
===========================================
Hits 1716 1716
- Misses 1441 1640 +199
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
* update versions * progress * cleanup block setup * progress * cleanup testing in lib * wasm parse seed * cleanup wasm * progress on client * update client * implement reporter * remove reporter from application * progress * more progress * fix seed call * progress * cleanup client interface * syncer compiles * engine compiles * lib.rs compiles * setup.rs compiles * validator compiles * incorporate buffered * fix inspector compilation * unify api * better integrate buffer * don't operate over bytes * cleanup refresh * use deployer const for metrics * add README deque size * use rwlock with archive * use rwmutex for view tracking * break last view to force us to fix * use AtomicU64 * progress * Refactor finalizer (#97) * progress * spike on core handler * spike * actor compiles * tests passing * add more * 0.0.47 update (#98) * update to v0.0.47 * update block to use uint * fix type tests * use OneCap * remove useless conversion * gracefully handle pruned errors * remove unnecessary deps * add order comment * use proper digest decode * nit comment * remove buffered cloning * remove useless clone * nit * [chain] Cleanup `Syncer` enum (#102) * implement orchestrator * further simplify finalizer * nits * update dockerfile * remove link * use hosts * deployer default features off * update versions * add v4 feature * update dashboard * catch panics * [chain] Run Local Network (#103) * make metrics port configurable * spike on peers vs hosts * validator compiles * progress * works * update instructions * add bootstrapper note * add note about ulimit * explaon bootstrappers * better logging for CLI * add more comments * nits * fix validator init * update block * syncer compiles * tests passing * add local metrics * fix readme * fix paths * actually run consensus tests * update versions * add pending writes * don't allow pending writes * add pruning log * add tip multiplier
Related: #37