Slide 1

Slide 1 text

BBc-1 Ethereum [email protected] https://speakerdeck.com/beyondblockchain BBc-1 — Ethereum — 2022-11-14 – p.1/22

Slide 2

Slide 2 text

Ethereum BBc-1 BBc-1 BBc-1 — Ethereum — 2022-11-14 – p.2/22

Slide 3

Slide 3 text

BBc-1 BBc-1 ( ) / (1) (2) (3) BBc-1 — Ethereum — 2022-11-14 – p.3/22

Slide 4

Slide 4 text

#JUDPJO ##D$PSF ϨοδϟʔαϒγεςϜ ΞϓϦέʔγϣϯ ͦ ͷ ଞ ͞ · ͟ · ͳ Ξ ϓ Ϧ ͷ Մ ೳ ੑ ڞ௨ϥΠϒϥϦ ##D ։ൃ߲໨ ஍ Ҭ ௨ ՟ Ξ ϓ Ϧ ϙ Π ϯ τ Ξ ϓ Ϧ དྷ ྺ ূ ໌ Ξ ϓ Ϧ ʜ ॳظʹ͓͍ͯଘࡏূ໌Λґଘ ΞϯΧϦϯά ֤ϊʔυʹ͓͚Δه࿥ʹ͸ ֤छσʔλϕʔεΛར༻Մೳ TRMJUF.Z42-ͦͷଞ%# BBc-1 σδλϧ௨՟ϥΠϒϥϦ ͦͷଞͷϥΠϒϥϦ CCDMJC 1ZUIPO (P +4 FUD Bitcoin Ethereum ( ) (Proof of Context) ( ) BBc-1 — Ethereum — 2022-11-14 – p.4/22

Slide 5

Slide 5 text

Ethereum Solidity Ethereum ( ) version 0.5 ledger subsystem py-solc-x solc (dependencies) solc py-solc-x BBc-1 — Ethereum — 2022-11-14 – p.5/22

Slide 6

Slide 6 text

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 Windows 10 Linux (Ubuntu 16.04 LTS ) BBc-1 — Ethereum — 2022-11-14 – p.6/22

Slide 7

Slide 7 text

wget (macOS ) Ganache BBc-1 — Ethereum — 2022-11-14 – p.7/22

Slide 8

Slide 8 text

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-1 — Ethereum — 2022-11-14 – p.8/22

Slide 9

Slide 9 text

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-1 — Ethereum — 2022-11-14 – p.9/22

Slide 10

Slide 10 text

Python3 bbc1 : https://speakerdeck.com/beyondblockchain/bbc-1-hands-on-installation-and-file-content-proof BBc-1 Core BBc-1 — Ethereum — 2022-11-14 – p.10/22

Slide 11

Slide 11 text

git clone $ git clone -b develop https://github.com/beyond-blockchain/ledger_subsystem.git $ cd ledger_subsystem tar pip (Python ) $ python setup.py sdist $ pip install dist/ledger_subsystem-0.16.tar.gz dist tar pip install Brownie (Python Ethereum ) BBc-1 — Ethereum — 2022-11-14 – p.11/22

Slide 12

Slide 12 text

Ethereum infura.io Brownie Ethereum ETH BBcAnchor BBc-1 — Ethereum — 2022-11-14 – p.12/22

Slide 13

Slide 13 text

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-1 — Ethereum — 2022-11-14 – p.13/22

Slide 14

Slide 14 text

Brownie “bbc_core.py” BBc-1 Core bbc_core.py Brownie $ eth_subsystem_tool.py -w ~/.bbc1 brownie ID BBcAnchor Linux (ARM) (AMD64 ) $ python # >>> import solcx >>> solcx.compile_solc(’0.5.17’) # >>> quit() /tmp ~/.solcx/solc-v0.5.17 BBc-1 — Ethereum — 2022-11-14 – p.14/22

Slide 15

Slide 15 text

Ethereum görli Ethereum $ eth_subsystem_tool.py -w ~/.bbc1 account görli Ethereum $ eth_subsystem_tool.py -w ~/.bbc1 new_account BBc-1 Core BBc-1 — Ethereum — 2022-11-14 – p.15/22

Slide 16

Slide 16 text

g¨ orli ETH (0.1ETH ) Görli Testnet ETH Faucet ETH https://goerlifaucet.com ( ) ( ) https://metamask.io/ ETH ( ) $ eth_subsystem_tool.py -w ~/.bbc1 balance wei (1 ETH = 1000000000000000000 wei) BBc-1 — Ethereum — 2022-11-14 – p.16/22

Slide 17

Slide 17 text

BBcAnchor ( ) $ eth_subsystem_tool.py -w ~/.bbc1 deploy BBcAnchor deployed at BBc-1 Core BBc-1 — Ethereum — 2022-11-14 – p.17/22

Slide 18

Slide 18 text

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-1 — Ethereum — 2022-11-14 – p.18/22

Slide 19

Slide 19 text

BBc-1 — Ethereum — 2022-11-14 – p.19/22

Slide 20

Slide 20 text

(“bbc_core.py” ) $ eth_subsystem_tool.py -w ~/.bbc1 config_demo 100 30 domain_id ( ) “bbc_core.py” $ eth_subsystem_tool.py -w ~/.bbc1 -d enable BBc-1 — Ethereum — 2022-11-14 – p.20/22

Slide 21

Slide 21 text

3 $ eth_subsystem_tool.py -w ~/.bbc1 -d register_demo 3 transaction_id ( ) $ eth_subsystem_tool.py -w ~/.bbc1 -d verify 30 verify BBc-1 — Ethereum — 2022-11-14 – p.21/22

Slide 22

Slide 22 text

Ethereum verify “eth_subsystem_tool.py” “subsystem_tool_lib.py” BBc-1 — Ethereum — 2022-11-14 – p.22/22