最强大脑(量化交易)合约版系统开发源码(搭建部署)
什么是量化交易?确切地说,量化交易属于人工智能的一个应用分支,它利用计算机的强大运算能力,用数学模型来模仿人的思维作出决策,通过数据建模、统计学分析、程序设计等工具
Compared with traditional contracts,smart contracts have three characteristics:
1.The contract content is open and transparent
The smart contract is deployed on the blockchain,and its contract content is naturally open and transparent.
2.The contents of the contract cannot be tampered with
Similarly,the content of the smart contract cannot be modified because it is deployed on the blockchain.
3.Permanent operation
向 fabric 网络中添加新节点是常见的业务需求,基本上需要以下几个步骤:
生成新节点证书
添加新节点配置信息并启动
新节点加入通道
安装链码
以 fabric-sample 库中 v1.3 版本的 byfn.sh 建立的简单测试网为例进行操作。这个测试网络中包含两个组织,每个组织都有两个节点:
org1:
peer0.org1.example.com
peer1.org1.example.com
org2:
peer0.org2.example.com
peer1.org2.example.com
我们需要在 org2 中添加一个 peer2.org2.example.com 节点。
1. 生成新节点证书
每个节点都有相应的证书才能连接网络,需要使用 cryptogen 工具生成新节点的证书。因为是新节点加入现有网络组织,因此,需要使用 cryptogen extend 命令首先对现有网络的证书文件进行扩展。在执行该命令之前需要首先修改 crypto-config.yaml 配置文件,将 org2 组织的节点数增加 1,其它的配置信息不要修改。
点击查看修改后的 crypto-config.yaml 配置文件
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# ---------------------------------------------------------------------------
# "OrdererOrgs" - Definition of organizations managing orderer nodes
# ---------------------------------------------------------------------------
OrdererOrgs:
# ---------------------------------------------------------------------------
# Orderer
# ---------------------------------------------------------------------------
- Name: Orderer
Domain: example.com
# ---------------------------------------------------------------------------
# "Specs" - See PeerOrgs below for complete description
# ---------------------------------------------------------------------------
Specs:
- Hostname: orderer
# ---------------------------------------------------------------------------
# "PeerOrgs" - Definition of organizations managing peer nodes
# ---------------------------------------------------------------------------
PeerOrgs:
# ---------------------------------------------------------------------------
# Org1
# ---------------------------------------------------------------------------
- Name: Org1
Domain: org1.example.com
EnableNodeOUs: true
# ---------------------------------------------------------------------------
# "Specs"
# ---------------------------------------------------------------------------
# Uncomment this section to enable the explicit definition of hosts in your
# configuration. Most users will want to use Template, below
#
# Specs is an array of Spec entries. Each Spec entry consists of two fields:
# - Hostname: (Required) The desired hostname, sans the domain.
# - CommonName: (Optional) Specifies the template or explicit override for
# the CN. By default, this is the template:
#
# "{{.Hostname}}.{{.Domain}}"
#
# which obtains its values from the Spec.Hostname and
# Org.Domain, respectively.
# ---------------------------------------------------------------------------
# Specs:
# - Hostname: foo # implicitly "foo.org1.example.com"
# CommonName: foo27.org5.example.com # overrides Hostname-based FQDN set above
# - Hostname: bar
# - Hostname: baz
# ---------------------------------------------------------------------------
# "Template"
# ---------------------------------------------------------------------------
# Allows for the definition of 1 or more hosts that are created sequentially
# from a template. By default, this looks like "peer%d" from 0 to Count-1.
# You may override the number of nodes (Count), the starting index (Start)
# or the template used to construct the name (Hostname).
#
# Note: Template and Specs are not mutually exclusive. You may define both
# sections and the aggregate nodes will be created for you. Take care with
# name collisions
# ---------------------------------------------------------------------------
Template:
Count: 2
# Start: 5
# Hostname: {{.Prefix}}{{.Index}} # default
# ---------------------------------------------------------------------------
# "Users"
# ---------------------------------------------------------------------------
# Count: The number of user accounts _in addition_ to Admin
# ---------------------------------------------------------------------------
Users:
Count: 1
# ---------------------------------------------------------------------------
# Org2: See "Org1" for full specification
# ---------------------------------------------------------------------------
- Name: Org2
Domain: org2.example.com
EnableNodeOUs: true
Template:
Count: 3 # count 表示组织下的peer数量,这里需要把 2 改为 3
Users:
Count: 1
相关文章
- react hook 源码完全解读
- Spark3.12+Kyuubi1.5.2+kyuubi-spark-authz源码编译打包+部署配置HA
- vue源码实现的整体流程解析「建议收藏」
- 源码推荐:一款flutter实现的闹钟
- 羊了个羊APP/H5网页/小程序游戏系统开发搭建教程及部署源码
- React源码学习入门(三)React源码codebase架构和调试介绍
- 【说站】校园跑腿综合服务网平台小程序源码+部署搭建教程
- dubbo源码学习之SPI(二)
- 跨境电商ERP店群管理系统源码支持二开,企业数据私有化部署
- 多语言在线客服系统源码-自动识别中英环境-私有化部署完美支持跨境电商网站
- 三行代码完成模型部署,支持云边端几十款AI硬件部署,覆盖CV、NLP、Speech(附源码)
- 浅谈佛萨奇2.0波场链/币安链/马蹄链智能合约系统开发技术详细及源码部署
- mac 上学习k8s系列(49)源码部署dm同步mysql数据到tidb
- 用Python写了一个合同帐务系统(附源码)
- 【Android 进程保活】应用进程拉活 ( 账户同步拉活 | 账号服务注册 | 源码资源 )
- SkeyeRTSPLive高效转码之SkeyeVideoDecoder采用Nvidia独立显卡高效硬件解码解决方案(附源码)(2)
- Spring里的aop实现方式和源码分析详解编程语言
- Linux游戏源码的优势探究(linux游戏源码)
- PHP中实现汉字转区位码应用源码实例解析