Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions documentation.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,13 @@
},
{
"type": "string",
"name": "NodeAddress",
"name": "NodeAddress.Address",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "NodeAddress.Port",
"in": "query"
}
],
Expand Down Expand Up @@ -1189,6 +1195,18 @@
}
}
},
"modelNodeAddress": {
"type": "object",
"properties": {
"Address": {
"type": "string"
},
"Port": {
"type": "integer",
"format": "int64"
}
}
},
"modelNodeHardware": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1228,7 +1246,7 @@
"format": "int64"
},
"NodeAddress": {
"type": "string"
"$ref": "#/definitions/modelNodeAddress"
},
"NodeID": {
"type": "string",
Expand Down Expand Up @@ -1256,11 +1274,11 @@
},
"LockedBalance": {
"type": "string",
"format": "int64",
"title": "Funds to be locked to register the node"
"format": "int64"
},
"NodeAddress": {
"type": "string"
"title": "string NodeAddress = 3;\nFunds to be locked to register the node",
"$ref": "#/definitions/modelNodeAddress"
},
"NodePublicKey": {
"type": "string",
Expand Down Expand Up @@ -1557,11 +1575,11 @@
"properties": {
"LockedBalance": {
"type": "string",
"format": "int64",
"title": "Funds to be locked to register the node"
"format": "int64"
},
"NodeAddress": {
"type": "string"
"title": "string NodeAddress = 2;\nFunds to be locked to register the node",
"$ref": "#/definitions/modelNodeAddress"
},
"NodePublicKey": {
"type": "string",
Expand Down
8 changes: 6 additions & 2 deletions model/nodeRegistration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ option go_package = "github.com/zoobc/zoobc-core/common/model";

import "model/pagination.proto";

message NodeAddress {
string Address = 1;
uint32 Port = 2;
}
message NodeRegistration {
int64 NodeID = 1 [jstype = JS_STRING];
bytes NodePublicKey = 2;
string AccountAddress = 3;
uint32 RegistrationHeight = 4;
string NodeAddress = 5;
NodeAddress NodeAddress = 5;
int64 LockedBalance = 6 [jstype = JS_STRING];
bool Queued = 7;
bool Latest = 8;
Expand Down Expand Up @@ -43,7 +47,7 @@ message GetNodeRegistrationRequest {
bytes NodePublicKey = 1;
string AccountAddress = 2;
uint32 RegistrationHeight = 3;
string NodeAddress = 4;
NodeAddress NodeAddress = 4;
}

message GetNodeRegistrationResponse {
Expand Down
5 changes: 3 additions & 2 deletions model/transaction.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option go_package = "github.com/zoobc/zoobc-core/common/model";
import "model/proofOfOwnership.proto";
import "model/pagination.proto";
import "model/batchReceipt.proto";
import "model/nodeRegistration.proto";


// Transaction represent the transaction data structure stored in the database
Expand Down Expand Up @@ -65,17 +66,17 @@ message SendMoneyTransactionBody {
message NodeRegistrationTransactionBody {
bytes NodePublicKey = 1;
string AccountAddress = 2;
string NodeAddress = 3;
// Funds to be locked to register the node
NodeAddress NodeAddress = 3;
int64 LockedBalance = 4 [jstype = JS_STRING];
// Proof of ownership (message + signature)
ProofOfOwnership Poown = 5;
}

message UpdateNodeRegistrationTransactionBody {
bytes NodePublicKey = 1;
string NodeAddress = 2;
// Funds to be locked to register the node
NodeAddress NodeAddress = 2;
int64 LockedBalance = 3 [jstype = JS_STRING];
// Proof of ownership (message + signature)
ProofOfOwnership Poown = 4;
Expand Down
1 change: 0 additions & 1 deletion service/p2pCommunication.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import "model/empty.proto";
import "model/block.proto";
import "model/blockchain.proto";
import "model/transaction.proto";
import "model/batchReceipt.proto";

service P2PCommunication {
rpc GetPeerInfo(model.GetPeerInfoRequest) returns (model.Node) {}
Expand Down