当前位置: 首页 > 软件库 > Web3 > 区块链 >

legion

Simple blockchain server written in haskell
授权协议 MIT License
开发语言
所属分类 Web3、 区块链
软件类型 开源软件
地区 不详
投 递 者 缪风史
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Legion - a simple blockchain implementation

An as-simple-as-possible blockchain server inspired by naivechain, but written in Haskell. Spinning up severalLegion nodes creates a peer to peer network that syncronizes the block chain across the network.

Prereqs: To compile from source, you'll need stack.

Alternatively, you can get a precompiled pre-release binary. Note: if you download the binaryfrom github, you'll need to mark it executable by running:

$ chmod +x legion-exe

Usage:

$ stack exec legion-exe [http port] [p2p port] [optional: `seedhost:seedP2PPort`]

Examples:

$ stack exec legion-exe 8001 9001

By default, legion will log what it's doing to standard out. In another terminal window:

$ stack exec legion-exe 8002 9002 localhost:9001

Alternatively, you grab the binaries from the github releases, and run that directly rather than via stack exec

The 3rd argument tells the node where a seed node can be found to bootstrap the connection to thepeer to peer network. The current state of the (valid) blockchain will be fetched from all servers, and it will automaticallykeep itself updated and post its own updated to others.

Now that 2 nodes are now synced, and you can view the current chain from either node at http://localhost:$httpPort/chain, eg http://localhost:8001/chain

Add a new block to the blockchain via a POST request to /block:

$ curl -H "Content-Type: application/json" -X POST -d '{"blockBody": "this is the data for the next block"}' http://localhost:8001/block
  • 问题描述 联想Lenovo Legion Y9000X 2020 外接扩展屏不显示画面 (一开始我以为是扩展坞出问题了,后来买了新的还是不显示,之后百度找各种方法尝试,给联想客服人员打电话询问,又试了一些方法,客服说这是最后一种办法(下面这种),终于成功了) 解决方案: 1、将笔记本所有外接设备拔掉(并断开电源) 2、电脑关机 3、关机后长按电源键20秒后松开 (关键操作) 4、电脑正常开机 5、