8 Commits

Author SHA1 Message Date
Ekaterina Broslavskaya
ae4ee902d5 Update frontend and prepare architecture to multi-steward support (#46)
* start to update ui

* remove websocket ui

* refactor code after ws removing

* update frontend

* Unable real consensus result

* update proposal ui

* add current pending proposal to ui section

* Refactor UI and backend for ban request feature

- Updated `build.rs` to ensure proper protobuf compilation.
- Removed `tracing-subscriber` dependency from `Cargo.toml` and `Cargo.lock`.
- Refactored `main.rs` in the desktop UI to improve state management and UI interactions for group chat.
- Enhanced `Gateway` and `User` structs to support sending ban requests and processing related events.
- Updated UI components to reflect changes in proposal handling and improve user experience during voting and group management.
- Added tests for new functionality and improved error handling across modules.

* Add mls_crypto integration and group member management features

- Introduced `mls_crypto` as a dependency for wallet address normalization.
- Enhanced the desktop UI to support group member management, including requesting user bans.
- Implemented new commands and events in the `Gateway` and `User` structs for retrieving group members and processing ban requests.
- Updated the `User` struct to include methods for fetching group members and validating wallet addresses.
- Refactored various components to improve state management and UI interactions related to group chat and member actions.
- Added error handling for invalid wallet addresses and improved overall user experience in group management features.

* Replace Apache License with a new version and add MIT License; update README to reflect new licensing information and enhance user module documentation. Refactor user module to improve group management, consensus handling, and messaging features, including ban request processing and proposal management.

* Update dependencies and refactor package names for consistency

* update ci

* update ci

* - Added `mls_crypto` as a dependency for wallet address normalization.
- Introduced a new CSS file for styling the desktop UI, improving overall aesthetics and user experience.
- Enhanced the `User` and `Gateway` structs to support group member management, including ban requests and proposal handling.
- Implemented new commands and events for retrieving group members and processing ban requests.
- Refactored various components to improve state management and UI interactions related to group chat and member actions.
- Updated the `Cargo.toml` and `Cargo.lock` files to reflect new dependencies and configurations.
- Added new profiles for development builds targeting WebAssembly, server, and Android environments.
2025-10-29 17:04:57 +03:00
Ekaterina Broslavskaya
4ea1136012 chore: implement consensus mechanism (#43)
* chore: implement consensus mechanism

- Updated `Cargo.lock`
- Refactored `Cargo.toml`
- Enhanced `action_handlers.rs` to introduce a ban request feature, allowing users to send ban requests through Waku.
- Implemented a new consensus module to manage proposal and voting processes, including state transitions for steward epochs.
- Updated error handling in `error.rs` to accommodate new consensus-related errors.
- Refactored `group.rs` and `user_actor.rs` to integrate the new consensus logic and improve state management.
- Added tests for the consensus mechanism to ensure reliability and correctness of the voting process.

* chore: update dependencies and refactor code for clarity

* refactor: update voting mechanism and clean up user actor logic

- Changed the return type of `complete_voting_for_steward` to return a vector of messages instead of a boolean.
- Removed unused request types and their implementations related to proposal handling.
- Updated the `handle_steward_flow_per_epoch` function to reflect changes in the voting process and improved logging.
- Refactored tests to align with the new voting mechanism and ensure proper message handling.
- Enhanced consensus logic to better handle vote counting and state transitions.

* feat: implement real voting for all users

- Improved logging messages for clarity during WebSocket message handling.
- Added new serverless functions and shims for better integration with the frontend.
- Introduced new manifest files for server configuration and routing.
- Implemented initial setup for handling user votes and proposals in the consensus mechanism.
- Updated error handling to accommodate new user vote actions and related messages.

* consensus: update test

* Enhance steward state management and consensus mechanism

- Added detailed documentation in README for steward state management, including state definitions, transitions, and flow scenarios.
- Updated `WakuNode` connection logic to include a timeout for peer connections.
- Refactored message handling in `action_handlers.rs` to utilize new `AppMessage` structures for improved clarity.
- Enhanced error handling in `error.rs` to cover new scenarios related to consensus and state transitions.
- Updated tests to reflect changes in the consensus mechanism and steward flow, ensuring robustness and reliability.
- Improved state machine logic to handle edge cases and guarantee proper state transitions during steward epochs.

* Refactor

- Updated `WakuMessageToSend` constructor to accept a slice for `app_id`, improving memory efficiency.
- Enhanced error handling in `Group` struct to provide more descriptive error messages for invalid states.
- Added detailed documentation for new methods in `Group` and `User` structs, clarifying their functionality and usage.
- Refactored state machine logic to ensure proper transitions during steward epochs and voting processes.
- Improved test coverage for group state management and message processing, ensuring robustness in various scenarios.

* Update README for improved clarity and formatting

* fix: fix lint issues and updates test flow

* test: update user test
2025-09-10 16:42:43 +03:00
Ekaterina Broslavskaya
8ebeb4d898 FIx waku double message issue (#32)
* Refactor Waku client test to improve node setup and logging

* Refactor Waku integration to use new node setup and improve message handling

* Refactor Waku node setup and message handling with improved configuration

* Refactor main application structure and improve Waku node initialization

- Restructured main application to separate server and Waku node initialization
- Added more detailed logging for Waku node setup and connection process
- Updated Cargo.toml to use underscore naming convention and update Alloy dependency
- Modified Dockerfile to simplify build process
- Improved error handling and task management in main application flow

* Refactor project structure and improve dependency management

- Updated package name in Cargo.toml to use hyphen instead of underscore for consistency.
- Simplified dependency paths for Waku bindings in Cargo.toml files across the project.
- Modified Dockerfile to streamline the build process by removing unnecessary release flags.
- Enhanced README with updated environment variable instructions for better clarity.
- Improved frontend button structure for better user interaction.
- Cleaned up unused code in Waku actor and related tests, enhancing maintainability.

* Update Waku node initialization with auto-subscription notes

- Added comments to clarify that the Waku node is auto-subscribing to the pubsub topic and that explicit subscription is unnecessary due to this behavior.
- Documented the limitation regarding subscription checks in Waku, referencing the related issue for better context.

* Remove unused Go setup from CI workflow and clean up Cargo.toml by commenting out the library section. This streamlines the configuration and focuses on Rust dependencies.

* Add peer address configuration and benchmark setup

- Introduced a new benchmark configuration in Cargo.toml for `group_flow_benchmark`.
- Updated docker-compose.yml to include `PEER_ADDRESSES` environment variable.
- Enhanced README with instructions for setting `PEER_ADDRESSES` for node connections.
- Modified main.rs to parse and utilize peer addresses for Waku node connections, improving network configuration flexibility.

* Update Cargo.toml and Dockerfile for library configuration and build process

- Added a library section in Cargo.toml to specify bench settings.
- Modified Dockerfile to create necessary source files and streamline the build process by removing redundant commands.
- Updated main.rs to improve error handling for peer address configuration.

* Comment out library and benchmark sections in Cargo.toml, update Dockerfile to streamline build process, and disable CI benchmark jobs in workflow configuration.
2025-03-21 16:25:48 +07:00
Ekaterina Broslavskaya
c99eadb302 de-mls with Waku (#29)
* start building waku for group_chat

* replace test

* replace test

* fix building issue on m2

* continue waku integration

* add admin trait

* update cfg

* update code

* replace cli to ws

* add docker for each instance

* fully working process for joining to the group

* update readme

* Add Waku and WebSocket actors for message processing and group management

- Introduced `WakuActor` for handling message sending and group subscriptions using Waku protocol.
- Implemented `Group` actor for managing group creation, member addition/removal, and message processing.
- Added `WsActor` for WebSocket communication, enabling user connections and message handling.
- Defined message structures for processing and sending messages within the Waku and WebSocket contexts.
- Enhanced error handling and logging for message operations.

* Refactor Waku and WebSocket integration for improved message handling

- Updated `WakuActor` to return a vector of `WakuContentTopic` upon subscription, enhancing group topic management.
- Introduced `AppState` struct to centralize application state, including Waku actor reference and content topics.
- Refactored main loop to utilize `AppState`, improving message flow between Waku and WebSocket actors.
- Enhanced message handling in `WsActor` to support `MessageToPrint`, allowing for structured message sending.
- Improved error handling and logging throughout the message processing pipeline.

* Refactor Waku message handling and clean up unused code

* Refactor and remove unused components from the project

- Deleted the `sc_key_store` module and its associated files, streamlining the codebase.
- Removed unused Docker and Git configuration files, enhancing project clarity.
- Cleaned up `.gitignore` and `.dockerignore` to reflect current project structure.
- Updated `Cargo.toml` files to remove references to deleted modules and dependencies.
- Refactored Waku and WebSocket actors to improve message handling and group management.
- Enhanced error handling and logging throughout the message processing pipeline.
- Adjusted frontend input styling for better user experience.

* Update CI workflow to use 'main' branch and add support for manual triggers

* Enhance Waku integration and documentation

- Added instructions for running a test Waku node in the README.
- Refactored Waku message handling in `ds_waku.rs` to improve content topic management and error handling.
- Updated `Cargo.toml` dependencies for better compatibility and removed unused entries.
- Improved error handling in `DeliveryServiceError` for Waku node operations.
- Cleaned up CI workflow by commenting out unused test jobs.
- Enhanced logging in tests for better traceability of message flows.

* Update CI workflow to include Go setup for testing

- Added steps to the CI configuration to set up Go version 1.20.x for user tests.
- Ensured consistent environment setup across different jobs in the CI pipeline.

* Update package versions to 1.0.0 in Cargo.toml files for the main project and 'ds' module

* Update README to include note on frontend implementation based on Chatr
2024-12-25 15:06:31 +07:00
Aaryamann Challani
bf223ed7ff chore(docker-compose): add env scaffolding instructions (#12) 2024-07-03 12:38:13 +05:30
Ekaterina Broslavskaya
35d2104e3f Implement delivery service using redis (#11)
* add redis connection

* add docker

* add docker

* fix maping error
2024-07-01 18:40:11 +07:00
Aaryamann Challani
b5683dc759 feat(sc_keystore): initialize smart contract template (#8)
* feat(sc_keystore): initialize smart contract template

* fix: submodule

* fix: gitignore and readme
2024-06-26 14:40:27 +05:30
Aaryamann Challani
b9e98f8fbd Initial commit 2024-04-15 17:25:49 +05:30