Skip to content
Snippets Groups Projects
Commit e392f801 authored by Pascal Engélibert's avatar Pascal Engélibert :bicyclist:
Browse files

Update protocol doc

parent 984ef5b6
Branches
No related tags found
No related merge requests found
Pipeline #6840 passed
......@@ -125,6 +125,28 @@ A document generated periodically by a node, then sent to other nodes.
A peer info file is useful for connecting a node to an existing network. It contains a list of peer infos. Format: UBJSON.
#### Confirmation
A document generated by a node, to confirm they engage to send a certain tx if they receive another certain tx.
sign(
ubjson(
{
"document": "gmixer-mixconfirm1",
"sender_pubkey": self.sender_pubkey,
"receiver_pubkey": keys.pubkey,
"in_amount": self.in_amount,
"in_base": self.in_base,
"in_seeds": self.in_seeds,
"receiver_pubkey": self.receiver_pubkey,
"out_amount": self.out_amount,
"out_base": self.out_base,
"out_seeds": self.out_seeds,
"req_date": self.date,
"expire_date": self.expire
}
)
)
### HTTP API
......@@ -164,8 +186,19 @@ Content: a peer info document
Command: **/getconfirm/_sender\_pubkey_/_in\_seed1_** get mix confirmation
ENCRYPTED_CONFIRM = encrypt( // to client's one-time key
CONFIRM
)
// response:
"confirm": CONFIRMATION
"confirm": sign(
// binary
IN_SEED_1
IN_SEED_2
length(ENCRYPTED_CONFIRM) // unsigned int 32 bits, Big Endian
ENCRYPTED_CONFIRM
CONFIRMS // Each confirm is preceded by its length, as above
)
Command: **/mix/_sender_/_amount_/_base_[/client]** mix a transaction (set "client" option if request is sent to entry node)
* If "client": _sender_ is the sender pubkey
......
......@@ -868,7 +868,7 @@ def main():
peers = {}
db_peers = plyvel.DB(DIR+"/db_peers", create_if_missing=True)
utils.load_peers(conf, db_peers, peers)
utils.logprint("Loaded " + str(len(peers)) + " peers", utils.LOG_TRACE)
utils.logprint("Loaded " + str(len(peers)) + " peers", utils.LOG_INFO)
# Load txs
pool = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment