Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ĞMixer-py
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Engélibert
ĞMixer-py
Commits
e392f801
Commit
e392f801
authored
5 years ago
by
Pascal Engélibert
Browse files
Options
Downloads
Patches
Plain Diff
Update protocol doc
parent
984ef5b6
No related branches found
No related tags found
No related merge requests found
Pipeline
#6840
passed
5 years ago
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+34
-1
34 additions, 1 deletion
README.md
server.py
+1
-1
1 addition, 1 deletion
server.py
with
35 additions
and
2 deletions
README.md
+
34
−
1
View file @
e392f801
...
@@ -125,6 +125,28 @@ A document generated periodically by a node, then sent to other nodes.
...
@@ -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.
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
### HTTP API
...
@@ -164,8 +186,19 @@ Content: a peer info document
...
@@ -164,8 +186,19 @@ Content: a peer info document
Command:
**/getconfirm/_sender\_pubkey_/_in\_seed1_**
get mix confirmation
Command:
**/getconfirm/_sender\_pubkey_/_in\_seed1_**
get mix confirmation
ENCRYPTED_CONFIRM = encrypt( // to client's one-time key
CONFIRM
)
// response:
// 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)
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
*
If "client": _sender_ is the sender pubkey
...
...
This diff is collapsed.
Click to expand it.
server.py
+
1
−
1
View file @
e392f801
...
@@ -868,7 +868,7 @@ def main():
...
@@ -868,7 +868,7 @@ def main():
peers
=
{}
peers
=
{}
db_peers
=
plyvel
.
DB
(
DIR
+
"
/db_peers
"
,
create_if_missing
=
True
)
db_peers
=
plyvel
.
DB
(
DIR
+
"
/db_peers
"
,
create_if_missing
=
True
)
utils
.
load_peers
(
conf
,
db_peers
,
peers
)
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
# Load txs
pool
=
[]
pool
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment