github.com/bytom/bytom@v1.1.2-0.20221014091027-bbcba3df6075/README.md (about) 1 Bytom 2 ====== 3 4 [![Build Status](https://travis-ci.org/Bytom/bytom.svg)](https://travis-ci.org/Bytom/bytom) [![AGPL v3](https://img.shields.io/badge/license-AGPL%20v3-brightgreen.svg)](./LICENSE) 5 6 **Official golang implementation of the Bytom protocol.** 7 8 Automated builds are available for stable releases and the unstable master branch. Binary archives are published at https://github.com/Bytom/bytom/releases. 9 10 ## What is Bytom? 11 12 Bytom is software designed to operate and connect to highly scalable blockchain networks confirming to the Bytom Blockchain Protocol, which allows partipicants to define, issue and transfer digitial assets on a multi-asset shared ledger. Please refer to the [White Paper](https://github.com/Bytom/wiki/blob/master/White-Paper/%E6%AF%94%E5%8E%9F%E9%93%BE%E6%8A%80%E6%9C%AF%E7%99%BD%E7%9A%AE%E4%B9%A6-%E8%8B%B1%E6%96%87%E7%89%88.md) for more details. 13 14 In the current state `bytom` is able to: 15 16 - Manage key, account as well as asset 17 - Send transactions, i.e., issue, spend and retire asset 18 19 ## Installing with Homebrew 20 21 ``` 22 brew tap bytom/bytom && brew install bytom 23 ``` 24 25 ## Building from source 26 27 ### Requirements 28 29 - [Go](https://golang.org/doc/install) version 1.8 or higher, with `$GOPATH` set to your preferred directory 30 31 ### Installation 32 33 Ensure Go with the supported version is installed properly: 34 35 ```bash 36 $ go version 37 $ go env GOROOT GOPATH 38 ``` 39 40 - Get the source code 41 42 ``` bash 43 $ git clone https://github.com/Bytom/bytom.git $GOPATH/src/github.com/bytom/bytom 44 ``` 45 46 - Build source code 47 48 ``` bash 49 $ cd $GOPATH/src/github.com/bytom/bytom 50 $ make bytomd # build bytomd 51 $ make bytomcli # build bytomcli 52 ``` 53 54 When successfully building the project, the `bytomd` and `bytomcli` binary should be present in `cmd/bytomd` and `cmd/bytomcli` directory, respectively. 55 56 ### Executables 57 58 The Bytom project comes with several executables found in the `cmd` directory. 59 60 | Command | Description | 61 | ------------ | ------------------------------------------------------------ | 62 | **bytomd** | bytomd command can help to initialize and launch bytom domain by custom parameters. `bytomd --help` for command line options. | 63 | **bytomcli** | Our main Bytom CLI client. It is the entry point into the Bytom network (main-, test- or private net), capable of running as a full node archive node (retaining all historical state). It can be used by other processes as a gateway into the Bytom network via JSON RPC endpoints exposed on top of HTTP, WebSocket and/or IPC transports. `bytomcli --help` and the [bytomcli Wiki page](https://github.com/Bytom/bytom/wiki/Command-Line-Options) for command line options. | 64 65 ## Running bytom 66 67 Currently, bytom is still in active development and a ton of work needs to be done, but we also provide the following content for these eager to do something with `bytom`. This section won't cover all the commands of `bytomd` and `bytomcli` at length, for more information, please the help of every command, e.g., `bytomcli help`. 68 69 ### Initialize 70 71 First of all, initialize the node: 72 73 ```bash 74 $ cd ./cmd/bytomd 75 $ ./bytomd init --chain_id mainnet 76 ``` 77 78 There are three options for the flag `--chain_id`: 79 80 - `mainnet`: connect to the mainnet. 81 - `testnet`: connect to the testnet wisdom. 82 - `solonet`: standalone mode. 83 84 After that, you'll see `config.toml` generated, then launch the node. 85 86 ### launch 87 88 ``` bash 89 $ ./bytomd node 90 ``` 91 92 available flags for `bytomd node`: 93 94 ``` 95 Flags: 96 --auth.disable Disable rpc access authenticate 97 --chain_id string Select network type 98 -h, --help help for node 99 --log_file string Log output file (default "log") 100 --log_level string Select log level(debug, info, warn, error or fatal) 101 --p2p.dial_timeout int Set dial timeout (default 3) 102 --p2p.handshake_timeout int Set handshake timeout (default 30) 103 --p2p.keep_dial string Peers addresses try keeping connecting to, separated by ',' (for example "1.1.1.1:46657;2.2.2.2:46658") 104 --p2p.laddr string Node listen address. (0.0.0.0:0 means any interface, any port) (default "tcp://0.0.0.0:46656") 105 --p2p.lan_discoverable Whether the node can be discovered by nodes in the LAN (default true) 106 --p2p.max_num_peers int Set max num peers (default 50) 107 --p2p.node_key string Node key for p2p communication 108 --p2p.proxy_address string Connect via SOCKS5 proxy (eg. 127.0.0.1:1086) 109 --p2p.proxy_password string Password for proxy server 110 --p2p.proxy_username string Username for proxy server 111 --p2p.seeds string Comma delimited host:port seed nodes 112 --p2p.skip_upnp Skip UPNP configuration 113 --prof_laddr string Use http to profile bytomd programs 114 --vault_mode Run in the offline enviroment 115 --wallet.disable Disable wallet 116 --wallet.rescan Rescan wallet 117 --wallet.txindex Save global tx index 118 --web.closed Lanch web browser or not 119 --ws.max_num_concurrent_reqs int Max number of concurrent websocket requests that may be processed concurrently (default 20) 120 --ws.max_num_websockets int Max number of websocket connections (default 25) 121 122 Global Flags: 123 --home string root directory for config and data 124 -r, --root string DEPRECATED. Use --home (default "/Users/zcc/Library/Application Support/Bytom") 125 --trace print out full stack trace on errors 126 ``` 127 128 Given the `bytomd` node is running, the general workflow is as follows: 129 130 - create key, then you can create account and asset. 131 - send transaction, i.e., build, sign and submit transaction. 132 - query all kinds of information, let's say, avaliable key, account, key, balances, transactions, etc. 133 134 ### Dashboard 135 136 Access the dashboard: 137 138 ``` 139 $ open http://localhost:9888/ 140 ``` 141 142 ### In Docker 143 144 Ensure your [Docker](https://www.docker.com/) version is 17.05 or higher. 145 146 ```bash 147 $ docker build -t bytom . 148 ``` 149 150 For the usage please refer to [running-in-docker-wiki](https://github.com/Bytom/bytom/wiki/Running-in-Docker). 151 152 ## Contributing 153 154 Thank you for considering helping out with the source code! Any contributions are highly appreciated, and we are grateful for even the smallest of fixes! 155 156 If you run into an issue, feel free to [bytom issues](https://github.com/Bytom/bytom/issues/) in this repository. We are glad to help! 157 158 ## License 159 160 [AGPL v3](./LICENSE)