Skip to content

feat: Cluster smart-contract#212

Merged
xDarksome merged 58 commits into
mainfrom
feat/contract
Jun 18, 2025
Merged

feat: Cluster smart-contract#212
xDarksome merged 58 commits into
mainfrom
feat/contract

Conversation

@xDarksome

@xDarksome xDarksome commented May 7, 2025

Copy link
Copy Markdown
Member

Description

Initial smart-contract implementation of the WCN Cluster state.

Additionally:

  • update and clean up some dependencies

How Has This Been Tested?

Unit

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@nopestack nopestack requested a review from Copilot May 7, 2025 14:17

This comment was marked as outdated.

@xDarksome xDarksome marked this pull request as ready for review June 6, 2025 13:46
@rplusq rplusq requested a review from Copilot June 9, 2025 18:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a new smart-contract implementation for the WCN Cluster state and updates project dependencies.

  • Updates build configuration and dependency management (flake.nix, Cargo.toml, Dockerfile, etc.).
  • Upgrades networking components and refactors error handling in the metrics server.
  • Adds a new Solidity smart contract for Cluster functionality.

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
flake.nix Adds solc and foundry to the development environment.
crates/wcn/Cargo.toml Removes the alloy dependency for smart contract integration.
crates/node/src/metrics.rs Updates axum route syntax and refactors server error mapping.
crates/node/src/lib.rs Changes error mapping for MetricsServer from hyper::Error to io::Error.
crates/node/Cargo.toml Upgrades axum to 0.8 and removes the alloy dependency.
crates/core/Cargo.toml Removes async-trait dependency.
contracts/src/Cluster.sol Introduces the new smart-contract implementation with Cluster logic.
contracts/foundry.toml Configures Foundry with updated remapping and dependencies.
VERSION Updates the version number.
Dockerfile Upgrades base images for Rust and Debian.
Cargo.toml Updates multiple dependencies to support new features.

Comment thread contracts/src/Cluster.sol Outdated

event SettingsUpdated(Settings newSettings, uint128 clusterVersion);

event OwnershipTransferred(address newOwner, uint128 cluserVersion);

Copilot AI Jun 9, 2025

Copy link

Choose a reason for hiding this comment

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

Typo in event parameter 'cluserVersion'; consider renaming it to 'clusterVersion' for clarity and consistency.

Suggested change
event OwnershipTransferred(address newOwner, uint128 cluserVersion);
event OwnershipTransferred(address newOwner, uint128 clusterVersion);

Copilot uses AI. Check for mistakes.
)
.route(
"/metrics/:peer_id",
"/metrics/{peer_id}",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this the new syntax?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes

@xDarksome xDarksome merged commit ca267a4 into main Jun 18, 2025
12 checks passed
@xDarksome xDarksome deleted the feat/contract branch June 18, 2025 11:13
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.

5 participants