436 Commits

Author SHA1 Message Date
59247400dc Remove Dgraph support from the codebase.
Some checks failed
Go / build-and-release (push) Has been cancelled
Dgraph-related functionality, configuration, and benchmarks have been removed from the project. This streamlines the codebase to focus on supported backends, specifically eliminating Dgraph references in favor of Neo4j and other implementations. Version bumped to reflect the changes.
v0.32.5
2025-12-03 19:33:37 +00:00
7a27c44bc9 Enhance policy system tests and documentation.
Some checks failed
Go / build-and-release (push) Has been cancelled
Added extensive tests for default-permissive access control, read/write follow whitelists, and privileged-only fields. Updated policy documentation with new configuration examples, access control reference, and logging details.
v0.32.4
2025-12-03 19:19:36 +00:00
6bd56a30c9 remove dgraph completely
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.32.3
2025-12-03 16:44:49 +00:00
880772cab1 Remove Dgraph, check hex field case, reject if any uppercase
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.32.2
2025-12-03 16:26:07 +00:00
1851ba39fa fix type and nil panic errors
Some checks failed
Go / build-and-release (push) Has been cancelled
1. Added Err() method to CollectedResult (pkg/neo4j/neo4j.go:68-72):
    - The resultiter.Neo4jResultIterator interface requires Err() error
    - CollectedResult was missing this method, causing the type assertion to fail
    - Since CollectedResult pre-fetches all records, Err() always returns nil
  2. Fixed nil pointer dereference in buildCypherQuery (pkg/neo4j/query-events.go:173):
    - Changed if *f.Limit > 0 to if f.Limit != nil && *f.Limit > 0
    - This prevents a panic when filters don't specify a limit
  3. Simplified parseEventsFromResult signature (pkg/neo4j/query-events.go:185):
    - Changed from func (n *N) parseEventsFromResult(result any) to accept *CollectedResult directly
    - This eliminates the runtime type assertion since ExecuteRead already returns *CollectedResult
    - Removed the now-unused resultiter import
v0.32.1
2025-12-03 12:59:23 +00:00
de290aeb25 implement wasm/js specific database engine
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.32.0
2025-12-03 12:31:40 +00:00
0a61f274d5 implement wasm/js specific database engine 2025-12-03 12:31:25 +00:00
c8fac06f24 lint and correct cypher query code 2025-12-03 10:42:32 +00:00
64c6bd8bdd add cypher to cloud skills 2025-12-03 10:25:31 +00:00
58d75bfc5a add version command 2025-12-03 10:23:39 +00:00
69e2c873d8 Refactor for interface clarity and dependency isolation.
Some checks failed
Go / build-and-release (push) Has been cancelled
Replaced inline interface literals with dedicated, documented interface definitions in `pkg/interfaces/`. Introduced `TimeoutError`, `PolicyChecker`, and `Neo4jResultIterator` interfaces to clarify design, improve maintainability, and resolve potential circular dependencies. Updated config and constant usage rules for consistency. Incremented version to v0.31.11.
v0.31.11
2025-12-03 06:04:50 +00:00
6c7d55ff7e Update version and add comprehensive Cypher query tests
Some checks failed
Go / build-and-release (push) Has been cancelled
Bumped version to v0.31.10. Added extensive unit and integration tests for Cypher query generation in Neo4j, including validation of WITH clause fixes and handling optional matches for various event tagging scenarios. Ensures robust handling of references, relationships, and syntactical correctness.
v0.31.10
2025-12-02 19:29:52 +00:00
3c17e975df Add foundational resources for elliptic curve operations and distributed systems
Added detailed pseudocode for elliptic curve algorithms covering modular arithmetic, point operations, scalar multiplication, and coordinate conversions. Also introduced a comprehensive knowledge base for distributed systems, including CAP theorem, consistency models, consensus protocols (e.g., Paxos, Raft, PBFT, Nakamoto), and fault-tolerant design principles.
2025-12-02 19:14:39 +00:00
feae79af1a fix bug in cypher code that breaks queries
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.31.9
2025-12-02 19:10:50 +00:00
ebef8605eb update CLAUDE.md 2025-12-02 18:35:40 +00:00
c5db0abf73 Add policy configuration reference documentation
Introduce a comprehensive reference guide for ORLY policy configuration. This document outlines policy options, validation rules, access control, and debugging methods, serving as the authoritative resource for policy-related behavior.
2025-12-02 18:12:11 +00:00
016e97925a Refactor database configuration to use centralized struct
Some checks failed
Go / build-and-release (push) Has been cancelled
Replaced individual environment variable access with a unified `DatabaseConfig` struct for all database backends. This centralizes configuration management, reduces redundant code, and ensures all options are documented in `app/config/config.go`. Backward compatibility is maintained with default values and retained constructors.
v0.31.8
2025-12-02 13:30:50 +00:00
042b47a4d9 Make policy validation write-only and add corresponding tests
Some checks failed
Go / build-and-release (push) Has been cancelled
Updated policy validation logic to apply only to write operations, ensuring constraints like max_expiry_duration and required tags do not affect read operations. Added corresponding test cases to verify behavior for both valid and invalid inputs. This change improves clarity between write and read validation rules.

bump tag to update binary
v0.31.7
2025-12-02 12:41:41 +00:00
952ce0285b Validate ISO-8601 duration format for max_expiry_duration
Some checks failed
Go / build-and-release (push) Has been cancelled
Added validation to reject invalid max_expiry_duration formats in policy configs, ensuring compliance with ISO-8601 standards. Updated the `New` function to fail fast on invalid inputs and included detailed error messages for better clarity. Comprehensive tests were added to verify both valid and invalid scenarios.

bump tag to build binary with update
v0.31.6
2025-12-02 11:53:52 +00:00
45856f39b4 Update nostr to v1.0.7 with cross-platform crypto support
Some checks failed
Go / build-and-release (push) Has been cancelled
- Bump git.mleku.dev/mleku/nostr from v1.0.4 to v1.0.7
- Add p256k1.mleku.dev as indirect dependency for pure Go crypto
- Remove local replace directive for CI compatibility
- Add WASM/Mobile build plan documentation
- Bump version to v0.31.5

nostr v1.0.7 changes:
- Split crypto/p8k into platform-specific files
- Linux uses libsecp256k1 via purego (fast)
- Other platforms (darwin, windows, android) use pure Go p256k1
- Enables cross-compilation without CGO or native libraries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
v0.31.5
2025-12-02 11:21:28 +00:00
70944d45df Add extensive tests and improve policy configuration handling
Some checks failed
Go / build-and-release (push) Has been cancelled
Introduce comprehensive tests for policy validation logic, including owner and policy admin scenarios. Update `HandlePolicyConfigUpdate` to differentiate permissions for owners and policy admins, enforcing stricter field restrictions and validation flows.
v0.31.4
2025-12-02 07:51:59 +00:00
dd8027478c Update version and enhance owner configuration in README
Some checks failed
Go / build-and-release (push) Has been cancelled
Bump version from v0.31.2 to v0.31.3 and improve the README with clearer instructions for setting relay ownership. Introduced a new recommended method for managing owners via `policy.json`, detailed top-level fields, and refined key rule options for better usability and flexibility in cloud environments.
v0.31.3
2025-12-01 21:41:47 +00:00
5631c162d9 Add default security configuration and policy recipes
Introduced default security settings with stricter access control, including policies requiring owner/admin privileges by default. Added multiple pre-configured policy recipes, custom validator support, and extended documentation for security, configurations, and use cases.
2025-12-01 21:39:28 +00:00
2166ff7013 Remove subscription_stability_test.go and improve test variable naming
Some checks failed
Go / build-and-release (push) Has been cancelled
Deleted `subscription_stability_test.go` to clean up unused or redundant code. Updated naming in test files for improved readability, replacing `tag` with `tg` for consistency. Also updated the `github.com/klauspost/compress` dependency to v1.18.2.
v0.31.2
2025-12-01 18:47:15 +00:00
869006c4c3 Add comprehensive tests for new policy fields and combinations
Some checks failed
Go / build-and-release (push) Has been cancelled
Introduce tests to validate functionality for new policy fields, including `max_expiry_duration`, `protected_required`, `identifier_regex`, and `follows_whitelist_admins`. Also, cover combinations of new and existing fields to ensure compatibility and precedence rules are correctly enforced.

bump to v0.31.2
2025-12-01 18:21:38 +00:00
2e42caee0e Fix .idea directory not being ignored due to allowlist pattern
- Move .idea/ ignore rule after the !*/ allowlist directive
- Add **/.idea/ pattern to catch nested occurrences
- The !*/ rule was re-including directories, overriding the earlier ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 14:44:31 +00:00
2026591c42 update schema and add doc on updating schema 2025-11-28 06:27:46 +00:00
fb39cb3347 fix go.mod v0.31.1-bump 2025-11-27 22:07:32 +00:00
48b0b6984c Fix directory spider tag loss: size limits and validation
Some checks failed
Go / build-and-release (push) Has been cancelled
- Increase WebSocket message size limit from 500KB to 10MB to prevent
  truncation of large kind 3 follow list events (8000+ follows)
- Add validation in SaveEvent to reject kind 3 events without p tags
  before storage, preventing malformed events from buggy relays
- Implement CleanupKind3WithoutPTags() to remove existing malformed
  kind 3 events at startup
- Add enhanced logging showing tag count and event ID when rejecting
  invalid kind 3 events for better observability
- Create round-trip test proving binary tag encoding preserves p tags
  correctly through JSON→binary→JSON cycle
- Root cause: 500KB limit was truncating large follow lists during
  WebSocket receive, causing tags to be lost or incomplete
- Three-layer defense: prevent at gate (size), validate (save time),
  and cleanup (startup)

Files modified:
- app/handle-websocket.go: Increase DefaultMaxMessageSize to 10MB
- pkg/database/save-event.go: Add kind 3 validation with logging
- pkg/database/cleanup-kind3.go: New cleanup function
- pkg/database/cleanup-kind3_test.go: Round-trip test
- app/main.go: Invoke cleanup at startup
v0.31.1
2025-11-27 13:49:33 +00:00
7fedcd24d3 initial draft of hot reload policy 2025-11-27 06:31:34 +00:00
5fbe131755 bump to v0.31.0 directory spider
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.31.0
2025-11-27 00:03:23 +00:00
8757b41dd9 add directory spider 2025-11-27 00:02:14 +00:00
1810c8bef3 Fix binary tag value handling for e/p tags across database layer
Some checks failed
Go / build-and-release (push) Has been cancelled
- Update nostr library to v1.0.3 with improved binary tag support
- Replace tag.Value() calls with tag.ValueHex() to handle both binary and hex formats
- Add NormalizeTagValueForHash() for consistent filter tag normalization
- Update QueryPTagGraph to handle binary-encoded and hex-encoded pubkeys
- Fix tag matching in query-events.go using TagValuesMatchUsingTagMethods
- Add filter_utils.go with tag normalization helper functions
- Update delete operations in process-delete.go and neo4j/delete.go
- Fix ACL follows extraction to use ValueHex() for consistent decoding
- Add binary_tag_filter_test.go for testing tag value normalization
- Bump version to v0.30.3
v0.30.3
2025-11-26 21:16:46 +00:00
fad39ec201 Add serve mode, fix binary tags, document CLI tools, improve Docker
Some checks failed
Go / build-and-release (push) Has been cancelled
- Add 'serve' subcommand for ephemeral RAM-based relay at /dev/shm with
  open ACL mode for testing and benchmarking
- Fix e-tag and p-tag decoding to use ValueHex()/ValueBinary() methods
  instead of Value() which returns raw bytes for binary-optimized storage
- Document all command-line tools in readme.adoc (relay-tester, benchmark,
  stresstest, blossomtest, aggregator, convert, FIND, policytest, etc.)
- Switch Docker images from Alpine to Debian for proper libsecp256k1
  Schnorr signature and ECDH support required by Nostr
- Upgrade Docker Go version from 1.21 to 1.25
- Add ramdisk mode (--ramdisk) to benchmark script for eliminating disk
  I/O bottlenecks in performance measurements
- Add docker-compose.ramdisk.yml for tmpfs-based benchmark volumes
- Add test coverage for privileged policy with binary-encoded p-tags
- Fix blossom test to expect 200 OK for anonymous uploads when auth is
  not required (RequireAuth=false with ACL mode 'none')
- Update follows ACL to handle both binary and hex p-tag formats
- Grant owner access to all users in serve mode via None ACL
- Add benchmark reports from multi-relay comparison run
- Update CLAUDE.md with binary tag handling documentation
- Bump version to v0.30.2
v0.30.2
2025-11-26 09:52:29 +00:00
f1ddad3318 fix policy logic error caused by interface breach
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.30.1
2025-11-25 20:46:46 +00:00
0161825be8 bump for social graph feature for neo4j v0.30.0
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.30.0
2025-11-25 18:09:51 +00:00
6412edeabb implement preliminary implementation of graph data model 2025-11-25 18:08:44 +00:00
655a7d9473 update workflow to update web app bundle correctly
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.29.20
2025-11-25 15:41:01 +00:00
a03af8e05a self-detection elides self url at startup, handles multiple DNS pointers
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.29.19
2025-11-25 13:26:37 +00:00
1522bfab2e add relay self-connection via authed pubkey
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.29.18
2025-11-25 12:54:37 +00:00
a457d22baf update go.yml workflow 2025-11-25 12:12:08 +00:00
2b8f359a83 fix workflow to fetch libsecp256k1.so
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.29.17
2025-11-25 11:04:04 +00:00
2e865c9616 fix workflow to fetch libsecp256k1.so
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.29.16
2025-11-25 06:03:22 +00:00
7fe1154391 fix policy load failure to panic, remove fallback case
Some checks failed
Go / build-and-release (push) Has been cancelled
v0.29.15
2025-11-25 05:49:05 +00:00
6e4f24329e fix silent fail of loading policy with panic, and bogus fallback logic 2025-11-24 20:24:51 +00:00
da058c37c0 blossom works fully correctly 2025-11-23 12:32:53 +00:00
1c376e6e8d migrate to new nostr library 2025-11-23 08:15:06 +00:00
86cf8b2e35 unignore files that should be there 2025-11-22 20:12:55 +00:00
ef51382760 optimize e and p tags 2025-11-22 19:40:48 +00:00
5c12c467b7 some more gitea 2025-11-21 22:40:03 +00:00