-
released this
2026-01-06 22:53:37 +00:00 | 1 commits to main since this releaseChanges:
- relay/event.py: Add
size: int = 0field to NostrEvent model - relay/client_connection.py: Set
event.size = event.size_byteswhen creating events from WebSocket messages
The size field has existed in the database schema since migration m001 but was never populated, causing:
- Incorrect storage accounting (always 0)
- Broken storage quota enforcement
- Failed event pruning when storage limits reached
The size field is internal relay metadata and is excluded from the nostr_dict() output, maintaining NIP-01 compliance. The size_bytes property calculates the actual byte size of the event's JSON representation.
Fixes: Database constraint violation when inserting events without the required size column value.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com
Downloads
-
Source code (ZIP)
9 downloads
-
Source code (TAR.GZ)
1 download
- relay/event.py: Add