Jean-Philippe Raynaud
    • 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
# Handling Graceful Updates on Mithril Network ## What When we will run Mithril on Mainnet there will be thousands of signers running altogether. In any case we must prevent a gap in the certificate chain despite production aleas. Of those aleas, upgrading the version of the nodes has an impact as different versions of API, messages, signature may lead to loss of a significant part of the signers population over one epoch or more. ## Why We need to be able to keep enough of signer nodes and the aggregator able to work together in order to produce at least one certificate per epoch. For example, if the population of signer nodes is split in 2 sets running incompatibles versions, it could lead to a situation where the quorum of the Mithril protocol would not be reached: thus no multi-signature could be produced. ### Subsequent Questions How much is "enough"? Is it configurable? Do we need a safety margin on top of it? We know that in order to have full security we need to reach 95% of Cardano stakes involved in Mithril protocol. Does this mean that we want 100% of the signers until we ramp up to that threshold? What is the impact of the stakes of a signer in the computation of the threshold *(e.g. when stakes evolve and when a signer de-registered from Mithril or retired from Cardano, and which epoch should we consider)*? Can we have a "ramp up" period after a major update, when we are below a TBD threshold? Does that mean we need monitoring tools to track what is going on in the signer population? :::warning What is the legal impact of monitoring *(i.e. gathering data from third parties)*? GDPR? ::: Do we handle differently the breaking changes and the soft updates? Is the solution we design also working in the future decentralized setup? What is needed to track nodes compatibility? Today we have several versions: * Distribution version: version of the software packaging of all the node types * Software version: version of each software node * API version: version of the HTTP API data structures * Database version: version of the nodes database structure * Protocol version: version of mithril-stm *(used in the metadata of the certificate)* How about automatic upgrade? This would have to be secure: we need to avoid the case when someone attacks our upgrade delivery system, which can be done by posting a transaction on the chain that contains the signed hash of the updated software to download. Would that system be mandatory or optional? :::warning Do we need to exclude signers from the threshold computation if they don't meet some criterias *(that can be for security reasons)* ? If yes which criterias ? *(i.e. signer registered too recently, it did not register for the next epoch, ...)* ::: ## How to organise our work? * Write an ADR: a draft, in order to find most answers to the questions raised above. This will allow us to discuss our solution with other parties. * Exploration: * Separate PoC that interact with the chain (to activate a new version): read & write transactions. * PoC to know what is the best way to handle backward compatibility of API messages (with protobuf, AVRO, in house development etc.) ## Glossary **breaking change**: a release which requires to wait "enough" of the signers has upgraded to this new version to switch on its new features. **soft update**: a release which is compatible with nodes running the last breaking change. **version**: A version corresponds to a given state of the evolution of a software, data schematic or protocol. It is often associated with a numbering which makes it possible to identify it, even in certain cases with a symbolic name. **feature flag**: a parameter stored on the blockchain that a feature is to be activated or not. # draft We need a monitoring solution to ensure a new version is sufficiently spread to represent a majority of the stake. This means there is a need for an external signal for nodes to switch from a feature to the new one. One way to store this signal is to write it in the blockchain, this means the nodes must read the chain at the same moment to update their behavior. This moment could be the epoch change since most of the new features might enter in service at this very moment. Other idea: Changes in the inner structures (certificates, signatures, message to be signed) might be handled by the Aggregator. Today, it knows the stake distribution and may know if signers have the capacity to handle these new structures. changes that can break the way the signatures are made: - changes in the message to be signed - changes in the way single signatures are produced (crypto) maybe in a less extent. The envisaged scope of the solution for signing different messages is the following: - a software update provides both (old & new) ways of composing messages - at a given epoch, the softwares switches the algorythm they use to compute certificates - in first place, the aggregator will collect signers software versions in order to monitor the deployment rate - the information about when to switch is stored in the BlockChain - the algorythm does not imply database migrations on the fly Write the feature flag in the BlockChain: - all Signers & Aggregators read the BChain at start-up at a specified address to check if the feature flag has been set for a given Epoch. - if it has been set, the new feature is enabled if the given Epoch is reached. - if it has been set, the new feature will be enabled if the given Epoch is not already reached. - if it has not been set, the BChain will be probed at each new Epoch. Certificate lifecycle is composed of Eras inside of which they are compatible. Feature flags allow to switch from an Era to another. This is convenient since it allows to represent eras as Enums in the Rust code inside which they can check which code to run. Once the Epoch of the Era has started, the softwares start using the new algorythm thus the old code can be removed from the softwares (soft update). When a software detects an Era it does not support on the BChain, it can emit warnings to ask for an update. It allows to crash with an explicit error if the software is no more compatble with the current Era.

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