Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OdysseusProtocol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
OdysseusProtocol
Commits
d3a5bdd9
Commit
d3a5bdd9
authored
Jan 11, 2024
by
vicotor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update nodemanager
parent
e34f3159
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
40 deletions
+76
-40
odysseus.proto
baseapi/base/v1/odysseus.proto
+21
-30
request_response.proto
nodemanager/nodemanager/v1/request_response.proto
+53
-8
service.proto
nodemanager/nodemanager/v1/service.proto
+2
-2
No files found.
baseapi/base/v1/odysseus.proto
View file @
d3a5bdd9
...
@@ -9,40 +9,31 @@ import "base/gogo.proto";
...
@@ -9,40 +9,31 @@ import "base/gogo.proto";
option
(
gogoproto.messagename_all
)
=
true
;
option
(
gogoproto.messagename_all
)
=
true
;
message
MetaTxBase
{
enum
TaskType
{
// tx_type used to type tx.
SystemTask
=
0
;
uint32
tx_type
=
1
;
ComputeTask
=
1
;
CustomTask
=
2
;
BigInt
chain_id
=
2
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
];
uint64
nonce
=
3
;
BigInt
gas_price
=
4
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
];
uint64
gas
=
5
;
Address
to
=
6
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.Address"
];
BigInt
value
=
7
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
];
bytes
data
=
8
;
AccessList
access_list
=
9
;
BigInt
v
=
10
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
];
BigInt
r
=
11
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
];
BigInt
s
=
12
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
];
Address
from
=
13
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.Address"
];
//google.protobuf.Timestamp receive_time = 14; `protobuf:"bytes,1,opt,name=Name,proto3"`
// expire block used to ignore execute tx when it is packaged in expired_block.
BigInt
expired_block
=
15
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
];
Hash
tx_hash
=
16
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.Hash"
];
}
}
enum
BillingMethod
{
BillingFree
=
1
;
message
MetaBigInt
{
BillingByTime
=
2
;
Bi
gInt
value
=
1
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.BigInt"
]
;
Bi
llingByDuration
=
3
;
}
}
message
MetaHash
{
message
TaskContent
{
Hash
hash
=
1
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.Hash"
];
string
task_id
=
1
;
TaskType
task_type
=
2
;
bytes
task_param
=
3
;
uint64
max_execute_duration
=
4
;
ModelContent
model
=
5
;
}
}
message
MetaAddress
{
message
ModelContent
{
Address
address
=
1
[(
gogoproto.customtype
)
=
"github.com/CaduceusMetaverseProtocol/MetaTypes/types.Address"
];
string
model_name
=
1
;
string
model_type
=
2
;
// 文生文/文生图等等
string
model_instance
=
3
;
string
require_power
=
4
;
BillingMethod
billing
=
5
;
uint64
cost
=
6
;
}
}
nodemanager/nodemanager/v1/request_response.proto
View file @
d3a5bdd9
...
@@ -2,16 +2,61 @@ syntax = "proto3";
...
@@ -2,16 +2,61 @@ syntax = "proto3";
package
nodemanager
.
v1
;
package
nodemanager
.
v1
;
import
"base/v1/
meta
.proto"
;
import
"base/v1/
odysseus
.proto"
;
// The standard BatchGet request definition.
message
BatchCheckTxRequest
{
message
WorkerMessage
{
repeated
base.v1.MetaTxBase
txs
=
1
;
oneof
message
{
HeartbeatResponse
heartbeat_response
=
1
;
SubmitTaskResult
submit_task_result
=
2
;
StatusResp
status_resp
=
3
;
}
}
message
ManagerMessage
{
oneof
message
{
HeartbeatRequest
heartbeat_request
=
1
;
PushTaskMessage
push_task_message
=
2
;
ProofTaskResult
proof_task_result
=
3
;
}
}
message
HeartbeatRequest
{
}
message
HeartbeatResponse
{
}
message
StatusResp
{
uint64
remain_power
=
1
;
uint
remain_device
=
2
;
// 剩余
}
}
message
PushTaskMessage
{
}
message
SubmitTaskResult
{
}
// The standard BatchGet response definition.
message
ProofTaskResult
{
message
BatchCheckTxResponse
{
// The retrieved shelves.
repeated
base.v1.MetaProofTx
checked_txs
=
1
;
}
}
message
DispatchTaskRequest
{
string
task_type
=
1
;
bytes
task_data
=
2
;
string
worker
=
3
;
}
message
DeviceInfo
{
// device info for gpu
string
device_name
=
1
;
string
device_type
=
2
;
uint64
device_power
=
3
;
}
message
WorkerContent
{
string
worker_id
=
1
;
string
worker_pubkey
=
2
;
repeated
DeviceInfo
devices
=
3
;
}
\ No newline at end of file
nodemanager/nodemanager/v1/service.proto
View file @
d3a5bdd9
...
@@ -4,7 +4,7 @@ package nodemanager.v1;
...
@@ -4,7 +4,7 @@ package nodemanager.v1;
import
"nodemanager/v1/request_response.proto"
;
import
"nodemanager/v1/request_response.proto"
;
service
NodeManagerService
{
service
NodeManagerService
{
rpc
RegisterWorker
(
stream
WorkerMessage
)
returns
(
stream
ManagerMessage
)
{}
rpc
BatchCheckTx
(
BatchCheckTxRequest
)
returns
(
BatchCheckTxResponse
)
{}
rpc
DispatchTask
(
DispatchTaskRequest
)
returns
()
{}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment