Ricky Shi
    • 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
    • Invite by email
      Invitee

      This note has no invitees

    • 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
    • Note Insights New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
  • Invite by email
    Invitee

    This note has no invitees

  • 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Instructions for Participants using AWS CloudFormation ## Overview To simplify the complex process of configuring participant servers, we offer a solution where participants can automatically deploy the required cloud environment through scripts using AWS CloudFormation. Participants can follow the steps below to generate the contribution file. ## Setp 1. Creation of Cloud Resources for Participants ### 1. AWS Account Creation Before proceeding, you will need to have an AWS account. Here are the steps to[ create and activate an AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/). ### 2. Create Key Pair Additionally, you will need a public-private key pair for logging into the EC2 instance. If you don't already have one, you can create a key pair in the [Create a key pair](https://ap-southeast-1.console.aws.amazon.com/ec2/home?region=ap-southeast-1#CreateKeyPair) section. Please also download the pem format private key file into your local machine for further use. If the downloaded file extension is cer, please manually [rename it to pem](https://stackoverflow.com/questions/23225112/amazon-aws-ec2-getting-a-cer-file-instead-of-pem). ![](https://i.imgur.com/ulGOhWc.gif) ### 3. Create Environment Through CloudFormation Click on [Contributor AWS Stack](https://ap-southeast-1.console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/quickcreate?templateURL=https://s3-trusted-setup-contributor.s3.ap-southeast-1.amazonaws.com/contributor-stack.yaml&stackName=contributor-stack) to create the entire environment. It will prompt you to select a key pair that you created in previous step for logging into the server. Then click 'Create stack' button. ![](https://i.imgur.com/fJrxo6A.gif) ### 4. Confirm Creation Result After waiting for the CloudFormation stack creation to complete, you can view the newly created server in the [EC2 Instances](https://ap-southeast-1.console.aws.amazon.com/ec2/home?region=ap-southeast-1#Instances:instanceState=running) section. ![](https://i.imgur.com/pA0OwIS.gif) ## Step2. Excute To Generate Contribution File ### 1. Copy the IPv4 Public IP of EC2 Click on the "EC2" service, and then click on "Instances" in the left sidebar. Select the newly created EC2 instance from the list of instances. In the "Description" tab, you can find the "IPv4 Public IP" field and copy it. ![](https://i.imgur.com/ILKNkSA.gif) ### 2. Log In EC2 Server Using Key Pair Log in to the EC2 instance using the key pair, follow these steps: * Open a terminal window on your local machine. * Change the permissions of the private key file to 400 using the following command: `chmod 400 /path/to/private-key.pem` * Connect to the EC2 instance using SSH and the private key file. The command should be in the following format: `ssh -i /path/to/private-key.pem ubuntu@<public-ip-address>` * Replace `/path/to/private-key.pem` with the path to the private key file on your local machine, and `<public-ip-address>` with the IPv4 Public IP address of the EC2 instance that you copied earlier. * If prompted, type "yes" to confirm that you want to connect to the EC2 instance. You are now logged in to the EC2 instance and can proceed with generating the contribution file. ![](https://i.imgur.com/LYv34lx.gif) ### 3. Run Command To Generate Contribution File Enter the following commands: `sudo python3 /opt/participant_scripts/make_contribution_file.py` After the script starts, you will be required to enter the following 4 parameters: 1. \<Sequence Number> Prior to executing the computation operations, all participant should be aware of their participant sequence number. For instance, the value of this parameter is 2 for the second participant. 2. \<Hash value from the previous contribution file> Each time a participant completes the computation of the signature, the signed_attestation.txt content are send to Keybase group. The value of the second parameter hash value is located after the keyword "Your contribution has SHA256 hash". 3. \<Random Text> This is a random text determined by each participant. You may refer below for combination references. > Examples of entropy sources > 1. /dev/urandom from one or more devices > 2. The most recent Bitcoin block hash > 3. Randomly mashing keys on the keyboard > 4. Asking random people on the street for numbers > 5. Geiger readings of radioactive material. e.g. a radioactive object, which can be anything from a banana to a Chernobyl fragment. > 6. Environmental data (e.g. the weather, seismic activity, or readings from the sun) 4. \<SFTP Key> The SFTP private key file can be retrieved from the coordinator via Keybase. The script then starts a container and completes the generation of the contribution file in the background. ![](https://i.imgur.com/2YSc0kY.gif) #### Check Execution Log The estimated duration to excute the Docker run command is approximately 5 to 20 hours. To avoid computation failure due to remote disconnection, the process will run in the background. The logs can be viewed by: 1. Use this command to check the script log to trace the stage of execution ```console sudo tail -f /opt/trustmount/trusted-setup.log ``` 2. Use this command to check the active container logs ```console sudo docker logs trust ``` 3. Completed logs The computation is successfully completed when the last line of the script log is displayed as follows: > Step 5 : Upload contribution file success, please fill in the information into your attestation.txt ### Step3: Edit & Refine Content of attestation.txt After the completion of the computation, participants can refine the keywords in the `/opt/trustmount/attestation.txt` file according to their environment. The contents before the "Don't modify anything from this point on!!!" phrase should be populated and adjusted by each participant. ``` Attestation to contribution <NNNN> #Replace NNNN with the actual participant sequence number. For example, the value will be 0002 for the second participant. ================================ PLEASE UPDATE THIS SECTION WHERE NEEDED (EVERYTHING BETWEEN <>) **Name:** <berg jefferson> #keybase Username **Date:** <28 June 2022> #Execution omputation date by participant **Location:** <Singapore> #Location where participant executed computation **Device:** <AWS r5a.2xlarge 500GB Disk- Ubuntu 20.04 LTS> #Participant's computation environment **Entropy sources:** <Key mashing, bitcoin hashes> #Random text source **Side channel defences:** <None> **Postprocessing:** < I added my contribution details to `attestion.txt` I signed my contribution using keybase I uploaded `loopring_mpc_NNNN.zip` to the server. I rebooted my machine. > **Misc notes:** <None> !!!Don't modify anything from this point on!!! - ---------------------------------------------- ... ... ``` ### Step4: Signing of attestation.txt file How to operate on a Mac device 1. Initialize the Keybase application with a registered account 2. Copy the text content of the above modified attestation.txt to the Mac deivce 3. Open a terminal, execute the signature command in the directory that attestation.txt file is located ```console keybase pgp sign --clearsign -i attestation.txt -o signed_attestation.txt ``` > If "ERROR No secret key available" is displayed,please refer to [tutorial](https://docs.crp.to/importpgp.html#generating-keys-keybase) to add PGP key 4. Send the contents of signed_attestation.txt file to the Keybase group,where the hash value wll be used by as a parameter input by subsequent participant. 5. The process is completed. The coodinator will next verify all output results from all participants. If the verification is sucessful, no more further actions will be required.

    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