Skip to content

ramoncordeiro/SDDK-AC

Repository files navigation

How to Execute SDDK-AC Code

1. Prerequisites

  1. Blockchain EVM Network
  2. NodeJS version equal to or greater than v20.
  3. Install Hardhat (Here we describe it)
  4. Solidity Compile Installed
  5. EVM Blockchain Wallet (You can use Metamask to create one)
  6. Python v.3.0
  7. Hyperledger Caliper equal or upper v0.5 (Here we describe it);

2. Deploy Contracts on an EVM Blockchain

2.1 Install Hardhat running this command

npx hardhat install

2.2. Install all node dependencies

Run: npm install

2.3. Deploy contracts using scripts in the folder scripts

2.3.1 Run: npx hardhat script --network e.g, npx hardhat script deployBaseline.js --network besu ``` (here we defined our network on hardhat.config.js so that we can call it by name)

2.4 - Copy the contract address generated and save it.

3. Install and Run Hyperledger Caliper

3.1 Install Caliper

npm i -g @hyperledger/caliper-cli npx caliper --version(check if it was installed) npx caliper bind --caliper-bind-sut besu:latest ```(bind caliper to works on ethereum and besu)

3.2 - Configure Caliper to Run.

3.2.1 - Copy your wallet address and Private key to networks;network-config.json file and put on variables fromAddress and fromAddressPrivateKey 3.2.2 - Copy the contract address saved on step 2.4 and paste it into network-config.json 3.2.3 - Copy the contract ABI generated on artifacts and paste it into network-config.json (follow the example of the file)

3.3 - Run Caliper

There are two ways to run Caliper: running the commands, giving the parameters, such as:

npx caliper launch manager \
--caliper-workspace . \
--caliper-benchconfig benchmarks/scenario/simple/config.yaml \
--caliper-networkconfig <networkconfig-path>

Or run one of the scripts used here, such as baseline_runner.py (this script runs Caliper 30x and saves the results in the folder results)

Generate Charts with Python Notebooks

With the results in the folder, following the default name file (e.g. 1.html, 2.html...), you can use results.ipynb to generate charts.

About

SDDK-AC code implemented in Academic Paper.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors