Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
BBc-2 ハンズオン 基本インストール / BBc-2 hands-on Basic Ins...
Search
beyond-blockchain.org
September 05, 2023
Technology
0
63
BBc-2 ハンズオン 基本インストール / BBc-2 hands-on Basic Installation
BBc-2 のインストール、およびレッジャーサブシステム with Ethereum のセットアップのチュートリアルのスライドです。
beyond-blockchain.org
September 05, 2023
Tweet
Share
More Decks by beyond-blockchain.org
See All by beyond-blockchain.org
BBc-2 ハンズオン さまざまな証明書の登録とその検証 / BBc-2 Hands-on Registration and Verification of Certificates
beyondblockchain
0
98
BBc-1 ハンズオン : RFID タグによる物流追跡 / BBc-1 Hands-on : Using RFID Tags for Logistics Tracking
beyondblockchain
0
66
BBc-1 ハンズオン : さまざまな証明書の登録とその検証(ウェブ版) / BBc-1 Hands on: Registry for Certificates and Verification (on Web)
beyondblockchain
0
170
BBc-1 ハンズオン : さまざまな証明書の登録とその検証 / BBc-1 Hands on: Registry for Certificates and Verification
beyondblockchain
1
230
BBc-1 ハンズオン : デジタル通貨の送金とスワップを通して学ぶBBc-1 トランザクション / BBc-1 Hands on: Digital Currency Transfer and Swap
beyondblockchain
2
390
BBc-1 ハンズオン : インストールとファイル内容証明 / BBc-1 Hands-on : Installation and File-content Proof
beyondblockchain
2
1.3k
BBc-1 ハンズオン : Ethereum によるレッジャーサブシステム / BBc-1 Hands-on : Ledger Subsystem with Ethereum
beyondblockchain
1
670
BBc トラスト / BBc Trust
beyondblockchain
1
150
BBc-1 設計文書 / BBc-1 (Beyond Blockchain One) Design Paper
beyondblockchain
0
140
Other Decks in Technology
See All in Technology
Goで実践するBFP
hiroyaterui
1
120
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
140
comilioとCloudflare、そして未来へと向けて
oliver_diary
6
450
【Oracle Cloud ウェビナー】2025年のセキュリティ脅威を読み解く:リスクに備えるためのレジリエンスとデータ保護
oracle4engineer
PRO
1
100
[IBM TechXchange Dojo]Watson Discoveryとwatsonx.aiでRAGを実現!事例のご紹介+座学②
siyuanzh09
0
110
あなたの人生も変わるかも?AWS認定2つで始まったウソみたいな話
iwamot
3
860
AWS Community Builderのススメ - みんなもCommunity Builderに応募しよう! -
smt7174
0
180
AWSサービスアップデート 2024/12 Part3
nrinetcom
PRO
0
140
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
680
0→1事業こそPMは営業すべし / pmconf #落選お披露目 / PM should do sales in zero to one
roki_n_
PRO
1
1.5k
タイミーのデータ活用を支えるdbt Cloud導入とこれから
ttccddtoki
1
160
Godot Engineについて調べてみた
unsoluble_sugar
0
410
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
870
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
360
Mobile First: as difficult as doing things right
swwweet
222
9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Unsuck your backbone
ammeep
669
57k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
For a Future-Friendly Web
brad_frost
176
9.5k
Transcript
BBc-2
[email protected]
https://speakerdeck.com/beyondblockchain BBc-2 — — 2023-11-14 – p.1/27
BBc-2 BBc-2 — — 2023-11-14 – p.2/27
BBc-2 BBc-2 BBc-1 ( ) / ⇒ / BBc-2 —
— 2023-11-14 – p.3/27
( ) τʔΫϯ ସ՟ฎ εϚʔτίϯτϥΫτ ݕূՄೳͳঢ়ଶϚγϯ ϓϩϏφϯε དྷྺূ໌ ସՄೳ
ঈؐෆೳ ସՄೳ ঈؐՄೳ ସෆೳ ঈؐՄೳ ସෆೳ ঈؐෆೳ ূ໌͢Δ ಉఆ͢Δ ࢧ͍ ࠷ॳͷԠ༻ *%Χʔυ ηΩϡϦςΟ τʔΫϯ ূ݊ ηϯαʔ ྲྀɾ Ҩݴॻ อݥਃ ͢Δ ײ͢Δ தԝۜߦ σδλϧ௨՟ ҭήʔϜ ൿີ伴Λ͑Δ͔Βຊਓʁ ෛ࠴ Ξηοτͷ දݱΛҠసͰ͖Δʁ ొ͞Εͨίʔυͱ ͦͷ࣮ߦϩάͱ݁Ռͷ ਅਖ਼ੑΛ୲อͰ͖Δʁ ݖҖ͕ Կ͔ͷ༰Λূ໌͢Δʁ ࣋ଓ͢Δଘࡏʹ͍ͭͯ هΛΞοϓσʔτՄʁ ओମ͕͍ͳ͘ͳͬͯ աڈͷσʔλ༗ޮʁ /'5 Ұൠతͳ ೝࣝ ػೳͷ ੳ݁Ռ BBc-2 — — 2023-11-14 – p.4/27
Ethereum Python BBc-2 — — 2023-11-14 – p.5/27
Python 3.8 Solidity 0.5 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-2 — — 2023-11-14 – p.6/27
Ethereum Solidity Ethereum ( ) version 0.5 bbc2 py-solc-x solc
(dependencies) solc py-solc-x BBc-2 — — 2023-11-14 – p.7/27
Solidity macOS + Homebrew $ brew tap ethereum/ethereum $ brew
install solidity Linux (Ubuntu 16.04 LTS ) (x86/AMD64 ) $ sudo apt install software-properties-common $ sudo add-apt-repository -y ppa:ethereum/ethereum $ sudo apt update $ sudo apt install solc ARM solidity git clone dependencies BBc-2 — — 2023-11-14 – p.8/27
wget (macOS ) Ganache BBc-2 — — 2023-11-14 – p.9/27
wget (macOS ) macOS wget ( ) $ brew install
wget wget $ wget ( ) wget dyld: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib $ brew uninstall --force gettext $ brew install gettext BBc-2 — — 2023-11-14 – p.10/27
Ganache Ethereum RPC npm ( ) macOS https://qiita.com/kyosuke5_20/items/c5f68fc9d89b84c0df09 Linux https://qiita.com/seibe/items/36cef7df85fe2cefa3ea
npm Ganache $ sudo npm install -g ganache BBc-2 — — 2023-11-14 – p.11/27
Python3 macOS $ brew install python3 Python 3.9 Homebrew $
brew uninstall --ignore-dependencies
[email protected]
$ brew install
[email protected]
/opt/homebrew/bin/python3.9 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.9 ) python3-dev python3-venv python3-tk BBc-2 — — 2023-11-14 – p.12/27
Python (venv) macOS (Linux python3 ) ‘python3.9’ ‘python3’ $ python3.9
-m venv bbc2env $ source bbc2env/bin/activate (bbc2env) $ pip install -U pip ( ) (bbc1env) $ deactivate BBc-2 — — 2023-11-14 – p.13/27
GitHub git clone $ git clone -b develop https://github.com/beyond-blockchain/bbc2.git $
cd bbc2 tar pip (Python ) $ python setup.py sdist $ pip install dist/bbc2-0.2.1.tar.gz dist tar pip install $ bbc_serv.py <CTRL>+C BBc-2 — — 2023-11-14 – p.14/27
Ethereum infura.io Brownie Ethereum ETH BBcAnchor BBc-2 — — 2023-11-14
– p.15/27
infura.io infura.io ID https://infura.io SIGN UP PROJECT ID infura Ethereum
API infura.io PROJECT ID WEB3_INFURA_PROJECT_ID PROJECT ID (∼/.bash_profile ) $ export WEB3_INFURA_PROJECT_ID= PROJECT ID BBc-2 — — 2023-11-14 – p.16/27
(1) BBc-2 Görli Görli ETH ETH Sepolia “.brownie/network-config.yaml” Ethereum networks
- chainid: 11155111 explorer: https://api-sepolia.etherscan.io/api host: https://sepolia.infura.io/v3/$WEB3_INFURA_PROJECT_ID id: sepolia multicall2: '0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696' name: Sepolia (Infura) provider: infura BBc-2 — — 2023-11-14 – p.17/27
(2) Sepolia $ bbc_eth_tool.py -w ~/.bbc2 -n sepolia set_default_network $
bbc_eth_tool.py -w ~/.bbc2 show_default_network BBc-2 — — 2023-11-14 – p.18/27
Brownie “bbc_serv.py” BBc-2 bbc_serv.py Brownie $ bbc_eth_tool.py -w ~/.bbc2 brownie
ID BBcAnchor Linux (ARM) (AMD64 ) $ python # >>> import solcx >>> solcx.compile_solc(’0.5.17’) # >>> quit() /tmp ~/.solcx/solc-v0.5.17 BBc-2 — — 2023-11-14 – p.19/27
Ethereum görli sepolia Ethereum $ bbc_eth_tool.py -w ~/.bbc2 account görli
sepolia Ethereum $ bbc_eth_tool.py -w ~/.bbc2 new_account BBc-2 BBc-2 — — 2023-11-14 – p.20/27
g¨ orli/sepolia ETH (0.1ETH ) Görli/Sepolia Testnet ETH Faucet ETH
https://goerlifaucet.com https://sepoliafaucet.com ( ) ( ) Görli Faucet 0.001 ETH https://metamask.io/ ETH ( ) $ bbc_eth_tool.py -w ~/.bbc2 balance wei (1 ETH = 1000000000000000000 wei) BBc-2 — — 2023-11-14 – p.21/27
BBcAnchor ( ) $ bbc_eth_tool.py -w ~/.bbc2 deploy BBcAnchor deployed
at BBc-2 BBc-2 — — 2023-11-14 – p.22/27
BBcAnchor.sol ( ) contract BBcAnchor { mapping (uint256 => uint)
public _digests; constructor () public { } function getStored(uint256 digest) public view returns (uint block_no) { return (_digests[digest]); } function isStored(uint256 digest) public view returns (bool isStored) { return (_digests[digest] > 0); } function store(uint256 digest) public returns (bool isAlreadyStored) { bool isRes = _digests[digest] > 0; if (!isRes) { _digests[digest] = block.number; } return (isRes); } } BBc-2 — — 2023-11-14 – p.23/27
BBc-2 BBc-2 — — 2023-11-14 – p.24/27
(“bbc_serv.py” ) $ bbc_eth_tool.py -w ~/.bbc2 config_demo 100 30 domain_id
( ) “bbc_serv.py” $ bbc_eth_tool.py -w ~/.bbc2 -d enable BBc-2 — — 2023-11-14 – p.25/27
3 $ bbc_eth_tool.py -w ~/.bbc2 -d register_demo 3 $ bbc_eth_tool.py
-w ~/.bbc2 -d verify 30 verify BBc-2 — — 2023-11-14 – p.26/27
BBc-2 Ethereum verify “bbc_eth_tool.py” BBc-2 — — 2023-11-14 – p.27/27