Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FISCO BCOS plugin #20

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions fisco-bcos/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# binary_name
BINARY_NAME=fisco-bcos.so

## build: build the binary with pre-packed static resource
build:
@export GO111MODULE=on
@export GOPROXY=https://goproxy.cn,direct
@go mod download
@go build -buildmode=plugin -trimpath -o $(BINARY_NAME)
286 changes: 286 additions & 0 deletions fisco-bcos/Store.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN PRIVATE KEY-----
MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgv1isUJCEPfayQH2Lkfi4
lDSAWxhiZ1PoHQwsOsPfyZihRANCAATFDOM7LZS5yLTQuH05xi+SPsRrFQe7EKm9
H1Jr3K4KBKheh2rFLaudqrPQkIw95pusV4Vi/cH0buZkH5ZBTtlF
-----END PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAExQzjOy2Uuci00Lh9OcYvkj7EaxUHuxCp
vR9Sa9yuCgSoXodqxS2rnaqz0JCMPeabrFeFYv3B9G7mZB+WQU7ZRQ==
-----END PUBLIC KEY-----
10 changes: 10 additions & 0 deletions fisco-bcos/ca.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-----BEGIN CERTIFICATE-----
MIIBYzCCAQoCFF71ZaJrwFIUgmrMf1zo7oetmO2+MAoGCCqGSM49BAMCMDUxDjAM
BgNVBAMMBWNoYWluMRMwEQYDVQQKDApmaXNjby1iY29zMQ4wDAYDVQQLDAVjaGFp
bjAgFw0yMzAxMDIwNjIzNThaGA8yMTIyMTIwOTA2MjM1OFowNTEOMAwGA1UEAwwF
Y2hhaW4xEzARBgNVBAoMCmZpc2NvLWJjb3MxDjAMBgNVBAsMBWNoYWluMFYwEAYH
KoZIzj0CAQYFK4EEAAoDQgAEe6K5yM4k9NofHZp4MMrcZj0v27UY40R51z1gap9b
tExiXJ7XkAwalkLQCd6hcQ5B8ztzHGnND9CCI4aRzuWU1zAKBggqhkjOPQQDAgNH
ADBEAiAVAc/FMgJ1NAQvez9ZsZm/qQ9UwWKEzq4aLpiCpk066wIgJXHPnGKJYUV9
HUHdOwp/2ReebkwEpQnvDmGBbibOlvk=
-----END CERTIFICATE-----
29 changes: 29 additions & 0 deletions fisco-bcos/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[engine]
rate = 20 # 速率
duration = "20s" # 持续时间
cap = 4 # 客户端虚拟机数量
instant=3 # 每个批次发的交易数
wait="0s" # 获取cap最大等待时间

[client]
script = "benchmark/fisco-bcos/invoke/script.lua" # 脚本
type = "fisco-bcos" # 区块链类型
contract = "benchmark/fisco-bcos/invoke/contract" # 合约目录路径
config = "benchmark/fisco-bcos/invoke/fisco-bcos" # 区块链SDK配置路径
plugin = "./fisco-bcos.so" # 插件路径
args = ["1.0"] # 合约参数路径

[client.options] # 客户端选项

[recorder.log]
dump=false
dir="./logs"
level="debug"

[recorder.csv]
dir="./csv"





20 changes: 20 additions & 0 deletions fisco-bcos/fisco-bcos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Network]
#type rpc or channel
Type="channel"
CAFile="./ca.crt"
Cert="./sdk.crt"
Key="./sdk.key"
[[Network.Connection]]
NodeURL="127.0.0.1:20200"
GroupID=1
# [[Network.Connection]]
# NodeURL="127.0.0.1:20200"
# GroupID=2

[Account]
# only support PEM format for now
KeyFile="./accounts/0x48eac900f9e862c94e1e38ec205b6a991a349217.pem"

[Chain]
ChainID=1
SMCrypto=false
Loading
Loading