kharukaのブログ~お金と技術とキャリア~

Edu Fin~金融×教育~若いうちからお金について学ぶってだいじ!学んだテクノロジーはみんなの財産。過去、現在、将来の人生についてのブログ

【Vagrant】Vagrant for Mac Box追加編(2019年2月23日執筆)

Docker実践ガイド 第2版 impress top gearシリーズ

Docker実践ガイド 第2版 impress top gearシリーズ

▼前回の記事はこちらです。

Vagrant for Mac インストール編(2019年2月23日執筆) - kharukaのブログ~お金と技術とキャリア~

環境情報

OS

OS バージョン 備考
macOS Mojava 10.14.2 ホストOS
Ubuntu 18.04.1LTS ゲストOS

Vagrant

Vagrant バージョン 備考
Vagrant 2.2.3

Oracle VM VirtualBox

Oracle VM VirtualBox バージョン 備考
Oracle VM VirtualBox 5.2.26

Vagrant for Mac Box追加編

Oracle VM VirtualBoxインストール

Oracle VM VirtualBoxのインストール(2018年8月18日執筆) - kharukaのブログ~お金と技術とキャリア~

Box追加

以下のサイトから追加するBoxを探します。

A list of base boxes for Vagrant - Vagrantbox.es

Available Boxes

To use the available boxes just replace {title} and {url} with the information in the table below.

$ vagrant box add {title} {url}
$ vagrant init {title}
$ vagrant up

titleは任意ですが、リンク先の表のNameを元に命名すると分かりやすいです。

titleはリンク先の表のNameでないとダメなものもありました。。。

以下のサイトからもBoxを探せます。

Discover Vagrant Boxes - Vagrant Cloud

Box追加

$ vagrant box add envimation/ubuntu-xenial-docker https://atlas.hashicorp.com/envimation/boxes/ubuntu-xenial-docker
==> box: Loading metadata for box 'https://atlas.hashicorp.com/envimation/boxes/ubuntu-xenial-docker'
==> box: Adding box 'envimation/ubuntu-xenial-docker' (v1.0.0-1516241473) for provider: virtualbox
    box: Downloading: https://vagrantcloud.com/envimation/boxes/ubuntu-xenial-docker/versions/1.0.0-1516241473/providers/virtualbox.box
    box: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
==> box: Successfully added box 'envimation/ubuntu-xenial-docker' (v1.0.0-1516241473) for 'virtualbox'!

titleを変更しなくても良い場合は、vagrant box addしなくても良いみたいですね。

こっちの方が使い勝手良かも。

$ vagrant init ubuntu/xenial64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

Boxが追加されたか確認

$ vagrant box list
chef/centos-6.5 (virtualbox, 1.0.0)
envimation/ubuntu-xenial-docker (virtualbox, 1.0.0-1516241473)

作業ディレクトリ作成

$ mkdir -p ~/Vagrant/ubuntu
$ cd ~/Vagrant/ubuntu
$ vagrant init envimation/ubuntu-xenial-docker
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

VM起動

$ vagrant up

VM起動確認

$ vagrant status
Current machine states:

default                   running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.

VM停止

$ vagrant halt
==> default: Attempting graceful shutdown of VM...

▼記事の続きは以下へ。

執筆中です。

参考

Docker実践ガイド 第2版 impress top gearシリーズ

Docker実践ガイド 第2版 impress top gearシリーズ

【Vagrant】Vagrant for Mac インストール編(2019年2月23日執筆)

Docker実践ガイド 第2版 impress top gearシリーズ

Docker実践ガイド 第2版 impress top gearシリーズ

環境情報

OS

OS バージョン 備考
macOS Mojava 10.14.2 ホストOS
Ubuntu 18.04.1LTS ゲストOS

Vagrant

Vagrant バージョン 備考
Vagrant 2.2.3

Oracle VM VirtualBox

Oracle VM VirtualBox バージョン 備考
Oracle VM VirtualBox 5.2.26

Vagrant for Mac インストール編

Vagrant for Mac ダウンロード

以下のサイトからVagrant for Macをダウンロード

Download - Vagrant by HashiCorp

f:id:kharuka2016:20190223183014p:plain

64bitをクリック

f:id:kharuka2016:20190223183018p:plain

Vagrant for Mac インストール

vagrant.pkgをダブルクリック

f:id:kharuka2016:20190223183055p:plain

続けるをクリック

f:id:kharuka2016:20190223183059p:plain

インストールをクリック

f:id:kharuka2016:20190223183103p:plain

閉じるをクリック

f:id:kharuka2016:20190223183106p:plain

Vagrantバージョン確認

$ vagrant --version
Vagrant 2.2.3

▼記事の続きは以下へ。

【Vagrant】Vagrant for Mac Box追加編(2019年2月23日執筆) - kharukaのブログ~お金と技術とキャリア~

参考

Docker実践ガイド 第2版 impress top gearシリーズ

Docker実践ガイド 第2版 impress top gearシリーズ

はじめての Ethereum Part3 ether送金編(2019年2月16日執筆)

エンジニアスクールFLOC

▼前回の記事はこちらです。

はじめての Ethereum Part2 プライベートネットワークへの接続編(2019年2月16日執筆) - kharukaのブログ~お金と技術とキャリア~

環境情報

OS

OS バージョン 備考
macOS Mojava 10.14.2 ホストOS
Oracle VM VirtualBox 5.2.26
Ubuntu 16.04.4LTS ゲストOS

環境構築

▼環境構築の仕方はこちらなどをご参考に。

はじめてのCounterpartyノード構築Part1(2018年9月29日更新) - kharukaのブログ~お金と技術とキャリア~

ether送金

> personal.unlockAccount(eth.accounts[0])
Unlock account 0x38eb7eaed9dc2e29de9826a1284572ef1f07733b
Passphrase:
true

Passphraseが正しいとtrueが返ってきます。

アカウント"0x39068ec02085a3a9a97931ac8501a890b427f6bf"から

アカウント"0x33f463c3cd0c8c1121fc6465fc73d4aa593d1b04"へ

10ether送金してみましょう。

> eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(10, "ether")})
INFO [02-14|19:08:11.807] Setting new local account                address=0x39068ec02085A3A9a97931AC8501A890b427f6bf
INFO [02-14|19:08:11.807] Submitted transaction                    fullhash=0xaa4a10c6dc5173b7065e04c9ba483031de5afbca28b422ae48c153ed6da7d86e recipient=0x33f463c3cd0C8C1121fC6465fc73d4Aa593D1b04
"0xaa4a10c6dc5173b7065e04c9ba483031de5afbca28b422ae48c153ed6da7d86e"

アカウント"0x33f463c3cd0c8c1121fc6465fc73d4aa593d1b04"へ10ether送金されたことを確認しましょう。

> web3.fromWei(eth.getBalance(eth.accounts[1]), "ether")
10

gethの使い方(ヘルプ)

geth-linux-amd64-1.8.22-7fa3509e/geth -h
NAME:
   geth - the go-ethereum command line interface

   Copyright 2013-2018 The go-ethereum Authors

USAGE:
   geth [options] command [command options] [arguments...]

VERSION:
   1.8.22-stable-7fa3509e

COMMANDS:
   account           Manage accounts
   attach            Start an interactive JavaScript environment (connect to node)
   bug               opens a window to report a bug on the geth repo
   console           Start an interactive JavaScript environment
   copydb            Create a local chain from a target chaindata folder
   dump              Dump a specific block from storage
   dumpconfig        Show configuration values
   export            Export blockchain into file
   export-preimages  Export the preimage database into an RLP stream
   import            Import a blockchain file
   import-preimages  Import the preimage database from an RLP stream
   init              Bootstrap and initialize a new genesis block
   js                Execute the specified JavaScript files
   license           Display license information
   makecache         Generate ethash verification cache (for testing)
   makedag           Generate ethash mining DAG (for testing)
   monitor           Monitor and visualize node metrics
   removedb          Remove blockchain and state databases
   version           Print version numbers
   wallet            Manage Ethereum presale wallets
   help, h           Shows a list of commands or help for one command

ETHEREUM OPTIONS:
  --config value                      TOML configuration file
  --datadir "/home/ubuntu/.ethereum"  Data directory for the databases and keystore
  --keystore                          Directory for the keystore (default = inside the datadir)
  --nousb                             Disables monitoring for and managing USB hardware wallets
  --networkid value                   Network identifier (integer, 1=Frontier, 2=Morden (disused), 3=Ropsten, 4=Rinkeby) (default: 1)
  --testnet                           Ropsten network: pre-configured proof-of-work test network
  --rinkeby                           Rinkeby network: pre-configured proof-of-authority test network
  --syncmode "fast"                   Blockchain sync mode ("fast", "full", or "light")
  --gcmode value                      Blockchain garbage collection mode ("full", "archive") (default: "full")
  --ethstats value                    Reporting URL of a ethstats service (nodename:secret@host:port)
  --identity value                    Custom node name
  --lightserv value                   Maximum percentage of time allowed for serving LES requests (0-90) (default: 0)
  --lightpeers value                  Maximum number of LES client peers (default: 100)
  --lightkdf                          Reduce key-derivation RAM & CPU usage at some expense of KDF strength
  --whitelist value                   Comma separated block number-to-hash mappings to enforce (<number>=<hash>)

DEVELOPER CHAIN OPTIONS:
  --dev               Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled
  --dev.period value  Block period to use in developer mode (0 = mine only if transaction pending) (default: 0)

ETHASH OPTIONS:
  --ethash.cachedir                       Directory to store the ethash verification caches (default = inside the datadir)
  --ethash.cachesinmem value              Number of recent ethash caches to keep in memory (16MB each) (default: 2)
  --ethash.cachesondisk value             Number of recent ethash caches to keep on disk (16MB each) (default: 3)
  --ethash.dagdir "/home/ubuntu/.ethash"  Directory to store the ethash mining DAGs (default = inside home folder)
  --ethash.dagsinmem value                Number of recent ethash mining DAGs to keep in memory (1+GB each) (default: 1)
  --ethash.dagsondisk value               Number of recent ethash mining DAGs to keep on disk (1+GB each) (default: 2)

TRANSACTION POOL OPTIONS:
  --txpool.locals value        Comma separated accounts to treat as locals (no flush, priority inclusion)
  --txpool.nolocals            Disables price exemptions for locally submitted transactions
  --txpool.journal value       Disk journal for local transaction to survive node restarts (default: "transactions.rlp")
  --txpool.rejournal value     Time interval to regenerate the local transaction journal (default: 1h0m0s)
  --txpool.pricelimit value    Minimum gas price limit to enforce for acceptance into the pool (default: 1)
  --txpool.pricebump value     Price bump percentage to replace an already existing transaction (default: 10)
  --txpool.accountslots value  Minimum number of executable transaction slots guaranteed per account (default: 16)
  --txpool.globalslots value   Maximum number of executable transaction slots for all accounts (default: 4096)
  --txpool.accountqueue value  Maximum number of non-executable transaction slots permitted per account (default: 64)
  --txpool.globalqueue value   Maximum number of non-executable transaction slots for all accounts (default: 1024)
  --txpool.lifetime value      Maximum amount of time non-executable transaction are queued (default: 3h0m0s)

PERFORMANCE TUNING OPTIONS:
  --cache value            Megabytes of memory allocated to internal caching (default: 1024)
  --cache.database value   Percentage of cache memory allowance to use for database io (default: 50)
  --cache.trie value       Percentage of cache memory allowance to use for trie caching (default: 25)
  --cache.gc value         Percentage of cache memory allowance to use for trie pruning (default: 25)
  --trie-cache-gens value  Number of trie node generations to keep in memory (default: 120)

ACCOUNT OPTIONS:
  --unlock value    Comma separated list of accounts to unlock
  --password value  Password file to use for non-interactive password input

API AND CONSOLE OPTIONS:
  --rpc                  Enable the HTTP-RPC server
  --rpcaddr value        HTTP-RPC server listening interface (default: "localhost")
  --rpcport value        HTTP-RPC server listening port (default: 8545)
  --rpcapi value         API's offered over the HTTP-RPC interface
  --ws                   Enable the WS-RPC server
  --wsaddr value         WS-RPC server listening interface (default: "localhost")
  --wsport value         WS-RPC server listening port (default: 8546)
  --wsapi value          API's offered over the WS-RPC interface
  --wsorigins value      Origins from which to accept websockets requests
  --ipcdisable           Disable the IPC-RPC server
  --ipcpath              Filename for IPC socket/pipe within the datadir (explicit paths escape it)
  --rpccorsdomain value  Comma separated list of domains from which to accept cross origin requests (browser enforced)
  --rpcvhosts value      Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard. (default: "localhost")
  --jspath loadScript    JavaScript root path for loadScript (default: ".")
  --exec value           Execute JavaScript statement
  --preload value        Comma separated list of JavaScript files to preload into the console

NETWORKING OPTIONS:
  --bootnodes value     Comma separated enode URLs for P2P discovery bootstrap (set v4+v5 instead for light servers)
  --bootnodesv4 value   Comma separated enode URLs for P2P v4 discovery bootstrap (light server, full nodes)
  --bootnodesv5 value   Comma separated enode URLs for P2P v5 discovery bootstrap (light server, light nodes)
  --port value          Network listening port (default: 30303)
  --maxpeers value      Maximum number of network peers (network disabled if set to 0) (default: 25)
  --maxpendpeers value  Maximum number of pending connection attempts (defaults used if set to 0) (default: 0)
  --nat value           NAT port mapping mechanism (any|none|upnp|pmp|extip:<IP>) (default: "any")
  --nodiscover          Disables the peer discovery mechanism (manual peer addition)
  --v5disc              Enables the experimental RLPx V5 (Topic Discovery) mechanism
  --netrestrict value   Restricts network communication to the given IP networks (CIDR masks)
  --nodekey value       P2P node key file
  --nodekeyhex value    P2P node key as hex (for testing)

MINER OPTIONS:
  --mine                         Enable mining
  --miner.threads value          Number of CPU threads to use for mining (default: 0)
  --miner.notify value           Comma separated HTTP URL list to notify of new work packages
  --miner.gasprice "1000000000"  Minimum gas price for mining a transaction
  --miner.gastarget value        Target gas floor for mined blocks (default: 8000000)
  --miner.gaslimit value         Target gas ceiling for mined blocks (default: 8000000)
  --miner.etherbase value        Public address for block mining rewards (default = first account) (default: "0")
  --miner.extradata value        Block extra data set by the miner (default = client version)
  --miner.recommit value         Time interval to recreate the block being mined (default: 3s)
  --miner.noverify               Disable remote sealing verification

GAS PRICE ORACLE OPTIONS:
  --gpoblocks value      Number of recent blocks to check for gas prices (default: 20)
  --gpopercentile value  Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60)

VIRTUAL MACHINE OPTIONS:
  --vmdebug         Record information useful for VM and contract debugging
  --vm.evm value    External EVM configuration (default = built-in interpreter)
  --vm.ewasm value  External ewasm configuration (default = built-in interpreter)

LOGGING AND DEBUGGING OPTIONS:
  --fakepow                 Disables proof-of-work verification
  --nocompaction            Disables db compaction after import
  --verbosity value         Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3)
  --vmodule value           Per-module verbosity: comma-separated list of <pattern>=<level> (e.g. eth/*=5,p2p=4)
  --backtrace value         Request a stack trace at a specific logging statement (e.g. "block.go:271")
  --debug                   Prepends log messages with call-site location (file and line number)
  --pprof                   Enable the pprof HTTP server
  --pprofaddr value         pprof HTTP server listening interface (default: "127.0.0.1")
  --pprofport value         pprof HTTP server listening port (default: 6060)
  --memprofilerate value    Turn on memory profiling with the given rate (default: 524288)
  --blockprofilerate value  Turn on block profiling with the given rate (default: 0)
  --cpuprofile value        Write CPU profile to the given file
  --trace value             Write execution trace to the given file

METRICS AND STATS OPTIONS:
  --metrics                          Enable metrics collection and reporting
  --metrics.influxdb                 Enable metrics export/push to an external InfluxDB database
  --metrics.influxdb.endpoint value  InfluxDB API endpoint to report metrics to (default: "http://localhost:8086")
  --metrics.influxdb.database value  InfluxDB database name to push reported metrics to (default: "geth")
  --metrics.influxdb.username value  Username to authorize access to the database (default: "test")
  --metrics.influxdb.password value  Password to authorize access to the database (default: "test")
  --metrics.influxdb.host.tag host   InfluxDB host tag attached to all measurements (default: "localhost")

WHISPER (EXPERIMENTAL) OPTIONS:
  --shh                       Enable Whisper
  --shh.maxmessagesize value  Max message size accepted (default: 1048576)
  --shh.pow value             Minimum POW accepted (default: 0.2)
  --shh.restrict-light        Restrict connection between two whisper light clients

DEPRECATED OPTIONS:
  --minerthreads value     Number of CPU threads to use for mining (deprecated, use --miner.threads) (default: 0)
  --targetgaslimit value   Target gas floor for mined blocks (deprecated, use --miner.gastarget) (default: 8000000)
  --gasprice "1000000000"  Minimum gas price for mining a transaction (deprecated, use --miner.gasprice)
  --etherbase value        Public address for block mining rewards (default = first account, deprecated, use --miner.etherbase) (default: "0")
  --extradata value        Block extra data set by the miner (default = client version, deprecated, use --miner.extradata)

MISC OPTIONS:
  --override.constantinople value  Manually specify constantinople fork-block, overriding the bundled setting (default: 0)
  --help, -h                       show help


COPYRIGHT:
   Copyright 2013-2018 The go-ethereum Authors

▼記事の続きは以下へ。

執筆中です。

参考

ビットコインとブロックチェーン

ビットコインとブロックチェーン

【Windows ショートカットキー】管理者権限でコマンドプロンプト(cmd)を起動する(2019年2月21日執筆)

仕事が速い人ほどマウスを使わない! 超速パソコン仕事術

仕事が速い人ほどマウスを使わない! 超速パソコン仕事術

環境情報

OS

OS バージョン 備考
Windows 10 64-bit version 1607 classic shell install

管理者権限でコマンドプロンプト(cmd)を起動する

Windowsメニューを開く

winキーを押下

検索ボックスでコマンドプロンプト(cmd)を検索する

検索ボックスでcmdとタイプ

管理者権限でコマンドプロンプト(cmd)を起動する

ctrl + shift + enterキーを同時に押下

ユーザーアカウント制御のウィンドウではいを選択

左キー<を押下 or alt + yキーを同時に押下し、"はい"でenterキー!

参考

はじめての Ripple Part1 インストール編(2019年2月19日執筆)

エンジニアスクールFLOC

仮想通貨リップル完全入門: XRPのすべてがわかる

仮想通貨リップル完全入門: XRPのすべてがわかる

Install on Ubuntu with Alien

This page describes the recommended instructions for installing the latest stable version of rippled on Ubuntu Linux 16.04 or higher, using the Alien utility to install from Ripple's yum repository.

These instructions install a binary that has been compiled by Ripple.

前提条件

Before you install rippled, you must meet the System Requirements.

Minimum Specifications

A rippled server should run comfortably on commodity hardware, to make it inexpensive to participate in the network. At present, Ripple recommends the following minimum requirements:

  • Operating System:
  • CPU: 64-bit x86_64, 2+ cores
  • Disk: Minimum 50GB for the database partition. SSD strongly recommended (minimum 1000 IOPS, more is better)
  • RAM: 8GB+

Amazon EC2's m3.large VM size may be appropriate depending on your workload. A fast network connection is preferable. Any increase in a server's client-handling load increases resources needs.

環境情報

OS

OS バージョン 備考
macOS Mojava 10.14.2 ホストOS
Oracle VM VirtualBox 5.2.26
Ubuntu 16.04.4LTS ゲストOS

環境構築

▼環境構築の仕方はこちらなどをご参考に。

はじめてのCounterpartyノード構築Part1(2018年9月29日更新) - kharukaのブログ~お金と技術とキャリア~

Installation Steps

Install yum-utils and alien:

$ sudo apt update
$ sudo apt install yum-utils alien

Install the Ripple RPM repository:

$ sudo rpm -Uvh https://mirrors.ripple.com/ripple-repo-el7.rpm

Download the rippled software package:

$ yumdownloader --enablerepo=ripple-stable --releasever=el7 rippled

Verify the signature on the rippled software package:

$ sudo rpm --import https://mirrors.ripple.com/rpm/RPM-GPG-KEY-ripple-release && rpm -K rippled*.rpm

Install the rippled software package:

$ sudo alien -i --scripts rippled*.rpm && rm rippled*.rpm

Configure the rippled service to start on system boot:

$ sudo systemctl enable rippled.service

Start the rippled service

$ sudo systemctl start rippled.service

rippled commandline

$ service rippled.service status

$ /opt/ripple/bin/rippled server_info
$ /opt/ripple/bin/rippled server_state

▼記事の続きは以下へ。

執筆中です。

参考

ビットコインとブロックチェーン

ビットコインとブロックチェーン

はじめての Ethereum Part2 プライベートネットワークへの接続編(2019年2月16日執筆)

エンジニアスクールFLOC

▼前回の記事はこちらです。

はじめての Ethereum Part1 ノード構築編(2019年2月16日執筆) - kharukaのブログ~お金と技術とキャリア~

環境情報

OS

OS バージョン 備考
macOS Mojava 10.14.2 ホストOS
Oracle VM VirtualBox 5.2.26
Ubuntu 16.04.4LTS ゲストOS

環境構築

▼環境構築の仕方はこちらなどをご参考に。

はじめてのCounterpartyノード構築Part1(2018年9月29日更新) - kharukaのブログ~お金と技術とキャリア~

プライベートネットワークへの接続

インタラクティブJavaScript環境を起動

geth-linux-amd64-1.8.22-7fa3509e/geth --networkid 5 --nodiscover --rpc --datadir /home/ubuntu/geth-linux-amd64-1.8.22-7fa3509e/private_network/ console

アカウント作成

> personal.newAccount("password1")
"0x39068ec02085a3a9a97931ac8501a890b427f6bf"
> personal.newAccount("password2")
"0x33f463c3cd0c8c1121fc6465fc73d4aa593d1b04"

"password1"と"password2"はether送金をする(Unlock accountする)ために必要なPassphraseです。

厳重に保管しましょう!

アカウント確認

> eth.accounts
["0x39068ec02085a3a9a97931ac8501a890b427f6bf", "0x33f463c3cd0c8c1121fc6465fc73d4aa593d1b04"]

残高確認

> eth.getBalance(eth.accounts[0])
0
> eth.getBalance(eth.accounts[1])
0

coinbase確認

> eth.coinbase
INFO [02-14|19:03:10.436] Etherbase automatically configured       address=0x39068ec02085A3A9a97931AC8501A890b427f6bf
"0x39068ec02085a3a9a97931ac8501a890b427f6bf"

mining開始

> miner.start()
INFO [02-14|17:20:17.507] Updated mining threads                   threads=4
INFO [02-14|17:20:17.507] Transaction pool price threshold updated price=1000000000
null
> INFO [02-14|17:20:17.508] Commit new mining work                   number=1 sealhash=a4565a…653fea uncles=0 txs=0 gas=0 fees=0 elapsed=154.143μs
INFO [02-14|17:20:18.725] Generating DAG in progress               epoch=0 percentage=0 elapsed=492.410ms
INFO [02-14|17:20:19.215] Generating DAG in progress               epoch=0 percentage=1 elapsed=982.368ms
INFO [02-14|17:20:19.709] Generating DAG in progress               epoch=0 percentage=2 elapsed=1.475s
...
INFO [02-14|17:21:08.497] Generated ethash verification cache      epoch=0 elapsed=50.264s
INFO [02-14|17:21:08.622] Successfully sealed new block            number=1 sealhash=a4565a…653fea hash=5fb689…04291b elapsed=51.114s
INFO [02-14|17:21:08.622] ? ・ined potential block                  number=1 hash=5fb689…04291b
INFO [02-14|17:21:08.623] Commit new mining work                   number=2 sealhash=a6501c…ddd26e uncles=0 txs=0 gas=0 fees=0 elapsed=140.476μs
INFO [02-14|17:21:08.779] Successfully sealed new block            number=2 sealhash=a6501c…ddd26e hash=79d3df…d28119 elapsed=156.247ms
INFO [02-14|17:21:08.779] ? ・ined potential block                  number=2 hash=79d3df…d28119
INFO [02-14|17:21:08.779] Commit new mining work                   number=3 sealhash=594ea0…1c2ef3 uncles=0 txs=0 gas=0 fees=0 elapsed=171.476μs
INFO [02-14|17:21:09.333] Successfully sealed new block            number=3 sealhash=594ea0…1c2ef3 hash=02ab0d…163ce6 elapsed=553.675ms
INFO [02-14|17:21:09.333] ? ・ined potential block                  number=3 hash=02ab0d…163ce6
INFO [02-14|17:21:09.333] Commit new mining work                   number=4 sealhash=54063b…0b3255 uncles=0 txs=0 gas=0 fees=0 elapsed=135.074μs
INFO [02-14|17:21:09.589] Successfully sealed new block            number=4 sealhash=54063b…0b3255 hash=0fb1a6…74768c elapsed=256.164ms
INFO [02-14|17:21:09.589] ? ・ined potential block                  number=4 hash=0fb1a6…74768c
INFO [02-14|17:21:09.589] Mining too far in the future             wait=2s
INFO [02-14|17:21:09.978] Generating DAG in progress               epoch=1 percentage=0  elapsed=642.498ms
INFO [02-14|17:21:10.476] Generating DAG in progress               epoch=1 percentage=1  elapsed=1.140s
INFO [02-14|17:21:10.976] Generating DAG in progress               epoch=1 percentage=2  elapsed=1.640s
...

console起動

別コンソールを立ち上げられる様に、rpcの設定をしてコンソール起動します。

ubuntu@bctest2:~$ geth-linux-amd64-1.8.22-7fa3509e/geth attach rpc:http://127.0.0.1:8545 console
Welcome to the Geth JavaScript console!

instance: Geth/v1.8.22-stable-7fa3509e/linux-amd64/go1.11.5
coinbase: 0x39068ec02085a3a9a97931ac8501a890b427f6bf
at block: 67 (Thu, 14 Feb 2019 19:04:50 JST)
 modules: eth:1.0 net:1.0 rpc:1.0 web3:1.0

>

hash rate確認

別コンソールを立ち上げて実行すると便利です。

> eth.hashrate
187830

ブロック数確認

> eth.blockNumber
2223

ether残高確認

> eth.getBalance(eth.accounts[0])
9.995e+21

これはwei(単位)残高を表示しています。

{ \displaystyle 1ether = 10^{18} wei }

です。

ether残高を表示したい場合は以下のコマンドを実行します。

> web3.fromWei(eth.getBalance(eth.accounts[0]), "ether")

10375

mining終了

miningを終了する場合は以下コマンドを実行します。

> miner.stop()
null
> eth.mining
false

eth.miningtrueであれば、まだmining中です。

次回は、ether送金をしていきます。

▼記事の続きは以下へ。

はじめての Ethereum Part3 ether送金編(2019年2月16日執筆) - kharukaのブログ~お金と技術とキャリア~

参考

ビットコインとブロックチェーン

ビットコインとブロックチェーン

フィンテックの事業構築ポイントを専門家から学べるセミナー

エンジニアスクールFLOC

ビットコインとブロックチェーン

ビットコインとブロックチェーン

フィンテックの事業構築ポイントを専門家から学べるセミナー

講師にはフィンテック領域のサービス・システム・ガバナンス設計の専門家である カウンティア株式会社 代表取締役 姥貝賢次氏を招き、 フィンテック事業構築のポイントを学ぶことができます。

講師プロフィール

姥貝賢次(うばがい けんじ)

1980年、長野県生まれ。学生時代からフリーランスプログラマーとして活躍。 早稲田大学大学院会計研究科を卒業後、公認会計士資格を取得。 2008年に監査法人トーマツに入社し、会計監査やシステム監査に従事する。 2015年にカウンティア株式会社を立ち上げ、フィンテック事業に参入。 2017年カウンティアバンク(株)をVOYAGE GROUPE(東証一部)と合弁会社で設立し、 仮想通貨事業に取り組む。

結論、フィンテック事業構築のポイントを学ぶことは、あまり出来ませんでした。

残念。

フィンテックの事業構築ポイントはどこだったのでしょうか?

私にはフィンテックの事業構築ポイントを学ぶには早すぎたのかも知れません。

精進します。

セミナー概要

資本主義の限界が叫ばれ新たな景気向上策が必要になっているなかで、 その本命としてフィンテックによる経済成長が期待されています。

近年は仮想通貨が社会的にも大きな注目を浴びる一方で、 2018年におきた大手取引所からの仮想通貨流出事故でセキュリティとガバナンスの課題も露呈し、 現在は行政主導で健全化に向かっています。 そのような背景の中、社会に受け入れられるフィンテック事業構築のポイントを、 フィンテック領域のサービス・システム・ガバナンス設計の専門家である カウンティア株式会社 代表取締役 姥貝賢次氏よりお話いただきます。

社会が求めるフィンテックのコンセプトや社会に誠実に対応するためのポイントを 公認会計士でもある講師から直接学ぶことができる貴重な機会です。 ブロックチェーン等の先進技術を活用してイノベーションを起こそうとしている方、 新しいフィンテックサービスを開発しようとしている方は必見のセミナーです。

セミナー受講対象者は、仮想通貨って何それ?うまいの??という方、若しくは金融分野で起業する方だと感じました。

講演内容

フィンテック領域において、社会に受け入れられ持続可能な事業構築のポイントを サービス設計、システム設計、ガバナンス設計の観点で聴くことができます。

資本主義の限界

FinTechによる経済成長

仮想通貨の流出事故と金融規制

社会が求めるFinTechの事例

新しいFinTech事業者の姿

日時・場所

日時:2019年2月8日(金) 19:00 – 20:20 場所:丸の内vacans(東京都千代田区丸の内3-1-1国際ビル2階 FLOCブロックチェーン大学校内) 料金:無料

<タイムテーブル> 受付開始:18:45 登壇時間:19:00-20:00 質疑応答:20:00-20:15 FLOC agentとFLOC Communityの紹介:20:15-20:20 懇親会:20:20-21:30

カウンティア株式会社の事業

仮想通貨事業としてCoinOnというサービスを提供しています。

一言で言うと、仮想通貨レンディングサービスです。

今では真新しくともなんともない、どこもやってるサービスですね。

https://coinon.cc/

資本主義の限界

お金大好きマンですね。私も好きです。笑

金融史のお話がたくさん聴けました。

お金の起源から、、、

お金の歴史にはあまり興味なかったんですけど〜。

FinTechによる経済成長

日銀を除く銀行が国債買ってお金を消費者層に流通させなかった、つまり本来の銀行業務を怠った結果が今。

日銀総裁の黒田さん万歳!笑

仮想通貨の流出事故と金融規制

やっぱりコインチェックは話題にあがりますよね。

金融庁の規制と事故の再発防止策】

・ガバナンス

・開発(バックドアを仕込んでいるかも)と運用の分業

開発を外注?システムレビュー外注?

正直、何を言っているのか分かりませんでした。笑

・マネロン対策(AML)

・KYC>>本人確認、反社データベースとユーザー照合

・疑わしい取引>>怪しい取引をスクリーニングして報告するルール。スクリーニングルールは事業者がポリシーを持って運用する必要がある。

ここら辺の話はGDPR ガイドブックを読んだ方が良いと思いました。

GDPRガイドブック

GDPRガイドブック

DPO(データ保護担当者*1について何も触れませんでした。

話が薄っぺらすぎて、ビジネスマンにとってもエンジニアにとっても。。。

GDPR ガイドブックについても連載中です。興味のある方はご一読下さい。

【サイバーセキュリティ】GDPR ガイドブック 第1章(2018年10月6日更新) - kharukaのブログ~お金と技術とキャリア~

もちろん、詳細について読まれたい方は書籍をご購入ください。

社会が求めるFinTechの事例

執筆中です。

新しいFinTech事業者の姿

執筆中です。

用語録(うばがい語録)

貨幣乗数

貨幣乗数(かへいじょうすう、英語: money multiplier)とは、マネタリーベース/ハイパワードマネー*21単位に対し、何単位のマネーサプライ*3を作り出すことができるかを示すものである。信用乗数(しんようじょうすう、英語: credit multiplier)ともいう。

お金が一般消費者にどれだけ出回っているかを示すものといった感じでしょうか?

ソーシャルエンジニアリング

ソーシャル・エンジニアリング(英語:social engineering)とは、人間の心理的な隙や、行動のミスにつけ込んで個人が持つ秘密情報を入手する方法のこと。ソーシャル・ワークとも呼称される。

いわゆるパスワードの覗き見などですね。

まさか今時、パソコンにパスワードを書いた付箋を貼っている人なんて居ませんよね?笑

ポイント

ポイントプログラム、またはポイントサービス(和製英語: point service)とは、各種の商品・役務の購入金額あるいは来店回数等に応じて、一定の条件で計算された点数(ポイント)を顧客に与えるサービス。顧客は、ポイントを次回以降の購入代金の一部に充当したり、商品と交換することができる。ポイントを付与する事業者は、このサービスをマーケティングに活用する。

ポイントは消える?

消えるも何も、もともと法定通貨の様な価値はないはず。

ポイント発行企業の経済圏でのみ通用する通貨の認識ですね。

ポイント発行企業の経済圏外では存在しない(価値のない)通貨なので消えると言う感覚が。。。

法定通貨も増減しますが、法定通貨は経済圏を循環するという意味で消えないのでしょうか?

ポイント発行企業の経済圏ではポイントも循環している気もしますが。。。

詳しくは金融マンじゃないので???

仮想通貨をバーンする

カウンターパーティーなどのことを指していたのでしょうか?

はじめてのCounterpartyノード構築Part1(2018年9月29日更新) - kharukaのブログ~お金と技術とキャリア~

デジタルマネー

デジタル通貨(デジタルつうか、英: Digital currency)もしくはデジタル貨幣(デジタルかへい)、デジタルマネー(digital money)*4電子マネー(electronic money)は、物理的通貨(紙幣や硬貨など)とは区別される。物理的通貨と類似の性質を持ちながら、国境を越えた所有権の移転が瞬時に可能である。例として、仮想通貨や暗号通貨が挙げられる[1]。伝統的な貨幣と同様、これらの通貨は物理的な財やサービスの購入に充てることができるが、オンラインゲーム内やソーシャルネットワーク内など、特定のコミュニティ内のみに利用が限られることもある[2]。

デジタル通貨はプリペイドカードその他の機器に記録された残高として実現されうる。他にも、コンピュータネットワーク、特にインターネット上でやりとりされる値として実現されるネットワーク貨幣の形をとることもある。民間銀行その他の金融機関への預金などの請求権であることもある[3]。

デジタル通貨は供給がある一箇所により集中管理される場合もあれば、様々な供給源から供給される分散型をとる場合もある

IT業界と他業界(金融業界含む)ではフィンテックの解釈が異なるのでしょうか?

デジタルマネーフィンテックではない認識です。

ブロックチェーン技術などが金融に応用されることがフィンテックという認識です。

参加者の多くもそこが引っかかっていたのでは?

フィンテック、Fintech(英: financial technology)とは、Finance(金融)とTechnology(技術)を組み合わせた造語であり、ファイナンス・テクノロジーの略。

「ICTを駆使した革新的(innovative)、あるいは破壊的(disruptive)な金融商品・サービスの潮流」などの意味で使用される[1]。既存の金融機関が持つ総合的な金融サービスのうち、顧客が必要とする一部の機能のみに特化することで、低コストでサービスを受けることが可能となる[2]。

デジタルマネーは既存の支払手段であり、新鮮味に欠けますよね。

給与振込やクレジットカード決済なども通帳の預金残高(データベース)の数字の書き換えでは?

残念ながら、今さらPayPay祭りをやっている様な日本では斬新なのかもw

仮想通貨取引所・販売所

  • bitbank

https://bitcoinbank.co.jp

https://bitflyer.com/ex/sp/home

BITPOINT

https://coincheck.com/ja/

https://bitcoin.dmm.com

フィスコ仮想通貨取引所 口座開設プロモーション

  • Liquid by Quoine

https://ja.quoinex.com

  • SBI Virtual Currencies

https://www.sbivc.co.jp

https://zaif.jp/?lang=ja

ハードウェアウォレット

  • Ledger Nano S

  • トレザー

ソフトウェアウォレット

  • Ginco

Ginco - 安心・安全の仮想通貨ウォレット

参考

ビットコインとブロックチェーン

ビットコインとブロックチェーン

*1:責任者は誤訳。

*2:マネタリーベース(英: monetary base)とは、現金の通貨と民間の金融機関が中央銀行に預けた金銭の合計のこと。中央銀行通貨(英: central bank money)ともいい[1]、市中銀行通貨(英: commercial bank money)と対になる概念で、それぞれ現金と預金に対応する。地域や分野によってはベースマネー(base money)、ハイパワードマネー(high-powered money)やそれを翻訳した強力通貨、高権貨幣とも呼ばれる。

*3:マネーサプライ(英: money supply)とは、金融機関と中央政府を除いた、国内の経済主体が保有する通貨の合計である。マネーストック(英: money stock)ともいい、これらを和訳した通貨供給量や通貨残高も使われる。

*4:電子マネー(でんしマネー、英: electronic money)あるいは電子貨幣(でんしかへい)とは、企業により提供される情報通信技術を活用した支払手段の一種である。