GRAINπΎ v0.2.0
π New Features & Enhancements
- Config Management Revamp ποΈ:
Special thanks @captjack for the suggestion
- 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
Special thanks @Silberengel for the report
- 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.
https://github.com/0ceanSlim/grain/releases/tag/v0.2.0
I don't have a grant. Zaps β‘ and Boots π greatly appreciated for all my work. I do this because I π #nostr
#relay #grownostr #go
Oh and special thank nostr:nprofile1qqsy2qa65ynmmlgtq4pcfhzm4qktpc4gxe7tmvrzj9ulqrd35dx24nqpzamhxue69uhkummnw3ezuendwsh8w6t69e3xj7spr3mhxue69uhhyetvv9ujumt4w35ku7thv9kxcet59e3k7mgprfmhxue69uhhw6r9v96zu6rpwpc8jarpwejhym3wvdhsreeupc for catching a big in the rejections based on timestamps!
A quick side note, the main ReadMe spells Architecture "Archetecture" in the first section headline.
Whoops! Thanks for the catch!