junwei zeng
    • 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
    • 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 Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
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
  • 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    evm-lite solo 模式測試 === ### 官方evm-lite測試結果 - 失敗 ```bash= ./demo.sh ../deploy/terraform/local/ips.dat { _: [], ips: '172.17.0.2,172.17.0.4,172.17.0.3,172.17.0.5', port: 8080, contract: 'crowd-funding.sol', keystore: '../deploy/conf/babble/conf/keystore', pwd: '../deploy/conf/eth/pwd.txt' } /home/junwei/Documents/Babble/evm-lite/demo/nodejs/node_modules/solc/soljson.js:1 (function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readF Error: ENOENT: no such file or directory, scandir '../deploy/conf/babble/conf/keystore' at Object.fs.readdirSync (fs.js:904:18) at readKeyStore (/home/junwei/Documents/Babble/evm-lite/demo/nodejs/demo.js:95:16) at init (/home/junwei/Documents/Babble/evm-lite/demo/nodejs/demo.js:75:25) at Object.<anonymous> (/home/junwei/Documents/Babble/evm-lite/demo/nodejs/demo.js:317:1) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Function.Module.runMain (module.js:694:10) ``` 於是我先用 Babble consensus 部署過一次 emv-lite,再重新部署 solo 模式,但結果仍然失敗。 ```bash= ./demo.sh ../deploy/terraform/local/ips.dat { _: [], ips: '172.17.0.2,172.17.0.5,172.17.0.3,172.17.0.4', port: 8080, contract: 'crowd-funding.sol', keystore: '../deploy/conf/babble/conf/keystore', pwd: '../deploy/conf/eth/pwd.txt' } STEP 1) Get ETH Accounts PRESS ENTER TO CONTINUE Getting Accounts GET 172.17.0.2:8080/accounts node1 accounts: {"accounts":[{"address":"0x9a59dA63fb57Ff4fc0B2037b7dFAaeeB27Bf483D","balance":1337000000000000000000,"nonce":0}]} GET 172.17.0.5:8080/accounts node2 accounts: {"accounts":[{"address":"0xcB78eD1D8b91aD8BCe8fA416Ef261C2F95961f53","balance":1337000000000000000000,"nonce":0}]} GET 172.17.0.3:8080/accounts node3 accounts: {"accounts":[{"address":"0x6896718f7A42115C9915f4562d5A26A9CF74A587","balance":1337000000000000000000,"nonce":0}]} GET 172.17.0.4:8080/accounts node4 accounts: {"accounts":[{"address":"0xDd875f820800730cA79C1fB0673E509387041B94","balance":1337000000000000000000,"nonce":0}]} EXPLANATION: Each node controls one account which allows it to send and receive Ether. The private keys reside directly on the evm-babble nodes. In a production setting, access to the nodes would be restricted to the people allowed to sign messages with the private key. We also keep a local copy of all the private keys to demonstrate client-side signing. STEP 2) Send 500 wei (10^-18 ether) from node1 to node2 PRESS ENTER TO CONTINUE Sending Transfer Tx: {"from":"0x9a59dA63fb57Ff4fc0B2037b7dFAaeeB27Bf483D","to":"0xcB78eD1D8b91aD8BCe8fA416Ef261C2F95961f53","value":500} POST 172.17.0.2:8080/tx Response: {"txHash":"0x62fdf2b0a9dc549d8acefbfbc0b7c9cd5c581be9bed57b96000fc97a918e3a10"} EXPLANATION: We created an EVM transaction to send 500 wei from node1 to node2. The transaction was sent to node1 which controls the private key for the sender. EVM-Babble converted the transaction into raw bytes, signed it and submitted it to Babble for consensus ordering. Babble gossiped the raw transaction to the other Babble nodes which ran it through the consensus algorithm until they were each ready to commit it back to EVM-BABBLE. So each node received and processed the transaction. They each applied the same changes to their local copy of the ledger. STEP 3) Check balances again PRESS ENTER TO CONTINUE Getting Accounts GET 172.17.0.2:8080/accounts node1 accounts: {"accounts":[{"address":"0x9a59dA63fb57Ff4fc0B2037b7dFAaeeB27Bf483D","balance":1336999999999999999500,"nonce":1}]} GET 172.17.0.5:8080/accounts node2 accounts: {"accounts":[{"address":"0xcB78eD1D8b91aD8BCe8fA416Ef261C2F95961f53","balance":1337000000000000000000,"nonce":0}]} GET 172.17.0.3:8080/accounts node3 accounts: {"accounts":[{"address":"0x6896718f7A42115C9915f4562d5A26A9CF74A587","balance":1337000000000000000000,"nonce":0}]} GET 172.17.0.4:8080/accounts node4 accounts: {"accounts":[{"address":"0xDd875f820800730cA79C1fB0673E509387041B94","balance":1337000000000000000000,"nonce":0}]} EXPLANATION: Notice how the balances of node1 and node2 have changed. STEP 4) Send raw signed transaction PRESS ENTER TO CONTINUE GET 172.17.0.3:8080/account/0xE1c105CcD6840A201A43a0d3411cf11b4c922234 account: {"address":"0xE1c105CcD6840A201A43a0d3411cf11b4c922234","balance":0,"nonce":0} signed tx Promise { { messageHash: '0x7a21cb5e5207decfb9f29e44fbe7238dbab3e73d41bd3ee958a6130cdd29fee0', v: '0x25', r: '0x4ca1262482176c6a64355a200e535b9348b0475fa1096d8172859248a17417dc', s: '0x114c492984f7bdf9089db2b48a0039f8db5fe6cfb696e3668f5dec942dd08944', rawTransaction: '0xf8628080830f424094f56e918c8aca15b618a1ae00e97c05242976f5638201f48025a04ca1262482176c6a64355a200e535b9348b0475fa1096d8172859248a17417dca0114c492984f7bdf9089db2b48a0039f8db5fe6cfb696e3668f5dec942dd08944' } } POST 172.17.0.3:8080/rawtx Response: insufficient balance for transfer [object Object] ``` ### 失敗原因 : ``` GET 172.17.0.3:8080/account/0xE1c105CcD6840A201A43a0d3411cf11b4c922234 account: {"address":"0xE1c105CcD6840A201A43a0d3411cf11b4c922234","balance":0,"nonce":0} ... Response: insufficient balance for transfer ``` 根據錯誤訊息推斷可能是 Demo Scripts 的問題,因為 Address : 0xE1c105CcD6840A201A43a0d3411cf11b4c922234 並沒有出現在 Accounts List 中,猜測是寫死在 Scripts 中的。 --- ### 10 月 30 日更新 - 成功 ```bash= ./demo.sh ../terraform/local/ips.dat ../conf/solo/conf/keystore/ ../conf/eth/pwd.txt ```

    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