Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Initial consensus rules #89

Merged
merged 52 commits into from
Nov 27, 2020
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e8ab530
Organize consensus constants alphabetically.
adlerjohn Oct 27, 2020
b9cb328
Rename lastCommitRoot -> lastCommitHash.
adlerjohn Oct 27, 2020
96d7173
Add basic rules for header validity.
adlerjohn Oct 28, 2020
fc1adaa
Clarify serialization with deterministic protobuf.
adlerjohn Nov 3, 2020
09645e1
Add some info on parsing checks.
adlerjohn Nov 4, 2020
530e254
Split up logic around available data acquisition.
adlerjohn Nov 4, 2020
e1b4399
Clean up headings and notation.
adlerjohn Nov 4, 2020
5cd25ed
Add rules for available data header.
adlerjohn Nov 5, 2020
d48d262
Clarify available data header rules.
adlerjohn Nov 5, 2020
19fc54b
Add rules for last commit.
adlerjohn Nov 10, 2020
56ca555
Clean up, add initial available data setup.
adlerjohn Nov 10, 2020
f8c51f2
Fix bad links.
adlerjohn Nov 10, 2020
777cc69
Add rule for available data.
adlerjohn Nov 10, 2020
08a61d7
Merge branch 'master' into adlerjohn-initial_consensus_rules
adlerjohn Nov 10, 2020
0adcc79
Refactor available data original size field.
adlerjohn Nov 11, 2020
5a75720
Minor cleanup for data structures figure.
adlerjohn Nov 11, 2020
b566ec0
Add rule for lengths available data lists.
adlerjohn Nov 11, 2020
e2d3866
Clean up.
adlerjohn Nov 11, 2020
6ef8083
Clean up.
adlerjohn Nov 11, 2020
4d49b4a
Add minor introduction for state transitions.
adlerjohn Nov 11, 2020
de21ed0
Clarify how available data is parsed.
adlerjohn Nov 11, 2020
3e28226
Fix available data header rows and cols roots.
adlerjohn Nov 11, 2020
355553c
Add rules for basic validation of transaction data.
adlerjohn Nov 15, 2020
f3e1864
Reorganize headers.
adlerjohn Nov 15, 2020
8e01879
Add skeleton for processing transactions.
adlerjohn Nov 15, 2020
49fa3b3
Minor wording fix.
adlerjohn Nov 15, 2020
974b5fb
Fix bad link.
adlerjohn Nov 16, 2020
4f4971b
Add state access shorthand for use with state transitions.
adlerjohn Nov 17, 2020
c90a5d9
Add some partial rules for txs.
adlerjohn Nov 18, 2020
d0b9b86
Remove pay for padding tx.
adlerjohn Nov 18, 2020
343a3f7
Make padding shares deterministic.
adlerjohn Nov 18, 2020
68303b9
Extend rule to handle padding between txs and messages.
adlerjohn Nov 18, 2020
8154a60
Clarify rules around padding in data structures doc.
adlerjohn Nov 18, 2020
bf76dbc
Add consensus check for tx message namespace ID.
adlerjohn Nov 18, 2020
b33ce2b
Fix typo.
adlerjohn Nov 18, 2020
9073da8
Add rule for tx create validator.
adlerjohn Nov 18, 2020
d47e3f9
Add todo for end block.
adlerjohn Nov 18, 2020
3b0a96b
Add some rules for unbond tx.
adlerjohn Nov 18, 2020
2d63069
Rearrange.
adlerjohn Nov 18, 2020
92b311c
Add check for is validator when creating validator.
adlerjohn Nov 18, 2020
8c4c90f
Logic to handle unbonding validator with no delegations.
adlerjohn Nov 18, 2020
f9dba6e
Add delegation creation.
adlerjohn Nov 18, 2020
403aab7
Add rules for delegations. Handle balance transfers for rest of txs.
adlerjohn Nov 18, 2020
07a85db
Clean up todos.
adlerjohn Nov 18, 2020
1e2df94
Remove some todos based on issues filed.
adlerjohn Nov 18, 2020
37d31ca
Clean up wording around evidence.
adlerjohn Nov 24, 2020
0ebc93f
Fix indentation.
adlerjohn Nov 24, 2020
6d9648a
Revert changes to inter-message padding shares.
adlerjohn Nov 24, 2020
c5cf93c
Add pay for padding tx state transition rule.
adlerjohn Nov 25, 2020
1522239
Update specs/consensus.md
adlerjohn Nov 26, 2020
9a31d32
Fix max namespace id reserved.
adlerjohn Nov 26, 2020
074cd26
Fix missed graffiti bytes constant renaming.
adlerjohn Nov 27, 2020
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
7 changes: 6 additions & 1 deletion rationale/message_block_layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ The last piece of the puzzle is determining _which_ row the message is placed at

### Caveats

The message placement rules described above conflict with the first rule that shares must be ordered by namespace ID, as shares between two messages that are not placed adjacent to each other do not have a natural namespace they belong to. This is resolved by having special transactions the block producer includes that specify a range a zero-padding shares for a given namespace ID (which must be between the namespace IDs of the surrounding real shares, inclusive).
The message placement rules described above conflict with the first rule that shares must be ordered by namespace ID, as shares between two messages that are not placed adjacent to each other do not have a natural namespace they belong to. This is resolved with some rules:
adlerjohn marked this conversation as resolved.
Show resolved Hide resolved
1. the namespace ID for message shares must be "even" (i.e. the lowest bit must be `0`), and
1. the namespace ID for shares between messages must be exactly `1` more than the namespace ID of the preceding message (i.e. must be identical save for the lowest bit being `1` instead of `0`), and.
adlerjohn marked this conversation as resolved.
Show resolved Hide resolved
1. the namespace ID for shares between requests with a reserved namespace ID and messages must be [`TAIL_TRANSACTION_PADDING_NAMESPACE_ID`](../specs/consensus.md#constants). Note that this only applies for shares _between_ requests with a reserved namespace ID and messages, i.e. if there are no messages in the block then this rule does not apply.
adlerjohn marked this conversation as resolved.
Show resolved Hide resolved

If we interpret namespace IDs as unsigned integers, this can be thought of as restricting the namespace IDs of shares belonging to messages to even namespace IDs and padding shares to odd namespace IDs, further restricted to deterministic values.
adlerjohn marked this conversation as resolved.
Show resolved Hide resolved
Loading