Skip to content

[chain] Run Local Network#103

Merged
patrick-ogrady merged 12 commits into
v0.0.45from
local-network
Apr 30, 2025
Merged

[chain] Run Local Network#103
patrick-ogrady merged 12 commits into
v0.0.45from
local-network

Conversation

@patrick-ogrady
Copy link
Copy Markdown
Contributor

@patrick-ogrady patrick-ogrady commented Apr 30, 2025

Related: #37

@patrick-ogrady patrick-ogrady requested a review from Copilot April 30, 2025 03:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread chain/src/lib.rs
pub share: String,
pub identity: String,

pub port: u16,
Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding an inline doc comment for 'metrics_port' to explain its purpose and any expected values for clarity.

Suggested change
pub port: u16,
pub port: u16,
/// The port used for exposing metrics. If `None`, metrics will not be exposed.

Copilot uses AI. Check for mistakes.
Comment thread chain/src/lib.rs
///
/// When run remotely, [commonware_deployer::ec2::Hosts] is used instead.
#[derive(Deserialize, Serialize)]
pub struct Peers {
Copy link

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a brief comment explaining the expected format or use of the keys in 'addresses' to improve developer understanding.

Suggested change
pub struct Peers {
pub struct Peers {
/// A mapping of peer identifiers (e.g., names or IDs) to their network addresses.

Copilot uses AI. Check for mistakes.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 30, 2025

Deploying alto with  Cloudflare Pages  Cloudflare Pages

Latest commit: e757125
Status: ✅  Deploy successful!
Preview URL: https://fbc7f954.alto-8k4.pages.dev
Branch Preview URL: https://local-network.alto-8k4.pages.dev

View logs

@patrick-ogrady patrick-ogrady merged commit 326a5fa into v0.0.45 Apr 30, 2025
6 checks passed
@patrick-ogrady patrick-ogrady deleted the local-network branch April 30, 2025 03:11
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 291 lines in your changes missing coverage. Please review.

Project coverage is 51.13%. Comparing base (d91dc75) to head (e757125).
Report is 1 commits behind head on v0.0.45.

Files with missing lines Patch % Lines
chain/src/bin/setup.rs 0.00% 203 Missing ⚠️
chain/src/bin/validator.rs 0.00% 88 Missing ⚠️
@@             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     
Files with missing lines Coverage Δ
chain/src/lib.rs 94.00% <ø> (ø)
chain/src/bin/validator.rs 0.00% <0.00%> (ø)
chain/src/bin/setup.rs 0.00% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d91dc75...e757125. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

patrick-ogrady added a commit that referenced this pull request May 3, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants