Skip to content

GRAIN๐ŸŒพ v0.2.0

Compare
Choose a tag to compare
@0ceanSlim 0ceanSlim released this 09 Nov 19:44
· 4 commits to main since this release

๐Ÿš€ New Features & Enhancements

  • Config Management Revamp ๐Ÿ—‚๏ธ:

    • Separate YAML Files for Blacklists and Whitelists: Moved the blacklist and whitelist configurations out of the main config.yml and into their own separate YAML files. This modular approach simplifies configuration management and makes it easier to update specific rules independently.
  • Backup Relay Integration ๐Ÿ”—:

    • Backup Relay Support: Introduced a new feature to configure a backup relay. When enabled, Grain will send stored events to this backup relay after successfully storing them in the main database. This allows for seamless rebroadcasting to other personal relays or blaster relays, facilitating broader event dissemination.
  • Enhanced Blacklist Capabilities ๐Ÿ”’:

    • Support for Nostr Mutelists: Introduced the ability to consider one or multiple pubkeys' nostr mutelists as blacklists. This allows the relay to dynamically block events based on mutelist data, adding another layer of event filtering.
    • NOTE: The mutelist event MUST first be stored in the grain database before it can be considered in the blacklist
  • Timestamp-Based Event Rejection โฑ๏ธ:

    • Configurable Time Constraints: Added new configurations to reject events based on their created_at timestamps. The server can now be configured to reject events that are older or newer than specified, using either an integer (Unix timestamp) or a relative string format like "now+5m" for more flexibility.

๐Ÿ› Bug Fixes

  • Improved Duplicate Event Handling ๐Ÿž:
    • Clearer Duplicate Event Responses: Fixed a bug that returned an ambiguous "could not connect to the database" error when receiving events already existing in the database. Now, the server returns a clearer response indicating that the event is a duplicate: "blocked: the database already contains this event."

๐Ÿ› ๏ธ Other Changes

  • Code Refactoring ๐Ÿ› ๏ธ:
  • Streamlined Whitelist Checks โœ”๏ธ:
    • Refactored Whitelist Logic: Optimized the code for checking whitelists by removing redundant logic and integrating checks more efficiently. This enhances performance during event purging and handling, ensuring smoother operations and reduced code complexity.
    • General Code Clean-Up: Refactored the codebase to improve maintainability and readability. This includes streamlining various event handling paths and ensuring modular, reusable components across the application.

๐Ÿ“ฆ Installation Instructions

To install or update to version v0.2.0:
Just extract the app folder to the same directory as your executable, then run the program!


With these updates, v0.2.0 brings more robust event management, streamlined configuration handling, and enhanced support for relay integration.

New Contributors

Full Changelog: v0.1.2...v0.2.0