การใช้งาน Golang อย่างเป็นทางการของโปรโตคอล BYTOM
งานสร้างอัตโนมัติมีให้สำหรับรุ่นที่มีเสถียรภาพและสาขาหลักที่ไม่เสถียร คลังเก็บไบนารีเผยแพร่ที่ https://github.com/bytom/bytom/releases
BYTOM เป็นซอฟต์แวร์ที่ออกแบบมาเพื่อใช้งานและเชื่อมต่อกับเครือข่าย blockchain ที่ปรับขนาดได้สูงเพื่อยืนยันโปรโตคอล Bytom Blockchain ซึ่งช่วยให้ partipicants สามารถกำหนดปัญหาและโอนสินทรัพย์ดิจิทัลบนบัญชีแยกประเภทที่ใช้ร่วมกันหลาย โปรดดูกระดาษสีขาวสำหรับรายละเอียดเพิ่มเติม
ในสถานะปัจจุบัน bytom
สามารถ:
brew tap bytom/bytom && brew install bytom
$GOPATH
ตั้งค่าเป็นไดเรกทอรีที่คุณต้องการตรวจสอบให้แน่ใจว่ามีการติดตั้งเวอร์ชันที่รองรับอย่างถูกต้อง:
$ go version
$ go env GOROOT GOPATH
$ git clone https://github.com/Bytom/bytom.git $GOPATH /src/github.com/bytom/bytom
$ cd $GOPATH /src/github.com/bytom/bytom
$ make bytomd # build bytomd
$ make bytomcli # build bytomcli
เมื่อประสบความสำเร็จในการสร้างโครงการ bytomd
และ bytomcli
ควรอยู่ในไดเรกทอรี cmd/bytomd
และ cmd/bytomcli
ตามลำดับ
โครงการ BYTOM มาพร้อมกับปฏิบัติการหลายอย่างที่พบในไดเรกทอรี cmd
สั่งการ | คำอธิบาย |
---|---|
ไบต์ | คำสั่ง BYTOMD สามารถช่วยเริ่มต้นและเปิดตัวโดเมน BYTOM โดยพารามิเตอร์ที่กำหนดเอง bytomd --help สำหรับตัวเลือกบรรทัดคำสั่ง |
Bytomcli | ไคลเอนต์ CLI หลักของเรา มันเป็นจุดเริ่มต้นในเครือข่ายไบต์ (หลัก-, ทดสอบ- หรือส่วนตัว), สามารถทำงานเป็นโหนดคลังเก็บโหนดเต็มรูปแบบ (รักษาสถานะทางประวัติศาสตร์ทั้งหมด) กระบวนการอื่น ๆ สามารถใช้เป็นเกตเวย์ในเครือข่ายไบต์ผ่านจุดสิ้นสุด JSON RPC ที่เปิดอยู่ด้านบนของการขนส่ง HTTP, WebSocket และ/หรือ IPC bytomcli --help และหน้า bytomcli wiki สำหรับตัวเลือกบรรทัดคำสั่ง |
ปัจจุบันไบต์ยังคงอยู่ในระหว่างการพัฒนาที่ใช้งานอยู่และต้องทำงานมากมาย แต่เรายังให้เนื้อหาต่อไปนี้สำหรับความกระตือรือร้นที่จะทำอะไรบางอย่างกับ bytom
ส่วนนี้จะไม่ครอบคลุมคำสั่งทั้งหมดของ bytomd
และ bytomcli
ที่ความยาวสำหรับข้อมูลเพิ่มเติมโปรดความช่วยเหลือของทุกคำสั่งเช่น bytomcli help
ก่อนอื่นให้เริ่มต้นโหนด:
$ cd ./cmd/bytomd
$ ./bytomd init --chain_id mainnet
มีสามตัวเลือกสำหรับการตั้งค่าสถานะ --chain_id
:
mainnet
: เชื่อมต่อกับ MainNettestnet
: เชื่อมต่อกับ Testnet Wisdomsolonet
: โหมดสแตนด์อโลน หลังจากนั้นคุณจะเห็น config.toml
สร้างขึ้นจากนั้นเปิดโหนด
$ ./bytomd node
ธงที่มีอยู่สำหรับ bytomd node
:
Flags:
--auth.disable Disable rpc access authenticate
--chain_id string Select network type
-h, --help help for node
--log_file string Log output file (default "log")
--log_level string Select log level(debug, info, warn, error or fatal)
--p2p.dial_timeout int Set dial timeout (default 3)
--p2p.handshake_timeout int Set handshake timeout (default 30)
--p2p.keep_dial string Peers addresses try keeping connecting to, separated by ',' (for example "1.1.1.1:46657;2.2.2.2:46658")
--p2p.laddr string Node listen address. (0.0.0.0:0 means any interface, any port) (default "tcp://0.0.0.0:46656")
--p2p.lan_discoverable Whether the node can be discovered by nodes in the LAN (default true)
--p2p.max_num_peers int Set max num peers (default 50)
--p2p.node_key string Node key for p2p communication
--p2p.proxy_address string Connect via SOCKS5 proxy (eg. 127.0.0.1:1086)
--p2p.proxy_password string Password for proxy server
--p2p.proxy_username string Username for proxy server
--p2p.seeds string Comma delimited host:port seed nodes
--p2p.skip_upnp Skip UPNP configuration
--prof_laddr string Use http to profile bytomd programs
--vault_mode Run in the offline enviroment
--wallet.disable Disable wallet
--wallet.rescan Rescan wallet
--wallet.txindex Save global tx index
--web.closed Lanch web browser or not
--ws.max_num_concurrent_reqs int Max number of concurrent websocket requests that may be processed concurrently (default 20)
--ws.max_num_websockets int Max number of websocket connections (default 25)
Global Flags:
--home string root directory for config and data
-r, --root string DEPRECATED. Use --home (default "/Users/zcc/Library/Application Support/Bytom")
--trace print out full stack trace on errors
เมื่อพิจารณาจากโหนด bytomd
แล้วเวิร์กโฟลว์ทั่วไปมีดังนี้:
เข้าถึงแดชบอร์ด:
$ open http://localhost:9888/
ตรวจสอบให้แน่ใจว่าเวอร์ชันนักเทียบท่าของคุณคือ 17.05 หรือสูงกว่า
$ docker build -t bytom .
สำหรับการใช้งานโปรดดูที่ Running-in-docker-Wiki
ขอบคุณที่พิจารณาช่วยเหลือซอร์สโค้ด! การมีส่วนร่วมใด ๆ ที่ได้รับการชื่นชมอย่างมากและเราขอขอบคุณสำหรับการแก้ไขที่เล็กที่สุด!
หากคุณพบปัญหาให้คุณสามารถแก้ไขปัญหา BYTOM ในที่เก็บนี้ได้ เราดีใจที่ได้ช่วย!
AGPL v3