Clique aqui para acessar a versão em Português do Brasil.
This project is organized into five folders:
-
contaudit-chaincode - Multiple project of smart contracts used in the experiment blockchain.
-
contaudit-admin - Client application project used by the audit to configure the blockchain in the experiment.
-
contaudit-wrapper - Client application project used by the audited organizations in the experiment.
-
contaudit-samples - Repository of example tools and artifacts used by audited organizations in the the experiment.
-
contaudit-checker - Client application project used by the audit for analysis in ongoing audits in the experiment.
Important: Run all the commands below in the local working directory of this repository.
Important: All commands below have been tested on Linux/Debian systems only.
Once you have configured the Minifabric tool in your environment, initialize the network with the command below.
minifab up -e true -o auditor.contaudit.ppgc.inf.ufrgs.br -c c1
Once the Minifabric network is online, it may be interesting to launch the Hyperledger Explorer tool to gain visibility into the network components as well as their transactions. To do this, run the command below.
minifab explorerup
To configure other clients to interact with the blockchain, we must extract the compressed file provided by Minifabric, which contains the configuration files and identities of the network members. To do this, run the command below.
tar -xvf ./vars/vscode.tgz --directory ./vars
At this point, we need to copy the smart contracts used in the experiment into the Minifabric framework so that we can install them later. To do this, run the command below.
for chaincodeFiles in $(ls -d ./contaudit-chaincode/*/ | cut -d "/" -f 3 | awk '{print}');
do
rsync -aq --delete ./contaudit-chaincode/$chaincodeFiles/ --mkpath ./vars/chaincode/$chaincodeFiles/java --exclude .gradle --exclude .gitignore --exclude .vscode --exclude bin --exclude build;
done
Finally, we need to install the smart contracts on the Blockchain. To do this, run the command below.
for chaincode in $(ls -d ./contaudit-chaincode/*/ | cut -d "/" -f 3 | awk '{print}');
do
minifab ccup -n $chaincode -l java -v 1.0;
done
To use the Wrapper in audited organizations, run the command below, changing the parameters in double quotes to the address of the tool to be executed and the artifacts used by it, respectively.
java -jar ./contaudit-wrapper.jar "ExecID" "./contaudit-samples/executor/executor ./contaudit-samples/executor/artifacts/apache.workflow"
To reproduce the first and second experiment, run the command below.
sh ./experiment_1_and_2.sh "2024-09-29" "execute-multiple-apache2-workflows-with-stats" 100 5 --commit
sh ./experiment_1_and_2.sh "2024-09-29-2" "execute-multiple-user-workflows-with-stats" 100 5 --commit
To reproduce the third experiment, run the command below.
sh ./experiment_3.sh "2024-10-05" "execute-multiple-apache2-workflows" 30 --commit
To reproduce the fourth experiment, run the command below.
sh ./experiment_4.sh "2024-10-06" "execute-one-workflow-with-stats" "vim.workflow" 30 --commit
To reproduce the fifth experiment, run the command below.
sh ./experiment_5.sh "2024-10-12" "execute-one-workflow-with-stats" "digital_ocean_k3s.workflow" --commit
If you encounter unknown errors when interacting with Minifabric, we recommend reconfiguring the environment. Below are some commands that can help with this process.
rm -r vars/chaincode/*-chaincode
minifab cleanup
sudo service docker restart
docker network prune -f &&
docker container prune -f &&
docker volume prune -f &&
docker image prune -f &&
docker system prune -f &&
docker kill $(docker ps -q)
NOTE: Be careful when using this command, as your entire Docker environment will be shut down and cleaned!
for pid in $(sudo netstat -tunlp | grep '.*docker' | cut -d "/" -f 1 | awk '{print $7}');
do
sudo kill -9 $pid;
done
rm -f ~/.docker/desktop/vms/0/data/Docker.raw