- pkg/protocol/ws/client.go
- Changed `break` to `return` to ensure proper error handling flow in `client.go`.
this bug was causing the CPU usage to go very high from fmt.Errorf statements. changed them to errorf.E so they printed and were visible.
- pkg/protocol/ws/client_test.go
- Commented out the `TestPublishBlocked` test as it is no longer in use.
- pkg/protocol/ws/subscription_test.go
- Commented out `TestSubscribeBasic` and `TestNestedSubscriptions` tests.
- pkg/version/version
- Updated version from `v0.8.3` to `v0.8.4`.
- pkg/crypto/p256k/btcec/btcec_test.go
- Added `orly.dev/pkg/utils` import.
- pkg/protocol/ws/client.go
- Commented out unused logging related to filter matching.
- pkg/version/version
- Bumped version from `v0.8.1` to `v0.8.2`.
- pkg/protocol/ws/client.go
- Added logging for received subscription events.
- Optimized subscription ID assignment.
- pkg/protocol/nwc/client.go
- Implemented `Subscribe` function to handle event subscriptions.
- cmd/walletcli/main.go
- Added support for `subscribe` command to handle notifications.
- Replaced `ctx` with `c` for context usage across all commands.
- pkg/crypto/p256k/helpers.go
- Removed unnecessary logging from `HexToBin` function.
- .github/workflows/go.yml
- Added a new `release` job with steps to set up Go, install `libsecp256k1`, and build release binaries.
- pkg/version/version
- Updated version from v0.5.6 to v0.5.7.
- pkg/protocol/ws/pool_test.go
- Commented out the `TestPoolContextCancellation` test function.
- cmd/lerproxy/app/bufpool.go
- Removed bufferPool-related code and `Pool` struct
- cmd/nwcclient/main.go
- Renamed `Method` to `Capability` for clarity in method handling
- pkg/utils/values/values.go
- Added utility functions to return pointers for various types
- pkg/utils/pointers/pointers.go
- Revised documentation to reference `utils/values` package for pointer utilities
- pkg/protocol/nwc/types.go
- Replaced redundant types and structures with simplified versions
- Introduced dedicated structs for `MakeInvoice`, `PayInvoice`, and related results
- Refactored `Transaction` and its fields for consistent type usage
- pkg/protocol/nwc/uri.go
- Added `ParseConnectionURI` function for URI parsing and validation
- pkg/protocol/nwc/client.go
- Refactored `Client` struct to improve key management and relay handling
- Introduced `Request` struct for generic method invocation payloads
- pkg/protocol/ws/listener.go
- Removed `isAuthed` field from Listener struct
- Modified `IsAuthed()` method to check if `authedPubkey` is non-empty
- Removed `SetAuthed()` method
- pkg/encoders/event/readwriter.go
- Created new file with implementation of `MarshalWrite` and `UnmarshalRead` methods for event encoding/decoding
- pkg/protocol/openapi/events.go
- Created new file with implementation of the Events HTTP API method
- pkg/protocol/socketapi/handleReq.go
- Modified logging to display authed pubkey
- Updated comment regarding authentication status
- pkg/encoders/bytesbuf/pool.go
- Created new package for concurrent-safe buffer pool
- pkg/protocol/openapi/event.go
- Removed import of `lol` package
- Removed tracing logic around `RegisterEvent` function
- pkg/encoders/bytesbuf/pool_test.go
- Created new test file for buffer pool implementation
- pkg/protocol/socketapi/handleAuth.go
- Added comment block for handling pending events (currently commented out)
- pkg/protocol/ws/listener.go
- Added import of "orly.dev/pkg/encoders/event"
- Added `pendingEvent` field to Listener struct
- Added `SetPendingEvent` and `GetPendingEvent` methods
- pkg/protocol/socketapi/socketapi.go
- Added import of "orly.dev/pkg/encoders/envelopes/authenvelope"
- Added authentication challenge logic including logging, RequestAuth call, and envelope writing
- pkg/protocol/socketapi/handleReq.go
- Removed import of "orly.dev/pkg/encoders/envelopes/okenvelope"
- Modified auth handling logic to send closed envelope with reason if auth is required and client is not authenticated
- pkg/protocol/socketapi/handleEvent.go
- Removed import of "orly.dev/pkg/encoders/reason"
- Added authentication challenge logic including logging, RequestAuth call, Ok.AuthRequired method, and envelope writing
- pkg/version/version
- Bumped version from v0.2.17 to v0.2.18
- pkg/database/save-event.go
- Added `noVerify` parameter to `SaveEvent` function
- Added check for existing event using `GetSerialById` when `noVerify` is false
- Modified logic to handle event verification based on `noVerify` flag
- pkg/app/relay/server-publish.go
- Added `false` as third argument to `SaveEvent` calls
- pkg/database/export_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/database/query-for-tags_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/database/query-for-kinds-authors_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/database/query-for-kinds-tags_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/database/query-for-serials_test.go
- Added `false` as third argument to `SaveEvent` call
- main.go
- Modified pprof handling to support different profiling types (cpu, memory, allocation)
- Changed `Pprof` configuration from boolean to string with enum values
- pkg/app/config/config.go
- Changed `Pprof` field type from `bool` to `string` with enum values
- pkg/database/query-for-kinds-authors-tags_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/version/version
- Bumped version from v0.2.12 to v0.2.13
- pkg/database/fetch-event-by-serial_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/database/query-for-kinds_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/database/get-serials-by-range_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/database/query-events-multiple-param-replaceable_test.go
- Added `false` as third argument to `SaveEvent` calls
- pkg/database/query-events_test.go
- Added `false` as third argument to `SaveEvent` calls
- pkg/interfaces/store/store_interface.go
- Updated `Saver` interface to include `noVerify` parameter in `SaveEvent` method
- Added `SerialByIder` interface with `GetSerialById` method
- pkg/database/save-event_test.go
- Added `false` as third argument to `SaveEvent` calls
- Added new test case for saving existing event
- pkg/database/query-for-ids_test.go
- Added `false` as third argument to `SaveEvent` call
- pkg/protocol/ws/client.go
- Changed comment about context cancellation from "context is canceled" to "context is cancelled"
- pkg/app/relay/spider-fetch.go
- Added signature checker for WebSocket connections
- Modified logic to check for existing events before saving
- Added logging and memory optimization improvements
- Added `Export` method in `database/database.go` to export events to an io.Writer
- Implemented detailed logic for exporting all or specific pubkeys' events
- Removed placeholder `Export` function with TODO comment from `database/database.go`
- Updated error handling in `handleReq.go` and `publisher.go` by using `err != nil` instead of `chk.E(err)`
- Added more detailed logging in privilege check conditions in both `publisher.go` and `handleReq.go`
- Introduced new imports such as `"fmt"` in `connection.go` for improved error message formatting
- Created a new file `export.go` under the `database` package with complete implementation of export functionality
- Added `DMRelaysList.K` constant to `pkg/encoders/kind/kind.go`
- Removed unused `"errors"` import from `pkg/protocol/ws/connection.go`
- Updated error messages in `WriteMessage`, `ReadMessage`, and related functions in `pkg/protocol/ws/connection.go` to include the remote address for better debugging
- Changed error handling from `chk.E(err)` to `chk.T(err)` in `pkg/encoders/envelopes/eventenvelope/eventenvelope.go`
- Updated ticker interval from 30 minutes to 1 hour in `pkg/app/relay/server.go`