Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
doc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
common
doc
Commits
92ad4876
Commit
92ad4876
authored
7 years ago
by
nanocryk
Browse files
Options
Downloads
Patches
Plain Diff
simplification
parent
985bfaa9
No related branches found
No related tags found
1 merge request
!6
WIP: RFC 5 : New Scalable Blockchain Protocol
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
rfc/0005 Duniter Protocol Rework.md
+9
-17
9 additions, 17 deletions
rfc/0005 Duniter Protocol Rework.md
with
9 additions
and
17 deletions
rfc/0005 Duniter Protocol Rework.md
+
9
−
17
View file @
92ad4876
...
...
@@ -138,18 +138,11 @@ IdentityHash = SHA256(Username + CompactKey + Blockstamp)
## 2. General document format
Each document is composed of an header, a
list of issuers, a
payload and one or more signatures.
The
header is used for network propagation, but is ellided when written into a
block since they can be deduced from block data and context.
Each document is composed of an header, a payload and one or more signatures.
The
tuple
`(magic value, currency code, document type)`
is used for network propagation,
but is ellided when written into a
block since they can be deduced from block data and context.
The
*header*
and
*payload*
are then hashed to optain a
**document ID**
.
This
*document ID*
is unique and is used in
*Merkle Trees*
. This can allow many optimisations,
such as storing only the
*Merkle Tree*
and being able to prove a given document is included in
it or not. Then
*signatures*
are made on this
**document ID**
.
Since the
*document ID*
is not affected by
*signatures*
, they are not affected by
*signature malleability*
.
> See the block structure for more information about Merkle Trees usage.
The
*header*
and
*payload*
are hashed to optain a
**document ID**
, then
*signatures*
are made from it.
The header is composed of :
...
...
@@ -158,16 +151,15 @@ The header is composed of :
|
*4 bytes*
| Magic value :
`0xDAE2D598`
|
*2 bytes*
| Currency code
|
*2 bytes*
| Document type
|
*2 bytes*
| Payload size in bytes
|
*2 bytes*
| Number of issuers
| ... | Issuers
*complete public keys*
with alignement padding for each
> The magic value has been choosed randomly and contains data with low probability to find in UTF-8 text.
The issuer part is composed of :
| Size | Data |
|:----:|:-----|
|
*2 bytes*
| Number of issuers
| ... | Issuers
*complete public keys*
with alignement padding for each
Payload and each signatures have alignement padding.
Signature cryptographic types are not defined and use the matching public key types.
Signature
s
cryptographic types are not defined and use the matching public key types.
A document is valid if each public key can match a signature (with 0 bytes left and no overflows)
and each signature is valid for the document content.
...
...
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