mirror of
https://github.com/vacp2p/de-mls.git
synced 2026-01-09 15:18:00 -05:00
559cc856c0abbf4a5e26c281c05d9b2f6208c888
* feat(build): Add build script and update dependencies for protobuf compilation - Introduced a new `build.rs` file to compile protobuf definitions for application messages and welcome messages. - Updated `Cargo.toml` to include `prost` and `prost-build` dependencies for handling protobuf serialization. - Refactored message handling in the application to utilize the newly defined protobuf structures, enhancing clarity and maintainability. - Updated tests to ensure compatibility with the new message structures and processing logic. * chore(dependencies): Update OpenMLS and related crates to version 0.6.0 - Upgraded OpenMLS and its related crates (`openmls_basic_credential`, `openmls_rust_crypto`, `openmls_traits`) to version 0.6.0 in `Cargo.toml` files for improved functionality and compatibility. - Refactored code to utilize new features and types introduced in the updated OpenMLS version, including changes in credential handling and key package management. - Enhanced README with additional environment variable instructions for running the application. - Updated benchmark tests to reflect changes in the user and group handling logic. * refactor(crypto): Rename MlsCryptoProvider to MlsProvider and update references - Renamed `MlsCryptoProvider` to `MlsProvider` across the codebase for consistency and clarity. - Updated all references to the renamed provider in various modules, including user, group, and identity handling. - Adjusted related function signatures and implementations to accommodate the new provider name. - Enhanced code readability and maintainability by streamlining the usage of the provider in cryptographic operations. * refactor(group): Replace GroupAdmin with Steward and update related functionality * refactor(group): Enhance group proposal handling and member management - Introduced new methods for managing group proposals, including `store_invite_proposal`, `drain_proposals`, and `apply_proposals`. - Updated `Group` struct to handle member addition and removal more effectively, improving the overall user experience. - Refactored user action processing to accommodate the new proposal handling logic, ensuring seamless integration with the Waku messaging system. - Enhanced error handling and logging for better traceability during group operations. * refactor(readme, error, group, message, steward, user): Clean up imports and enhance README instructions - Removed redundant environment variable commands from README for clarity. - Cleaned up unused imports across multiple source files to improve code readability. - Enhanced error handling in the `GroupError` enum for better traceability. - Streamlined message handling in `user.rs` and `steward.rs` to improve code organization. - Updated `put_invite_proposal` method for better readability and maintainability. * feat(consensus): Introduce consensus proposal handling and state machine for steward epochs - Added new `consensus.proto` file defining message structures for proposals and votes. - Implemented a state machine in `state_machine.rs` to manage steward epoch transitions and proposal processing. - Enhanced `Group` struct to support batch proposal handling and state transitions during steward epochs. - Updated user actions to integrate with the new consensus mechanism, allowing for proposal submissions and voting. - Refactored message handling to accommodate new batch proposal messages in `application.proto`. - Removed deprecated benchmark file and added tests for state machine functionality. * docs: Update state machine documentation to clarify transitions for steward epochs - Enhanced comments in `state_machine.rs` to specify the conditions under which the `start_steward_epoch()` transition leads to either the `Waiting` or `Working` state, improving clarity for future reference. * chore: Update dependencies and refine CI workflow - Removed `Cargo.lock` from `.gitignore` to allow tracking of dependency versions. - Added `Cargo.lock` file to the repository for better dependency management. - Updated CI workflow to include steps for formatting checks, clippy, and documentation generation. - Cleaned up unused dependencies and improved the structure of the CI jobs for better clarity and efficiency. - Refactored tests to enhance readability and maintainability, including default implementations and message handling adjustments. * chore(ci): Remove ninja installation step from CI workflow * chore(ci): Add unused dependencies job to CI workflow * chore: Update package versions and modify .gitignore * chore: Remove Cargo.lock file from the repository * chore(ci): Update CI workflow to run on macOS instead of Ubuntu * chore: Update CI workflow to include caching and manage Cargo.lock - Added caching step using Swatinem/rust-cache@v2 to improve CI performance. - Restored Cargo.lock file to the repository for better dependency management. - Updated .gitignore to reflect the inclusion of Cargo.lock, ensuring it is tracked in version control. * update ci * update
de-mls
Decentralized MLS PoC using a smart contract for group coordination
Note: The frontend implementation is based on chatr, a real-time chat application built with Rust and SvelteKit
Run Test Waku Node
This node is used to easially connect different instances of the app between each other.
docker run -p 8645:8645 -p 60000:60000 wakuorg/nwaku:v0.33.1 --cluster-id=15 --rest --relay --rln-relay=false --pubsub-topic=/waku/2/rs/15/1
Run User Instance
Create a .env file in the .env folder for each client containing the following variables:
NAME=client1
BACKEND_PORT=3000
FRONTEND_PORT=4000
NODE_PORT=60000
PEER_ADDRESSES=[/ip4/x.x.x.x/tcp/60000/p2p/xxxx...xxxx]
Run docker compose up for the user instance
docker-compose --env-file ./.env/client1.env up --build
For each client, run the following command to start the frontend on the local host with the port specified in the .env file
Run from the frontend directory
PUBLIC_API_URL=http://0.0.0.0:3000 PUBLIC_WEBSOCKET_URL=ws://localhost:3000 npm run dev
Run from the root directory
RUST_BACKTRACE=full RUST_LOG=info NODE_PORT=60001 PEER_ADDRESSES=/ip4/x.x.x.x/tcp/60000/p2p/xxxx...xxxx,/ip4/y.y.y.y/tcp/60000/p2p/yyyy...yyyy cargo run -- --nocapture
Example of ban user
In chat message block run ban command, note that user wallet address should be in the format without 0x
/ban f39555ce6ab55579cfffb922665825e726880af6
Description
Languages
Rust
96.9%
CSS
3.1%