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
97ca287a
Commit
97ca287a
authored
7 years ago
by
nanocryk
Browse files
Options
Downloads
Patches
Plain Diff
Replaced "ancestor hash" by a "nonce" to allow "partial transactions"
parent
82cc1d87
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 New Scalable Protocol to power Duniter.md
+5
-5
5 additions, 5 deletions
rfc/0005 New Scalable Protocol to power Duniter.md
with
5 additions
and
5 deletions
rfc/0005 New Scalable Protocol to power Duniter.md
+
5
−
5
View file @
97ca287a
...
...
@@ -147,8 +147,8 @@ A token stores its creation date, token class hash, a payload and its scripts.
| Size | Description
|:----:|:---
| 32 | Hash of the token class
| 32 | Ancestor hash (filled with zeros at creation)
| 8 | Creation timestamp (filled with zeros at creation)
| 2 | Nonce
| |
| 2 | Storage size (in items)
| |
...
...
@@ -159,6 +159,9 @@ A token stores its creation date, token class hash, a payload and its scripts.
> The `TokenClass` token class can't be defined by a `TokenClass`, so its token class hash is
> filled with zeros, and its class scripts are defined in the protocol.
> The nonce is important when multiple identical tokens are created by the same transaction, as
> without a nonce they would have the same hash. **A transaction is invalid if multiple created tokens
> have the same hash.**
Each storage item is a byte array stored as
...
...
@@ -186,7 +189,7 @@ From each token we can compute it **execution context** :
| Size | Description
|:----:|:---
| 32 | Token hash
(Transaction output index for new tokens since they don't have a hash yet)
| 32 | Token hash
| 1 |
`0x00`
for creation,
`0x01`
for reading,
`0x02`
for consumption
| 2 | Class script parameters storage size (in items)
| 2 | Instance script parameters storage size (in items)
...
...
@@ -236,9 +239,6 @@ A transaction document is structured as
> documents which will be completed afterward without calculating new signatures, or even allow
> multiple issuers to create "partial transactions" that will only be valid when combined.
The "Ancestor hash" of a new token is computed as
`SHA256(TransactionHash ++ ExecutionFootprint)`
,
where
`TransactionHash`
is the hash of whole document above.
### 2.3. Token proofs of existence
Tokens are stored in a [Merkle tree] to remove the need for nodes to store the complete set of tokens.
...
...
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