Solidity microservice architecture benchmarking – Solidity微服务体系结构基准测试区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Solidity microservice architecture benchmarking – Solidity微服务体系结构基准测试区块链毕设代写 是一篇很好的国外资料

Solidity microservice architecture benchmarking

Introduction

The goal of this Javascript program is to convert a representation of a BPMN diagram to a microservice architecture made of smart-contracts, then benchmarking the execution of the BPMN from start to end.

For now, the benchmark executes every step of the BPMN but the goal is to benchmark random paths.

Note: this tool does not take care of node security and therefore should not be used in production. This is an experiment-only tool.

Requirements

  • truffle (currently used here: 5.0.42)
  • node.js (currently used here: 10.16.3)
  • npm (currently used here: 6.12.0)
  • solidity compiler (installed version should be 0.5.0 or higher)
  • web3 (currently used here: 1.2.2)

How to setup the project before running the benchmark

If you’re using Vagrant, you can boot your nodes with the Vagrantfile located in the vagrant folder (note that you can choose the number of nodes by changing the NODE_COUNT variable inside the Vagrantfile), and execute the script called generate_config.js (which takes as an argument the number of nodes desired, put the same number of nodes as chose in the Vagrantfile) to generate the file containing login information of the nodes and the truffle-config.js:

cd vagrant vagrant up node generate_config.js {nbNodes} 

In this case, skip the first two steps below.

  1. First, you need to provide the username, the password, and the IP of every node which will be used. To do that, create a file named ip_list.json in the main directory, made of login information:
    [         {             "ip":"10.0.0.11",             "user":"vagrant",             "password":"vagrant"         },{             "ip":"10.0.0.12",             "user":"vagrant",             "password":"vagrant"         },{             ...         }     ] 

If you’re login with SSH instead of password, please don’t put a password key/value inside this file, but instead, modify the global variable named SSH_KEY located inside prepare_servers.js. This variable represents the path of your SSH private key.

  1. Create a file called truffle-config.js containing information about the blockchain. It will be used by Truffle to login later. For the host field, put the IP of your first node declared in the ip_list.json file:
module.exports = {     "networks":{         "infra":{             "host":"10.0.0.11",             "port":8545,             "network_id":61997,             "gasLimit":"0x346DC5D638865",             "gasPrice":"0x0"         }     },     "compilers":{         "solc":{             "version":"0.5.0"         }     } } 
  1. Finally, install required packages by typing:
npm install 

How to launch the benchmark

Just execute the run.sh script:

./run.sh 

Results will be stored inside the results directory.

We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products. Learn more.


Solidity微服务体系结构基准测试

简介

这个Javascript程序的目标是将BPMN图的表示转换为由智能合约组成的微服务架构,然后从开始到结束对BPMN的执行进行基准测试。

目前,基准测试执行BPMN的每个步骤,但目标是对随机路径进行基准测试。

注意:此工具不考虑节点安全性,因此不应在生产中使用。这是一个实验专用工具。

要求

  • truffle<0.li>目前使用节点.js(目前在这里使用:10.16.3)
  • npm(目前在这里使用:6.12.0)
  • solidity编译器(安装的版本应该是0.5.0或更高版本)
  • web3(目前在这里使用:1.2.2)
  • 首先,您需要提供用户名、密码,以及将要使用的每个节点的IP。为此,创建一个名为ip的文件_列表.json在主目录中,生成登录信息:

如何启动基准

如果使用的是Vagrant,可以使用Vagrant文件夹中的Vagrant文件引导节点(注意,可以通过更改Vagrant文件中的NODE_COUNT变量来选择节点数),然后执行名为generate的脚本_配置文件(以所需节点数作为参数,放入与在Vagrantfile中选择的相同数量的节点)以生成包含节点和truffle的登录信息的文件-配置文件:在这种情况下,跳过下面的前两个步骤。

cd vagrant vagrant up node generate_config.js {nbNodes} 

如果使用SSH而不是密码登录,请不要在该文件中放入密码密钥/值,而是修改prepare中名为SSH_key的全局变量_服务器.js. 此变量表示SSH私钥的路径。

  1. 创建一个名为truffle的文件-配置文件包含关于区块链blockchain的信息。它将被Truffle用于以后的登录。对于“主机”字段,输入在IP中声明的第一个节点的IP_列表.json文件:
    [         {             "ip":"10.0.0.11",             "user":"vagrant",             "password":"vagrant"         },{             "ip":"10.0.0.12",             "user":"vagrant",             "password":"vagrant"         },{             ...         }     ] 

只需执行运行.sh脚本:

  1. 最后,键入以下命令安装所需的软件包:
module.exports = {     "networks":{         "infra":{             "host":"10.0.0.11",             "port":8545,             "network_id":61997,             "gasLimit":"0x346DC5D638865",             "gasPrice":"0x0"         }     },     "compilers":{         "solc":{             "version":"0.5.0"         }     } } 
  1. Finally, install required packages by typing:
npm install 

基本cookies

结果将存储在结果目录中。

./run.sh 

我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。了解更多。

我们使用可选的第三方分析cookies来了解您如何使用GitHub.com网站所以我们可以制造更好的产品。
您可以随时通过单击页面底部的Cookie首选项来更新您的选择。有关更多信息,请参阅我们的隐私声明。

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/17899.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 !
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Solidity microservice architecture benchmarking – Solidity微服务体系结构基准测试区块链毕设代写

提供最优质的资源集合

立即查看 了解详情