71 Commits

Author SHA1 Message Date
anonpenguin23
c0d8fcb895
- Created namespace_helpers on gateway
- Removed old pkg/gatway storage and migrated to new rqlite
- Updated readme
- Created new rqlite implementation
- Updated changelog
- Fixed migration error on migrations.go applySQL
2025-09-23 07:19:35 +03:00
anonpenguin23
16845b758d
- Remoevd old storage folder
- Created new rqlite folder
- Created rqlite adapter, client, gateway, migrations and rqlite init
- Updated node.go to support new rqlite architecture
- Updated readme
- Updated version
2025-09-23 06:00:57 +03:00
anonpenguin23
42598b1123
Removed anyone proxy from libp2p, anyone will be added
Updated readme to include all options for .yaml files
Added gateway.yaml file for gateway default configurations
2025-09-22 17:38:18 +03:00
anonpenguin23
3236e48725 Added default bootstrap peers on config.go 2025-09-20 10:07:32 +03:00
anonpenguin23
66f10df2e1 - Updated Gateway port from 8080/8005 to 6001 - Added Gateway port on
install-debros-network.sh
2025-09-20 08:15:31 +03:00
anonpenguin23
ff3b15108d replaced git.debros.io with github.com 2025-09-18 15:27:53 +03:00
anonpenguin23
82187de96c - Remove backoff_test.go and associated backoff tests - Created
node_test, write tests for CalculateNextBackoff, AddJitter, GetPeerId,
LoadOrCreateIdentity, hasBootstrapConnections
2025-09-18 07:44:23 +03:00
16a2195685 Removed log from monitoring 2025-09-15 15:32:59 +03:00
2acf969e61 Add node namespace and improve monitoring
The above changes introduce node namespacing and various monitoring
improvements. Let's look at the key changes:

- Add node_namespace config field for partitioning node identifiers -
Initialize pubsub with peer exchange enabled - Reduce client monitoring
interval to 30s - Add metric announcement logging

I would write this commit message as:

Add node namespace and improve monitoring

- Add node_namespace config for partitioning identifiers - Enable pubsub
peer exchange - Adjust monitoring intervals and add logging - Initialize
pubsub with namespace support

The subject line captures the two main themes (namespacing and
monitoring), while the body provides helpful details about the specific
changes made.
2025-09-13 11:29:16 +03:00
9d7c094360 Add Go debug configurations and bump version to 0.42.1
The debug configurations and version bump changes are simple enough to
be captured in the subject line alone, so no body is needed.
2025-09-13 11:00:39 +03:00
6b2512a983 Bump version to 0.42.0-beta and add node monitoring
Add detailed connection and system resource monitoring for nodes using a
new node monitoring package. Remove previous client-only monitoring.
Update openapi specs formatting and add new OS stat dependency.
2025-09-13 07:35:48 +03:00
f580e3d8f4 Removed wrong kv store from network 2025-09-12 08:02:45 +03:00
df681be07f Refine authorization to distinguish API keys
Add deduplication to pubsub websocket handler to drop recent duplicate
messages within 2 seconds
2025-08-23 15:39:22 +03:00
a3e0243e54 Add REST database endpoints to gateway with tests and docs
Implemented CRUD operations for database tables via REST: create-table,
drop-table, query, transaction, and schema retrieval. Included
authentication and namespace ownership enforcement. Added comprehensive
end-to-end tests for new database routes. Updated documentation with
usage examples and migration workflow.
2025-08-23 11:46:49 +03:00
44e3f0a795 Preserve Hijacker/Flusher/Pusher in statusResponseWriter
Return full topic list without trimming namespace prefix in pubsub
handler
2025-08-23 11:31:30 +03:00
c9bb889f8b Improve Gateway handlers with internal auth and logging
- Use internal auth context for all downstream client calls in pubsub
and storage handlers to avoid circular auth and enforce security - Add
gateway component warning logs for pubsub websocket handler on error
conditions and important branch decisions - Fix pubsub topic
subscription and publishing to use un-namespaced topics; handle
namespace filtering explicitly on listing - Accept base64-encoded
payloads in storage E2E test to handle encoded responses transparently
2025-08-23 11:24:48 +03:00
03b3b38967 Improve gateway auth middleware to use internal auth context
Enforce GATEWAY_API_KEY in Makefile E2E test target Fix gateway E2E test
payload reading to use io.ReadAll Remove deprecated multi-node test
targets and cleanup Makefile comments
2025-08-23 11:14:11 +03:00
917b0e5acd Enforce API key/JWT authentication and namespace gating in client
- Require API key or JWT by default for client connections - Auto-derive
namespace from JWT claim or API key format `ak_<rand>:<namespace>` -
Deny calls if per-call namespace override mismatches resolved namespace
- Guard Storage, PubSub, Database, and NetworkInfo operations with
access checks - Add context helpers for consistent namespace override
handling - Update docs and add end-to-end and unit tests for
authentication logic
2025-08-20 23:01:51 +03:00
1fca8cb411 Add authentication to protected CLI commands
This commit adds wallet-based authentication to protected CLI commands
by removing the manual auth command and automatically prompting for
credentials when needed. Protected commands will check for valid
credentials and trigger the auth
2025-08-20 12:51:54 +03:00
076edf4208 Fix code style and indentation
Here's the commit message:

``` Fix code style and indentation

Apply consistent indentation, fix whitespace and tabs vs spaces issues,
remove trailing whitespace, and ensure proper line endings throughout
the codebase. Also add comments and improve code organization. ```

The message body is included since this is a bigger cleanup effort that
touched multiple files and made various formatting improvements that are
worth explaining.
2025-08-20 11:27:08 +03:00
7e0db10ada Add wallet-based API key management and auth
This adds a new auth flow allowing users to authenticate with their
wallet and obtain an API key scoped to a namespace. It also moves API
key storage from config to the database for better persistence and
key-to-wallet linkage.

The commit message uses the imperative mood, is under 50 characters,
provides a concise summary in the subject line followed by more detailed
explanation in the body. This follows good Git commit message style
while capturing the key changes made.
2025-08-20 10:42:40 +03:00
17f72390c3 feat: add namespace enforcement and API key requirement to client operations 2025-08-16 18:12:08 +03:00
910dbc5bf6 feat: add namespaced pubsub API with websocket and HTTP endpoints 2025-08-16 16:29:54 +03:00
5b0a6864f9 feat: add version endpoint and expand storage/network API with granular handlers 2025-08-16 16:18:47 +03:00
5eca56cd1e feat: implement HTTP gateway with auth, storage, and namespace isolation 2025-08-16 16:04:00 +03:00
271d7bbafb Switch node startup to YAML config files
Update Makefile, README, and .gitignore to use configs/ Add YAML config
loading to node main.go Add gopkg.in/yaml.v3 dependency Remove unused
IsBootstrap field from NodeConfig
2025-08-14 15:49:07 +03:00
170b06b213 Remove peer discovery from client; improve bootstrap and monitoring 2025-08-14 14:51:58 +03:00
c0dee632a8 Remove QUIC listen addresses and set TCP port to 4001 2025-08-14 14:27:35 +03:00
7818c6a04e Skip bootstrap connection if address resolves to self 2025-08-14 14:20:08 +03:00
0b60ac0791 Unify and simplify pubsub peer discovery logic
Enable PeerExchange globally and replace Anchat-specific discovery with
a generic, application-agnostic approach that uses periodic monitoring
and a single proactive announcement to find topic peers.
2025-08-14 14:08:04 +03:00
b7d8c42464 Remove DHT dependency and simplify peer discovery
Replace DHT-based discovery with bootstrap peerstore and peer exchange.
Update config and code to remove DHT references and dependencies. Add
data directory override support in node config. Cleanup related config
files and dependencies.
2025-08-14 14:02:58 +03:00
051babd8e3 Update node.go 2025-08-12 22:48:09 +03:00
d3ebd759cd Add exponential backoff for bootstrap peer reconnection
Implements jitter and interval growth to improve robustness when
connecting to bootstrap peers. Adds cancellation for the reconnection
loop and ensures it stops cleanly on node shutdown.
2025-08-12 22:43:23 +03:00
135711bb97 Add adv-addr flag for RQLite HTTP and Raft advertisement
Allows setting advertised addresses for RQLite via --adv-addr. Updates
config and startup logic to pass these addresses to RQLite.
2025-08-12 22:35:56 +03:00
1a6806256d Remove legacy bootstrap and dev env logic 2025-08-12 22:06:10 +03:00
f8defe1110 Refactor node startup and config for simplified peer discovery
- Remove configmap.go and bootstrap-specific config logic
- Refactor main.go to use a unified node startup for all roles
- Remove DHT and mDNS from config and node logic; use bootstrap + peer
  exchange
- Update constants to extract bootstrap peer IDs from addresses
- Simplify RQLite advertise logic and remove external IP detection
- Add zeroconf as indirect dependency
- Remove environment variable overrides from config
- Update README with port usage clarification
- Add new CLI and node binaries
2025-08-12 21:39:53 +03:00
dfd1862cfd Use default peers during local development
The change keeps default peers in local dev mode instead of clearing
them, while adding a global pubsub logger and updating bootstrap peer
config.
2025-08-12 08:04:58 +03:00
2647f75ed6 added anyone proxy support 2025-08-10 16:34:11 +03:00
cf36d301d5 feat: add dev-local mode for localhost testing with auto-discovery of bootstrap peers 2025-08-09 17:50:02 +03:00
e76ad5cf16 feat: add NETWORK_DEV_LOCAL flag to force localhost defaults for DB and bootstrap peers 2025-08-09 17:34:59 +03:00
7bcf32e527 feat: add configurable database endpoints with multiaddr to HTTP URL conversion 2025-08-09 17:04:36 +03:00
26e2bbb477 feat: improve logging for peer discovery and connection monitoring 2025-08-09 12:10:15 +03:00
2daa86bd3c refactor: remove legacy peer discovery and connectivity code 2025-08-09 12:01:30 +03:00
6301ed9182 refactor: split network client code into focused modules and extract config mapping
The changes reorganize the network client code by splitting it into focused modules for better maintainability, including
2025-08-09 12:00:35 +03:00
e037773ece refactor: split pubsub manager into focused modules and add env config support 2025-08-09 11:44:24 +03:00
27f2460bf2 feat: implement graceful shutdown and improve cluster join reliability 2025-08-09 08:57:11 +03:00
a38cc08809 feat: skip leadership wait for rqlite nodes with existing state and add ports 4002/5002 to clear script 2025-08-09 08:45:47 +03:00
a59d0f1fd6 feat: add configurable RQLite host advertising modes (auto/localhost/ip) 2025-08-09 08:19:18 +03:00
05798471dd fix: standardize rqlite join addresses to use host:port format without http scheme 2025-08-08 20:30:46 +03:00
b744f7f513 refactor: standardize ports (LibP2P 4001, RQLite 5001/7001) and remove .env configuration 2025-08-08 20:09:28 +03:00