Commit Graph

52 Commits

Author SHA1 Message Date
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
c8363b5e07 fix new_vm error
reverted stream query
checking err on db before listening error stream
refactor app grpc code
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
05759a5149
improve query handling in new_vm
enhanced transaction error handling
bind all string input into NewVmReq submission query
2025-05-28 17:17:26 +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
6a85acda9e
when node reconnects, send deleted VMs
previously, active VMs were sent
2025-05-20 01:45:31 +03:00
0fc9b8003a
adding payments for VM contracts 2025-05-18 16:08:18 +03:00
5c74962ac6
Enhance contract inspect
Allow operators to access app and VM contracts to inspect
2025-05-14 20:58:19 +05:30
8caa55e325
App deployment
rename rpc method app deploy to new_app
improved is_banned_by_node checking app nodes also
moved common ErrorFromTable type to db module
2025-05-14 20:55:13 +05:30
92f4e15412
App contract delete 2025-05-14 13:31:12 +05:30
38a73fd003
App contract list
Implement retrieve app contracts by UUID, admin, and operator
2025-05-14 00:09:36 +05:30
1e8014a5d6
App node
get one app node
2025-05-13 16:07:57 +05:30
0ccaa4840c
App nodes list
modified AppNode filtering proto
improve logging in signature checking
2025-05-13 13:10:42 +05:30
6f40a9c770
App daemon message
activate new app in db
update node resource in db
2025-05-12 18:09:30 +05:30
f831e31d8f
App brain message
new app req and delete app message
schema for new_app_req
improve error handling on live select
2025-05-12 13:05:38 +05:30
7807e14167
WIP App: daemon register
enhance logging levels
2025-05-09 17:11:34 +05:30
71720ed4c5
refactor mapped port into common_proto 2025-05-09 16:14:48 +05:30
db02218fa9
WIP on App services 2025-05-08 19:31:16 +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
079b4a02aa
Major code refactor
vm, app and general modules sperated from db and grpc
common module for share methods and types
2025-05-05 19:56:23 +05:30
8fa8a64862
feat: add timeout for new VM request 2025-05-05 17:55:23 +05:30
a1664d61e4
feat: report app node
include contract id in report schema
validated app contract also while reporting
2025-05-05 13:30:16 +05:30
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
8536c85fd5
clippy fix 2025-05-01 15:52:22 +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
2d108a53b5
Constant
centralize configuration constants
update database initialization for test env
2025-04-28 16:56:17 +05:30
784414815e
after creating a VM, save it to active_vm 2025-04-27 03:37:43 +03:00
b5332316c2
vm deployment working
there still are bugs on how it manages tables in the DB
2025-04-27 02:40:48 +03:00
512dad5146
added capability to search nodes 2025-04-26 23:26:51 +03:00
6f9cb36bea
added code to create new VM
compiles but not tested yet
2025-04-26 22:13:42 +03:00
363724e5d7
added code to send brain_messages to vm daemon 2025-04-26 04:44:28 +03:00
6a99c146ce
switch operator from relation to link
this makes DB operations easier to write
2025-04-25 04:15:00 +03:00
ee75412bb0
inspect operator 2025-04-24 21:27:56 +03:00
a8cf515061
added report and airdrop 2025-04-24 02:47:52 +03:00
71cc0a8d82
add operator list 2025-04-23 14:16:03 +03:00
f51e29fc4b
inspecting and listing contracts with node info 2025-04-23 04:12:35 +03:00
751e81ce37
listing contracts 2025-04-22 19:25:23 +03:00
1cf091d801
get_balance working 2025-04-22 18:34:21 +03:00