Commit Graph

37 Commits

Author SHA1 Message Date
39ee3cd84b
Merge bug-fix: Fixes on app engine
fixed app node filter query
updated proto change mb to gb on app node resource
tests for get one node for app and vm
tests for node resource updates on vm and app
fix test for app node filtering implemented ip based node filtering
mocking random public ip for node
local brain binary for test without tls
refactor test grpc services to use grpc only stream
2025-06-16 18:39:07 +05:30
9bff01a440
add Apache-2.0 license 2025-06-14 03:40:13 +03:00
6bd30bf87c
implemented pubsub node redirect to app methods
fix app_node schema
improved query handling with bind on check pubsub node
test for app pubsub node
2025-06-13 20:12:21 +05:30
9363750d5b
implemented redirect vm methods
Introduces new environment variable to set public endpoint of the brain
refactor redirect validation to db module
validating pubsub node on all vm
fixed some vm tests
2025-06-12 18:44:45 +05:30
786489fcbd
WIP on impl redirect use remote addr
using remote address on daemon registration as pubsub endpoint
validating pubsub node using client req remote address
remove fetching public ip
2025-06-10 21:02:54 +05:30
af7d4157ee
WIP on implementing redirect
implement public IP handling
Add pub_sub_node field to vm_node table in SQL schema
Refactor BRAIN_GRPC_ADDR to use LazyLock for dynamic IP assignment
Implement current_brain_endpoint function to retrieve public IP
2025-06-10 16:45:16 +05:30
d398198f63
fixes app node resource update
tests for node resource updates on vm and app
fix test for app node filtering implemented ip based node filtering
mocking random public ip for node
local brain binary for test without tls
refactor test grpc services to use grpc only stream
2025-06-09 18:29:00 +05:30
d1921eb838
fix get one app node
fixed app node filter query
updated proto change mb to gb on app node resource
tests for get one node for app and vm
2025-06-06 16:44:17 +05:30
479b9b6fa4 Implement refund on delete app and vm
fix authentication and refund on delete vm
refactor app daemon register to get delete app req
db function for delete app
sample environment variable
extensive tests for delete app and vm
refactor test utilities
2025-06-04 16:01:42 +00:00
e59a3c8fd8 Implement new app contract balance locking
minimum locking balance on deployment
locking balance on app deployment
refunding locked nano while error on daemon
returning appropreate error on app deployment
fixed some typos on logging
new timeout constants for daemon respose
minor change in schema and proto
extensive tests on app deployments
fixed some vm tests
2025-06-04 16:01:42 +00:00
cd5c83d3c3
fix token calculation
all token inputs are in nano lp
fix MIN_ESCROW calculation
fixed all tests with TOKEN_DECIMAL multiplication
2025-05-29 20:34:23 +05:30
0367d70ef3
fix: refund on new_vm error
refund locked_nano on daemon returns error on new_vm
fix live select error on new_vm_req
refactor mock daemon for return error
extensive tests for new_vm
2025-05-29 17:37:53 +05:30
5ccd432566
feat extend vm locked amount
extensive test for extend_vm feature
error handling for db transaction limits
mock data for test extend_vm
todo marking for refund tmp_locked
2025-05-27 21:03:53 +05:30
0ec1b61d8b
Admin and opertor features (#3)
all admin features listing accounts and contracts with access controll and test
ban a user by operator
tests for all features
mock data for test

Reviewed-on: #3
Co-authored-by: Noor <noormohammedb@protonmail.com>
Co-committed-by: Noor <noormohammedb@protonmail.com>
Signed-off-by: Noor <noormohammedb@protonmail.com>
2025-05-26 03:17:27 +05:30
d1e85ec03e
Kick Contract (#2)
Production grade kick contract code for financial transaction tested for both vm and app
modified schema to include node in kick, default time for deleted_app and removed unwanted fields
app data migration for testing kick contract for active_app
fixed some tests
register operator

Reviewed-on: #2
Co-authored-by: Noor <noormohammedb@protonmail.com>
Co-committed-by: Noor <noormohammedb@protonmail.com>
Signed-off-by: Noor <noormohammedb@protonmail.com>
2025-05-26 03:17:00 +05:30
198f43f472
Fix: vm creating error
catching Insufficient fund error from transaction
returning approprate error variant
2025-05-20 20:20:02 +05:30
af18e4ee77
fixes and tests
admin keys from env
test operator inspection
test vm creation timeout
extensive tests on airdrop
refactor db module imports
fix register vm_node creates operator account in db
modularised test into its module and reusable method
fix test brain message add ssh port on mock daemon while new vm
improved error handling on tests unwraping only on top level method
test utils methods accepts refs to remove clone() on top level methods
2025-05-08 15:12:58 +05:30
cd44d82463
VM updates and VM deletion 2025-05-08 02:59:27 +03:00
4dfaa3f465
fix: type matching on live_vmnode_msgs
generic type matching to table name
update type paths with
some logging in tests
2025-05-06 17:25:42 +05:30
cf232f83b3
simplified folder structure 2025-05-06 01:00:42 +03:00
28ff8dcd81
dotenv support
database credentials loading from .env
removed db cred from constants
updated tests accordingly
2025-05-02 20:05:22 +05:30
8abe8eebf4
Refactor database connection handling
use SurrealDB directly in Brain services
modified tests accordingly
cleanedup tests comments
2025-05-02 19:33:34 +05:30
ea3169c024
Fix database channel close error 2025-05-02 19:05:28 +05:30
5cd8317f91
test vm creation
add vm_cli_utils module
refactor test_report_node
validate report from db
2025-04-30 21:08:00 +05:30
de5fba37c9
refactor mock vm daemon and simplified client service fn 2025-04-30 16:40:30 +05:30
ab39b12da9
organize daemon test helpers 2025-04-30 15:47:59 +05:30
92827161ad
refactor test vm daemon 2025-04-30 02:43:45 +05:30
32f6548eff
seperating tests
renamed a test file
seperated daemon service tests
modularizing test into reusable methods
2025-04-30 02:09:14 +05:30
a7268792ad
test brain message
refactor test environment
mocked daemon and cli to interact with brain
2025-04-29 19:01:24 +05:30
0359de54fe
test register vm node 2025-04-28 21:07:32 +05:30
c424d07cc3
test with new keys
create new keys for each test
deleted static key
2025-04-28 20:28:11 +05:30
c74eab51ef
refactor test environment
removing unused gRPC server/client setup
simplifying database preparation
seperate server for normal call and grpc stream
2025-04-28 18:12:58 +05:30
48820189e3
refactor test environment to use real gRPC clients and servers 2025-04-28 16:57:17 +05:30
bea41c939d
test listing operators and list vm contracts 2025-04-28 16:57:17 +05:30
0543130cd5
test database cleanup
test report node
2025-04-28 16:57:17 +05:30
a9168d3204
refactor tests
modularised common code
cleaned grpc_test file
2025-04-28 16:57:17 +05:30
77efe3ad63
basic test setup
modified migration
fake grpc server in tokio
fake db migration for testing
test utilities for signing grpc req
2025-04-28 16:57:14 +05:30