Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BBc-1 ハンズオン : インストールとファイル内容証明 / BBc-1 Hands-on ...

BBc-1 ハンズオン : インストールとファイル内容証明 / BBc-1 Hands-on : Installation and File-content Proof

BBc-1 Core のインストールと file_proof.py サンプルアプリケーションを用いたチュートリアルのスライドです。

beyond-blockchain.org

June 06, 2018
Tweet

More Decks by beyond-blockchain.org

Other Decks in Technology

Transcript

  1. BBc-1 BBc-1 ( ) / (1) (2) (3) BBc-1 —

    — 2021-05-12 – p.3/27
  2. #JUDPJO ##D$PSF ϨοδϟʔαϒγεςϜ ΞϓϦέʔγϣϯ ͦ ͷ ଞ ͞ · ͟

    · ͳ Ξ ϓ Ϧ ͷ Մ ೳ ੑ ڞ௨ϥΠϒϥϦ ##D ։ൃ߲໨ ஍ Ҭ ௨ ՟ Ξ ϓ Ϧ ϙ Π ϯ τ Ξ ϓ Ϧ དྷ ྺ ূ ໌ Ξ ϓ Ϧ ʜ ॳظʹ͓͍ͯଘࡏূ໌Λґଘ ΞϯΧϦϯά ֤ϊʔυʹ͓͚Δه࿥ʹ͸ ֤छσʔλϕʔεΛར༻Մೳ TRMJUF.Z42-ͦͷଞ%# BBc-1 σδλϧ௨՟ϥΠϒϥϦ ͦͷଞͷϥΠϒϥϦ CCDMJC 1ZUIPO (P +4 FUD Bitcoin Ethereum ( ) (Proof of Context) ( ) BBc-1 — — 2021-05-12 – p.4/27
  3. Python 3.5.0 (3.6.0 < 3.9.0 (12/2 )) macOS + Homebrew

    $ brew install libtool automake pkg-config libffi autoconf openssl Linux (Ubuntu 16.04 LTS ) $ sudo apt install -y git tzdata openssh-server libffi-dev net-tools autoconf automake libtool libssl-dev pkg-config make Windows 10 Linux (Ubuntu 16.04 LTS ) BBc-1 — — 2021-05-12 – p.6/27
  4. Python3 (3.8 ) macOS $ brew install [email protected] python3 python

    3.9 (12/2 ) 3.9 3.8 3.9 $ brew uninstall --ignore-dependencies [email protected] $ brew install [email protected] /usr/local/opt/[email protected]/bin/python3 Linux $ sudo apt update $ sudo apt install python3.8 python3.8-dev python3.8-venv python3.8-tk 16.10 python3(.8) apt (PPA ) python3 python3-dev python3-venv python3-tk BBc-1 — — 2021-05-12 – p.7/27
  5. Python (venv) macOS (Linux python3 ) ‘python3.8’ ‘python3’ $ python3.8

    -m venv bbc1env $ source bbc1env/bin/activate (bbc1env) $ pip install -U pip (bbc1env) $ pip install wheel ( ) (bbc1env) $ deactivate BBc-1 — — 2021-05-12 – p.8/27
  6. pip $ pip install bbc1 ( ) $ bbc_core.py --no_nodekey

    --no_nodekey “libbbcsig.so” $ pip --no-cache-dir install bbc1 <CTRL>+C BBc-1 — — 2021-05-12 – p.9/27
  7. (develop pip ) pip install $ git clone https://github.com/beyond-blockchain/bbc1.git $

    cd bbc1 $ python setup.py sdist $ pip install dist/bbc1-1.5.1.tar.gz dist tar pip install BBc-1 — — 2021-05-12 – p.10/27
  8. file proof ( ) ( ) ( ) BBc-1 —

    — 2021-05-12 – p.12/27
  9. $ cat > test.txt BBC HEAVEN. <CTRL>+D $ more test.txt

    BBC HEAVEN. file_proof.py BBc-1 Core $ file_proof.py store test.txt BBc-1 Core BBc-1 — — 2021-05-12 – p.15/27
  10. (1) ——- Dump of the transaction data —— * transaction_id:

    b’c287be2115f49e5e486eaade7f3ddf4a82e580daf002fb910fddb0c3c199f718’ version: 2 timestamp: 1574670310305 id_length of transaction_id: 32 Event[]: 0 Reference[]: 0 Relation[]: 1 [0] asset_group_id: b’45b2a200ccdcdcc3fb80cc9d423e1069f3ca726157f6492b4a70a48e4a1713ab’ Asset: asset_id: b’3a59d1ff24076d2a4ed1208e9e5132f8a3d353e9275a9c3344b2eebdaeff11dc’ user_id: b’e59c553504ca7a54f888eb47e61b773a221ae1311bd58ec4c0912d71c443d715’ nonce: b’b42ae494c5f7366a55fc3e6c9e0e9bdfa14b1d73fac791d8d6a77346e3b2cb0a’ file_size: 12 file_digest: b’7a30a5ef92e4f84287225e980c48ad3a7c29ea929a710d6b798a9bdcc41afc97’ body_size: 21 BBc-1 — — 2021-05-12 – p.16/27
  11. (2) body: b’Owner is user_default’ Witness: [0] user_id: b’e59c553504ca7a54f888eb47e61b773a221ae1311bd58ec4c0912d71c443d715’ sig_index:

    0 Cross_Ref: None Signature[]: 1 [0] key_type: 2 signature: b’ ec2ee257f72d14dcd52c3ec049eadcac772d8ba325c2c1b1ebdaaacfcdf39d409cfd00c5 a7f88a405bd494aeafab73353766240cab5d5034cc704baaf9d8b0d7’ pubkey: b’ 042d000583b4eb3036a1abdad0c3ebf35bf4f0e892558c81a2b46173e81c3bcafde03ead be8f6acbde71bc18b69d9f46fa2fe87377e715047a1e84bfe39f53551e’ BBc-1 — — 2021-05-12 – p.17/27
  12. BBc-1 Core $ file_proof.py verify test.txt 1 test.txt is valid

    1 test.txt is invalid BBc-1 — — 2021-05-12 – p.19/27
  13. BBc-1 Core $ file_proof.py update test.txt BBc-1 Core verify $

    file_proof.py verify test.txt BBc-1 — — 2021-05-12 – p.20/27
  14. (1) ——- Dump of the transaction data —— * transaction_id:

    b’d0920e166d2a5dadd86cc9a36b011936f85538d5a7530717a1ab5ab45dfbfbe2’ version: 2 timestamp: 1574670526467 id_length of transaction_id: 32 Event[]: 0 Reference[]: 0 Relation[]: 1 [0] asset_group_id: b’45b2a200ccdcdcc3fb80cc9d423e1069f3ca726157f6492b4a70a48e4a1713ab’ Pointers[]: 1 [0] transaction_id: b’c287be2115f49e5e486eaade7f3ddf4a82e580daf002fb910fddb0c3c199f718’ asset_id: None Asset: asset_id: b’b0d56f30de78e3ec7af1e82b66ebd02d140453b63e3c78318084da65999ae03d’ user_id: b’e59c553504ca7a54f888eb47e61b773a221ae1311bd58ec4c0912d71c443d715’ BBc-1 — — 2021-05-12 – p.21/27
  15. (2) nonce: b’c73ddeaabb4345b48a62f8c34944a0f0f585a71b38b912bec9e7b25000d11aee’ file_size: 14 file_digest: b’d866539f224896613df91023f0a9e226085451d6adf1dc5282cbba129d553713’ body_size: 21 body:

    b’Owner is user_default’ Witness: [0] user_id: b’e59c553504ca7a54f888eb47e61b773a221ae1311bd58ec4c0912d71c443d715’ sig_index: 0 Cross_Ref: None Signature[]: 1 [0] key_type: 2 signature: b’ 1b53a2fad2cfc87f248046f022df787012af881fa52fdca8f7e9118516b0f0ef9f30ac5d 3bb81056743271a0f3cd009dcee89e14ef506c7c1e33897abd5f2425’ pubkey: b’ 042d000583b4eb3036a1abdad0c3ebf35bf4f0e892558c81a2b46173e81c3bcafde03ead be8f6acbde71bc18b69d9f46fa2fe87377e715047a1e84bfe39f53551e’ BBc-1 — — 2021-05-12 – p.22/27
  16. / ( ) $ file_proof.py keypair $ file_proof.py setup $

    file_proof.py wait -o someone ID $ file_proof.py send test.txt “someone” file_proof.py get BBc-1 — — 2021-05-12 – p.23/27
  17. (1) verify ——- Dump of the transaction data —— *

    transaction_id: b’7d301959287127b866cad415f2402d9db0e43b9e7afd23d37c4f53d44486b944’ version: 2 timestamp: 1574672140298 id_length of transaction_id: 32 Event[]: 0 Reference[]: 0 Relation[]: 1 [0] asset_group_id: b’45b2a200ccdcdcc3fb80cc9d423e1069f3ca726157f6492b4a70a48e4a1713ab’ Pointers[]: 1 [0] transaction_id: b’d0920e166d2a5dadd86cc9a36b011936f85538d5a7530717a1ab5ab45dfbfbe2’ asset_id: None Asset: asset_id: b’f28e9c7d7e4cf172e9f5134f972f659d6bdbb83e8a95d6d52f4d8bf77f1783d9’ user_id: b’2a59d59e3809f827ce709d3815e3950eef4a6a93af5557a93a7fdfba71460843’ BBc-1 — — 2021-05-12 – p.24/27
  18. (2) nonce: b’0fc536c7e1040ff3ec85391f471c0d1cd8e6357960775702d0e3995bbfccde96’ file_size: 14 file_digest: b’d866539f224896613df91023f0a9e226085451d6adf1dc5282cbba129d553713’ body_size: 52 body:

    b’Ownership is transfered from user_default to someone’ Witness: [0] user_id: b’e59c553504ca7a54f888eb47e61b773a221ae1311bd58ec4c0912d71c443d715’ sig_index: 0 [1] user_id: b’2a59d59e3809f827ce709d3815e3950eef4a6a93af5557a93a7fdfba71460843’ sig_index: 1 Cross_Ref: None BBc-1 — — 2021-05-12 – p.25/27
  19. (3) Signature[]: 2 [0] key_type: 2 signature: b’ 1b05ba95ed4b445caaf941155b53fa82365f5ce608d79912064c8d63ca602952d84b27 5ec7f4c144620b6a6eca32808df70df707a45c35e58848e5e179bffe0d’

    pubkey: b’ 042d000583b4eb3036a1abdad0c3ebf35bf4f0e892558c81a2b46173e81c3bcafde03e adbe8f6acbde71bc18b69d9f46fa2fe87377e715047a1e84bfe39f53551e’ [1] key_type: 2 signature: b’ e77e8887d9fe6ee95ece9943c3767f6f7e45dfa3e38487bc0946a0baa44935a11a7453 5e3988804858ea3fab9d857a3d2bb65367e9134e1ba52525a38b4491a5’ pubkey: b’ 042c350a9569a70b79807fe6d8d3ab75fdf0fa0065e0207462e1a1ef79ed5240e96763 fcf71e3d2ab1e3b3130c13c08681019b191df399b296950a9b4f8061152e’ BBc-1 — — 2021-05-12 – p.26/27