一、下载

https://github.com/FISCO-BCOS/web3sdk

git clone https://github.com/FISCO-BCOS/web3sdk.git

二、构建

cd web3sdk
./gradlew build

三、拷贝节点证书到dist/conf/

# 拷贝证书(设SDK证书位于~/fisco/nodes/127.0.0.1/sdk目录)
$ cp -r ~/fisco/nodes/127.0.0.1/sdk/* conf

四、新增和修改配置文件applicationContext.xml

<?xml version="1.0" encoding="UTF-8" ?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.5.xsd"><bean id="encryptType"class="org.fisco.bcos.web3j.crypto.EncryptType"><constructor-arg value="0" /> <!-- 0:standard 1:guomi --></bean><bean id="groupChannelConnectionsConfig"class="org.fisco.bcos.channel.handler.GroupChannelConnectionsConfig"><!-- SSL certificate configuration --><property name="caCert" value="ca.crt" /><property name="sslCert" value="sdk.crt" /><property name="sslKey" value="sdk.key" /><!-- GM SSL certificate configuration --><property name="gmCaCert" value="gmca.crt" /><property name="gmEnSslCert" value="gmensdk.crt" /><property name="gmEnSslKey" value="gmensdk.key" /><property name="gmSslCert" value="gmsdk.crt" /><property name="gmSslKey" value="gmsdk.key" /><property name="allChannelConnections"><list><bean id="group1"class="org.fisco.bcos.channel.handler.ChannelConnections"><property name="groupId" value="1" /><property name="connectionsStr"><list><value>192.168.64.129:20200</value><value>192.168.64.130:20200</value><value>192.168.64.131:20200</value><value>192.168.64.132:20200</value></list></property></bean><bean id="group2"class="org.fisco.bcos.channel.handler.ChannelConnections"><property name="groupId" value="2" /><property name="connectionsStr"><list><value>127.0.0.1:20202</value><value>127.0.0.1:20203</value></list></property></bean></list></property></bean><bean id="channelService"class="org.fisco.bcos.channel.client.Service"depends-on="groupChannelConnectionsConfig"><property name="groupId" value="1" /><property name="agencyName" value="agencyA" /><property name="allChannelConnections"ref="groupChannelConnectionsConfig"></property><!-- If you want to enable topic authentication, please uncomment the following configuration. --><!-- <property name="topic2KeyInfo" ref="amopVerifyTopicToKeyInfo"></property>--></bean><!-- If you want to enable topic authentication, please uncomment the following configuration. --><!--<bean class="org.fisco.bcos.channel.handler.AMOPVerifyTopicToKeyInfo" id="amopVerifyTopicToKeyInfo"><property name="topicToKeyInfo"><map><entry key="helloworld00000001" value-ref="AMOPVerifyKeyInfo_helloworld00000001" /></map></property></bean>--><!-- If you are a topic producer, you need to configure the publicKey property.Each authenticated consumer holds a different public-private key pair.Please list the public key files of all the authenticated consumers.--><!--<bean class="org.fisco.bcos.channel.handler.AMOPVerifyKeyInfo" id="AMOPVerifyKeyInfo_helloworld00000001"><property name="publicKey"><list><value>classpath:$consumer_public_key_1.pem$</value><value>classpath:$consumer_public_key_2.pem$</value></list></property></bean>--><!-- If you are a topic consumer, you need to configure the privateKey property.This private key will authenticate you to the corresponding topic producer.--><!--<bean class="org.fisco.bcos.channel.handler.AMOPVerifyKeyInfo" id="AMOPVerifyKeyInfo_helloworld00000001"><property name="privateKey" value="classpath:$consumer_private_key.pem$"></property></bean>-->
</beans>

五、在dist文件下运行程序

java -cp conf/:lib/*:apps/* org.fisco.bcos.channel.test.parallel.parallelok.PerformanceDT 1 transfer 100000 4000 user 2

https://github.com/FISCO-BCOS/java-sdk-demo/blob/main/docs/README_CN.md

https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/tutorial/stress_testing.html

web3sdk 怎么配置连接区块链节点相关推荐

  1. 以太坊区块链同步_以太坊69:如何在10分钟内建立完全同步的区块链节点

    以太坊区块链同步 by Lukas Lukac 卢卡斯·卢卡奇(Lukas Lukac) Ethereu M 69:如何在10分钟内建立完全同步的区块链节点 (Ethereum 69: how to ...

  2. httos双向认证配置_Fabric区块链如何启用双向TLS?

    Hyperleder Fabric区块链支持在通信节点之间启用TLS传输层安全通信,TLS支持单向验证 - 仅验证服务节点身份,或双向验证 - 同时验证服务节点和客户端节点的身份.本文将介绍如何在Hy ...

  3. 计算机领域区块链是什么是意思,区块链节点什么意思?一文看懂区块链节点

    区块链节点什么意思? 在区块链中我们经常会听到节点这个字眼,首先我们来说说节点指的是区块链网络中的计算机,包含手机,矿机和服务器等等.由大量个人或者家庭用户参与的区块链,每个个人或者家庭都是区块链的节 ...

  4. Chainlink: 连接区块链生态的 Web3 服务平台

    Chainlink 作为关键型基础设施,一直以来支撑 Web3 生态系统,该基础设施在 DeFi.保险.游戏.NFT 和其他关键垂直领域支持.保护和连接跨诸多创新应用程序. Data Feeds 是 ...

  5. 在一台电脑上用不同端口同步以太坊区块链节点

    首先要获取第一个节点的信息,在第一个节点的控制台中输入: > admin.nodeInfo.enode 将输出的结果用鼠标操作复制, 然后在第二个节点的JS控制台中添加第一个节点为静态节点,输入 ...

  6. FISCO BCOS 查看当前区块链节点的ID

    方法一 进入控制台 通过getSyncStatus命令查看 方法二 如果没有控制台,可以使用下列命令查看 cat 192.168.64.129/node0/conf.nodeid

  7. 【教程】区块链是数据库?那么区块链的数据存储在哪里?如何查看数据?FISCO-BCOS如何更换区块链的数据存储,由RocksDB更换为MySQL、MariaDB,联盟链区块链数据库,区块链数据库应用

    目录 前言 安装与配置MySQL或MariaDB 安装MySQL 启动MySQL 配置MySQL 启动FISCO-BCOS区块链节点并配置 下载依赖 ​编辑 创建目录并下载脚本 创建FISCO-BCO ...

  8. 可验证分发网络:区块链扩容终极解决方案

    由于区块链的去中心化特性(即没有一个实体控制其运行),越来越多的人们期待,或者至少是希望,区块链在更多领域发挥其颠覆性潜力.然而,去中心化是有代价的:区块链无法扩展(scale),即无法及时处理大量甚 ...

  9. 区块链 fisco bcos 2.72 在多机器上部署多个docker节点 ubuntu

    一.安装 1. 安装依赖 安装curl.openssl: sudo apt-get update sudo apt install -y curl openssl 2. 安装docker: (1)安装 ...

  10. Go语言实现区块链与加密货币-Part3(交易优化,单机模拟多节点通信)

    交易(二) 在这个系列文章的一开始,我们就提到了,区块链是一个分布式数据库.不过在之前的文章中,我们选择性地跳过了"分布式"这个部分,而是将注意力都放到了"数据库&quo ...

最新文章

  1. 二极管参数中英文对照表
  2. Polly-故障处理和弹性应对很有一手
  3. 我们该如何学习机器学习中的数学
  4. 一次查找sqlserver死锁的经历
  5. Linux系统Zookeeper集群配置
  6. java 修改win7系统时间_win7如何禁止更改系统时间
  7. linux java运行class文件_jvm学习java文件运行过程
  8. 国美金融贷款Kube-apiserver源码分析(国美金融贷款)
  9. 三维GIS显示中,利用太阳高度角和方位角计算光照
  10. 服务器ghost备份后无法进入系统还原,一键Ghost备份还原解决方法
  11. 母亲的牛奶 Mother's Milk(usaco)
  12. 桌面便签软件哪个比较好 好用的手机桌面便签软件推荐
  13. 为什么IM不适合直接运行在公链上?
  14. html5源码笔记(四)【爱创课堂专业前端培训】
  15. JWT手动签发| 自动签发
  16. 归并排序算法分析与实现
  17. 手机短信转发到另一个手机接收_怎么把手机号码导入另一个手机中(新手机是华为的,旧手机是三星的)...
  18. 需求DNA检测:如何判断一个功能是否值得做
  19. H3C EPON技术白皮书
  20. 从中国500年前文人的角度重识只狼(sekiro)的场景设计

热门文章

  1. WIN7下IIS的安装与配置
  2. Ubuntu12.04中如何让命令行路径变短
  3. 上周热点回顾(4.30-5.6)
  4. 机器学习实战 - 读书笔记(05) - Logistic回归
  5. JS 学习笔记--10---基本包装类型
  6. android圆角柱状图,MPAndroidChart 圆角柱状图-Go语言中文社区
  7. python从入门到实践课后答案-Python编程:从入门到实践(课后习题8)
  8. 拓端tecdat|R语言分布滞后非线性模型(DLNM)研究发病率,死亡率和空气污染示例
  9. 拓端tecdat|stata马尔可夫Markov区制转移模型分析基金利率
  10. (1)Matplotlib_xticks, yticks