Matej Pavlovic
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Incremental Design of Eudico's Ordering Layer > This document is outdated. Its relevant parts are being incorporated in the [Trantor design document](/P59lk4hnSBKN5ki5OblSFg). This document describes the high-level design of the ordering layer of the Eudico Filecoin client. We first present the general architecture in terms of abstract components and their interactions and then describe multiple concrete instantiations of these abstractions. We start by an instantiation with basic functionality and sub-optimal performance that is easy and quick to implement. Further presented instantiations progressively improve in expected performance and functionality for the price of their increasing complexity. The architecture, however, is general enough to conveniently describe even the latest state-of-the-art protocols without making any compromises on the efficiency of their implementation. In this document we define the *logical* components (abstractions) of the ordering layer at the algorithm level, rather than blocks of code implementing them. In practice, multiple of the abstractions defined here may be implemented using a single object in the code and a single abstraction may be implemented by multiple interacting blocks of code. We describe the physical implementation in a [separate document](https://hackmd.io/P59lk4hnSBKN5ki5OblSFg). ## General Architecture of the Ordering Layer The general architecture of the ordering layer is depicted in the figure below. Each node runs one instance of its implementation. ![General Ordering Architecture](https://i.imgur.com/iDdGAet.png) It has the following (logical) components: ### Transaction mempool The transaction mempool persistently stores incoming transactions, including their payloads. Exposes an interface that allows for - Notifications of new incoming transactions - Retrieval of the transaction payload based on a small identifier (e.g. the transaction hash) - Garbage collection of transactions applied to the state ### Availability layer The availability layer assembles *batches of transaction identifiers* (e.g. hashes) and executes a protocol ensuring availability of all transactions in these batches (including their payloads) throughout the system. When a batch of transactions becomes provably available to all correct nodes, the availability layer produces an *availability certificate*. Protocol-specific metadata can be attached to created batches and their corresponding certificates, representing, for example, relations (e.g. causal ones) between the batches/certificates or additional protocol messages piggybacked on the batches (to be interpreted later). Exposes an interface that allows for - Consuming new incoming transaction identifiers - Notifications of new batches and availability certificates ### Structured batch store Stores the batches of transaction identifiers and their corresponding availability certificates produced by the availability layer. Keeps track of the relations between the batches. If, for example, the batches are causaly related, this component stores the resulting DAG. Based on the state of the batch store, proposes certificates to the consensus layer. Exposes an interface that allows for - Storing batches of transaction identifiers, availability certificates, and the attached metadata - Retrieving batches of transaction identifiers based on their availability certificates and potentially additional metadata - Proposing batches/certificates to the consensus layer ### Consensus layer Establishes a total order on available batch availability certificates. The consensus layer only orders availability certificates, without ever accessing the associated transaction payloads. It makes sure, however, that the certificates at its output are valid. Note that, depending on the implementation, it might not be necessary for the consensus layer to directly output a certificate for every single batch produced by the availability layer. Some certificates might be skipped if, for example, they become outdated or their position in the total order can implicitly be inferred from their relations to other ordered batches. Exposes an interface that allows for - Proposing availability certificates - Outputting a totally ordered stream of availability certificates ### Block assembler Consumes a stream of totally ordered batch availability certificates, retrieves the corresponding batches of transaction identifiers from the structured batch store, retrieves transaction payloads from the mempool, and delivers full blocks to Eudico. If incoming batches contain duplicate references to the same transaction, the block assembler performs the necessary deduplication. Note that - On reception of a single availability certificate, the block assembler may retrieve multiple batches from the batch store, based on the associated metadata. - There need not be a 1:1 relationship between the batches produced by the availability layer and the blocks delivered to Eudico. The block assembler exposes an interface that allows for: - Consuming a stream of batch availability certificates - Delivering blocks of transactions (including payloads) to Eudico In the following, we present instantiations of this general architecture, starting with a simple one and continuing incrementally towards more advanced ones. ## 1. Simple Ordering Layer In the first iteration, we propose an instantiation of the ordering layer depicted below. ![Simple Instantiation of Eudico's Ordering Layer](https://i.imgur.com/NdDJ8dI.png) We use Eudico's mempool augmented by a mechanism for push-notifying about newly added transactions. We implement the availability layer by a simple algorithm that periodically creates a batch of newly received transaction identifiers, disseminates the batch to other nodes and gathers signed confirmations from those nodes that they persistently store all transactions referenced by the batch in their respective mempools. The transfer of the transaction payloads (at least in an initial implementation) is left to the mempool implementation and a node receiving a batch simply waits until the referenced transactions all appear in its mempool before sending a confirmation. Optionally, this simple algorithm can be augmented by a pull mechanism, where a node actively fetches transaction payloads from the batch originator (e.g. after a timeout). After gathering a quorum of signed confirmations for an assembled batch, a node assembles these confirmations to a certificate and stores it in the batch store, which is itself a simple key-value store for batches indexed by their availability certificates. In this simple instantiation, the availability layer directly proposes each newly created certificate to the consensus layer, bypassing the batch store (which contains no logic for deciding which batch to propose). Alternatively, the batch store can be augmented by some trivial logic that simply proposes certificates of all newly added batches. We implement the consensus layer using "Redundant ISS", which is a simplified version of ISS without request deduplication. We pick PBFT for the ISS ordering sub-protocol, because it is simple and already partially implemented. Such a simple version of ISS boils down to a multi-leader multiplexer of PBFT instances. An advantage of this choice compared to proper deduplicated ISS is resistance to a mobile adversary. We also implement a simple block assembler that gathers the required data for each received block, deduplicates transactions and delivers full blocks to Eudico. ## 2. Improving Throughput In the second iteration, we augment the simple design by [Narwhal](https://arxiv.org/abs/2105.11827) to improve throughput (especially during adverse network conditions). The Narwhal-based design is shown below. ![High-Throughput Instantiation of Eudico's Ordering Layer Based on Narwhal](https://i.imgur.com/zaNvnvF.png) We replace the simple availability layer by a proper implementation of Narwhal, producing a DAG of batch availability certificates. Since Narwhal is only an augmented version of The batch store, if at all, only needs to be modified to store additional metadata encoding the causal relations. This time, the block assembler uses all causal dependencies of the received batches for assembling the final blocks delivered to Eudico. To address duplication among the proposed transactions, a discussed [Narwhal deduplication mechanism](https://github.com/protocol/ConsensusLab/discussions/93) can be implemented. ## 3. Improving Latency Treating the availability and ordering of transaction batches separately comes at a cost of latency, since the messages exchanged by the availability layer are not taken into account at all by the ordering protocol of the consensus layer. To leverage the work done by the availability layer by the consensus layer, we implement [Tusk](https://arxiv.org/abs/2105.11827) or [Bullshark](https://arxiv.org/abs/2201.05677) both in the availability layer and in the consensus layer, as depicted below. ![High-Throughput and Low-Latency Instantiation of Eudico's Ordering Layer Based on Bullshark or Tusk](https://i.imgur.com/MyimMsx.png) The Tusk and Bullshark algorithms can naturally be split into an availability component creating a DAG and an ordering component interpreting the DAG produced by the availability component. This makes them conveniently expressible in terms of the general architecture proposed in this document. ## Reconfiguration In order to support dynamic reconfiguration of the system, we need to create a unified notion of progress of the whole system (a version of the system state), of which multiple components must be aware. This is necessary for all the components to have enough information on when to switch to new configurations. This notion of system progress can be expressed as block height, sequence number, epoch, etc... (to be established when implementing reconfiguration). As is usual, configuration changes must be totally ordered with respect to state updates. As depicted below, we thus introduce an abstraction keeping track of the configuration of the system and deciding at which version of the system state which configuration applies. ![Reconfiguring Eudico's Ordering Layer](https://i.imgur.com/vchXd4K.png) All system components then need to attach an identifier of the used system configuration to the output they produce, such that this output can be interpreted accordingly. For example, an availability certificate of a batch that was produced by a configuration with an outdated membership must be considered invalid. Note that this reconfiguration approach refers to the general architecture and can thus be applied to any of the stages of the implementation discribed above.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully