Files
de-mls/Makefile
Ekaterina Broslavskaya bb94246d2b feat(core): steward violation detection and emergency criteria proposal (#52)
* feat: implement emergency criteria proposals and violation detection

- Introduced support for emergency criteria proposals in the consensus mechanism, allowing for the detection of steward violations during commit validation.
- Enhanced the `GroupUpdateRequest` to include an `EmergencyCriteriaProposal` message type, encapsulating violation evidence.
- Implemented logic to handle violations, including broken commits and censorship inactivity, with appropriate evidence reporting.
- Updated the `handle_consensus_event` function to manage emergency proposals correctly, ensuring they do not produce MLS operations.
- Refactored related components to improve clarity and maintainability, including the addition of a `ProposalPriority` enum to manage proposal handling based on urgency.
- Enhanced tests to cover new functionality and ensure robustness in violation detection and emergency proposal processing.

* feat(api): add steward_identity handling in batch proposals

* fix: fix lint error

* feat(core): enhance group configuration with quarantine policy and commit timeout

- Introduced `QuarantinePolicy` to manage unsolicited batch behavior, including maximum items and epoch age.
- Updated `GroupConfig` to include `commit_timeout` and `quarantine_policy`, with default values.
- Refactored group handle creation methods to accept custom policies for group management.
- Enhanced `apply_consensus_result` to validate consensus outcomes against the group's state.
- Added display helpers for converting group update requests to user-friendly formats.
- Improved documentation and tests to cover new functionalities and ensure robustness.

* refactor(app): reorganize group state management and enhance freeze handling

- Updated the group state machine to include new states: Freezing, Selection, and Reelection, improving clarity in state transitions.
- Refactored the handling of commit timeouts, replacing it with freeze timeout logic to streamline candidate selection.
- Introduced new methods for checking freeze timeouts and managing proposals during the freeze phase.
- Enhanced the `GroupConfig` to support freeze duration and subset candidate handling.
- Added display helpers for converting group update requests to user-friendly formats.
- Improved documentation and tests to cover new functionalities and ensure robustness.

* refactor(app): reorganize message handling and introduce message type system

- Refactored message handling in the app layer to improve clarity and maintainability.
- Introduced a new `message_type` module to define app-layer message type labels for better consistency and type safety.
- Updated various components to utilize the new message type system, enhancing the handling of `GroupUpdateRequest` and related messages.
- Added helper methods for converting violation evidence into user-friendly formats for display.
- Improved documentation and tests to cover new functionalities and ensure robustness.

* refactor(app): introduce UserError for app layer error handling and update event handler callbacks

- Added a new `UserError` type to encapsulate application-specific errors, improving error handling across the app layer.
- Refactored event handler methods in `GroupEventHandler` to return `CallbackError` instead of `CoreError`, enhancing clarity in error reporting.
- Updated various components to utilize the new error handling structure, ensuring consistent error management throughout the application.
- Improved documentation and tests to cover new error handling functionalities and ensure robustness.

* refactor(ui): enhance consensus panel layout and state management

- Adjusted the CSS for the consensus panel to improve spacing and layout, specifically reducing the margin for status rows.
- Introduced new state context elements in the UI to display approved proposals and member counts based on the current group state.
- Updated the Rust code to normalize address formatting and enhance event handling for group state changes, ensuring accurate updates during transitions.
- Improved the handling of group state display, including new states and their corresponding UI representations.
- Enhanced documentation and tests to cover the new UI features and ensure robustness.
2026-02-27 20:20:07 +07:00

62 lines
1.7 KiB
Makefile

# Config
REPO_URL = https://github.com/logos-messaging/logos-messaging-nim
REPO_DIR = logos-messaging-nim
OUTPUT_DIR = libs
LIBWAKU_NIM_PARAMS ?= --undef:metrics
# Platform-specific library name
ifeq ($(shell uname),Darwin)
LIB_NAME = libwaku.dylib
# macOS needs SDKROOT for Clang to find <string.h> and friends.
export SDKROOT ?= $(shell xcrun --show-sdk-path)
else
LIB_NAME = libwaku.so
endif
.PHONY: all clean setup build copy
all: setup build copy
# 1. Setup: Clone and initialize submodules
setup:
@echo "--- [1/3] Checking dependencies ---"
@if ! command -v nim > /dev/null; then \
echo "Error: Nim is not installed. Please run: brew install nim"; \
exit 1; \
fi
@echo "--- Checking repository ---"
@if [ ! -d "$(REPO_DIR)" ]; then \
echo "Cloning logos-messaging-nim..."; \
git clone $(REPO_URL) $(REPO_DIR); \
else \
echo "Repository exists. Updating..."; \
cd $(REPO_DIR) && git pull; \
fi
@echo "--- Initializing Submodules ---"
cd $(REPO_DIR) && git submodule update --init --recursive
# 2. Build: Use the repo's internal 'make'
build:
@echo "--- [2/3] Building libwaku ---"
@echo "Using SDKROOT: $(SDKROOT)"
@# Update vendored deps
cd $(REPO_DIR) && $(MAKE) update
@# Compile
cd $(REPO_DIR) && $(MAKE) libwaku BUILD_COMMAND="libwakuDynamic $(LIBWAKU_NIM_PARAMS)"
# 3. Retrieve: Copy the result
copy:
@echo "--- [3/3] Retrieving library ---"
@mkdir -p $(OUTPUT_DIR)
@if [ -f "$(REPO_DIR)/build/$(LIB_NAME)" ]; then \
cp "$(REPO_DIR)/build/$(LIB_NAME)" "$(OUTPUT_DIR)/$(LIB_NAME)"; \
else \
echo "Error: Could not find $(LIB_NAME) in $(REPO_DIR)/build/"; \
exit 1; \
fi
@echo "Success! Library located at: ./$(OUTPUT_DIR)/$(LIB_NAME)"
clean:
rm -rf $(OUTPUT_DIR)
rm -rf $(REPO_DIR)