### Run Example Experiment with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Executes an example experiment using the `minion` tool with specified workload and setup files, which will trigger the installation of blockchain binaries and Diablo. ```bash ./bin/eurosys workload-native-10.yaml setup.txt ``` -------------------------------- ### Run DApp Blockchain Workload Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Execute a DApp workload (`workload-contract-10.yaml`) on the blockchain protocols. Similar to the native workload, this command uses the `eurosys` tool, skips installation, and refers to `setup.txt` for configuration. ```bash ./bin/eurosys --skip-install workload-contract-10.yaml setup.txt ``` -------------------------------- ### Example Setup File Configuration Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md This snippet illustrates an example entry in the `setup.txt` file. This file defines how to SSH into the machines and specifies the roles (primary, secondary, chain) for each node within the blockchain deployment. ```configuration vagrant@127.0.0.1 = primary,secondary,chain ``` -------------------------------- ### Run Native Blockchain Transfer Workload Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Execute a simple native transfer workload (`workload-native-10.yaml`) on the deployed blockchain protocols using the `eurosys` tool. This command skips the installation step and uses `setup.txt` for configuration. ```bash cd minion ./bin/eurosys --skip-install workload-native-10.yaml setup.txt ``` -------------------------------- ### Analyze Algorand Performance Logs (E1 Results) Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Extract and view specific log files from Algorand experiment results archives to compare performance outcomes between different transaction rate workloads. ```bash tar xfO algorand-1-1-1-native-10_2022-08-21-22-48-58.results.tar.gz algorand-1-1-1-native-10_2022-08-21-22-48-58.results/diablo-primary-127.0.0.1-out.log tar xfO algorand-1-1-1-native-100_2022-08-21-23-08-04.results.tar.gz algorand-1-1-1-native-100_2022-08-21-23-08-04.results/diablo-primary-127.0.0.1-out.log ``` -------------------------------- ### Install PerlBrew Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Downloads and executes the PerlBrew installation script, a tool to manage multiple Perl installations, as a prerequisite for Diablo. ```bash curl -L https://install.perlbrew.pl | bash ``` -------------------------------- ### Analyze Solana DApp Execution Logs (E2 Results) Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Extract and review Solana's primary log file from the 'Uber' workload experiment to confirm that transactions are submitted but not committed, illustrating the impact of gas caps. ```bash tar xfO solana-1-1-1-smart-uber_2022-08-21-22-48-58.results.tar.gz solana-1-1-1-smart-uber_2022-08-21-22-48-58.results/diablo-primary-127.0.0.1-out.log ``` -------------------------------- ### Boot AWS EC2 Instances for Testnet Topology Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Boots 20 `c5.xlarge` EC2 instances in the `us-east-2` region using the prepared `minion-eurosys-aec` AMI, intended for a testnet topology with 10 machines for blockchain and 10 for Diablo. ```bash ./bin/minion boot --image=minion-eurosys-aec --key=aec --region=us-east-2 --size=20 --security-group=default --type=c5.xlarge -vv ``` -------------------------------- ### Execute Workloads to Test Blockchain Performance (E1) Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Run two distinct workloads (10 and 100 transactions/sec) using the `eurosys` tool to observe how transaction rates affect blockchain performance and resource utilization. ```bash ./bin/eurosys --skip-install workload-native-10.yaml setup.txt ./bin/eurosys --skip-install workload-100.yaml setup.txt ``` -------------------------------- ### Extract Algorand Performance Results Archive Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Extract the contents of a specific Algorand performance results archive (`.tar.gz` file) into a directory with the same name. This allows for detailed inspection of the aggregated performance data. ```bash tar xf0 algorand-1-1-1-native-10_2022-08-21-22-48-58.tar.gz algorand-1-1-1-native-10_2022-08-21-22-48-58/ ``` -------------------------------- ### Specify Diablo Benchmark Version Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This snippet shows the specific Git URL and checkout reference for the Diablo benchmark repository used in the installation script, ensuring a consistent version for replication. ```bash diablo_url = https://github.com/NatoliChris/diablo-benchmark.git diablo_checkout = 'aec' ``` -------------------------------- ### Run Blockchain Experiments on AWS Testnet Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Executes blockchain experiments on the booted AWS testnet instances using `minion`, requiring the blockchain name, type, workload, and the `sfr-id@region` from the `boot` command output. ```bash ./bin/minion run -vv blockchain-name blockchain-type-testnet-workload-n.yaml sfr-id@region ``` -------------------------------- ### Boot Machines for Community Topology Across Multiple Regions with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command provisions 21 c5.xlarge machines in each specified region globally using the 'minion' tool. Twenty machines per region are for blockchain, and one for Diablo. The command uses a specific image and security group, and should be left running in a terminal. ```bash ./bin/minion boot --image=minion-eurosys-aec --key=aec --region=ap-south-1 --region=af-south-1 --region=eu-south-1 --region=eu-north-1 --region=us-east-2 --region=ap-northeast-1 --region=sa-east-1 --region=ap-southeast-2 --region=me-south-1 --region=us-west-2 --size=21 --security-group=default --type=c5.xlarge -vv ``` -------------------------------- ### Execute Uber Workload to Test DApp Gas Limits (E2) Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Run the 'Uber' DApp workload with `eurosys` to demonstrate how transaction gas limits on certain blockchains can prevent realistic decentralized applications from executing successfully. ```bash ./bin/eurosys --skip-install workload-uber.yaml setup.txt ``` -------------------------------- ### Install Matplotlib for Python Environment Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Prepares the Python 3.10 environment by installing the matplotlib library, which is essential for plotting the figures. Ensure a fresh Python environment is set up as per the guide. ```Python pip install matplotlib ``` -------------------------------- ### Boot Machines for Consortium Topology Across Multiple Regions with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command provisions 21 c5.2xlarge machines in each specified region globally using the 'minion' tool. Twenty machines per region are for blockchain, and one for Diablo. The command uses a specific image and security group, and should be left running in a terminal. ```bash ./bin/minion boot --image=minion-eurosys-aec --key=aec --region=ap-south-1 --region=af-south-1 --region=eu-south-1 --region=eu-north-1 --region=us-east-2 --region=ap-northeast-1 --region=sa-east-1 --region=ap-southeast-2 --region=me-south-1 --region=us-west-2 --size=21 --security-group=default --type=c5.2xlarge -vv ``` -------------------------------- ### Install Pyenv Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Downloads and executes the pyenv installation script, a tool for managing multiple Python versions, which is a dependency for Diablo. ```bash curl https://pyenv.run | bash ``` -------------------------------- ### Boot Machines for Datacenter Topology with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command provisions 14 c5.9xlarge machines in the 'us-east-2' (Ohio) region using the 'minion' tool. Ten machines are designated for blockchain operations, and four for Diablo. The command uses a specific image and security group, and should be left running in a terminal. ```bash ./bin/minion boot --image=minion-eurosys-aec --key=aec --region=us-east-2 --size=14 --security-group=default --type=c5.9xlarge -vv ``` -------------------------------- ### Boot Machines for Devnet Topology Across Multiple Regions with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command provisions 2 c5.xlarge machines in each specified region globally using the 'minion' tool. One machine per region is for blockchain, and one for Diablo. The command uses a specific image and security group, and should be left running in a terminal. ```bash ./bin/minion boot --image=minion-eurosys-aec --key=aec --region=ap-south-1 --region=af-south-1 --region=eu-south-1 --region=eu-north-1 --region=us-east-2 --region=ap-northeast-1 --region=sa-east-1 --region=ap-southeast-2 --region=me-south-1 --region=us-west-2 --size=2 --security-group=default --type=c5.xlarge -vv ``` -------------------------------- ### Convert Performance Results to CSV Format Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md Move native and contract workload archives to their respective directories (`~/scripts/results/native/` and `~/scripts/results/contracts/`) and then use the `csv-results` script to convert the collected JSON results into a single `results.csv` file for further analysis. ```bash mv *native*.tar.gz ~/scripts/results/native/ mv *contract*.tar.gz ~/scripts/results/contracts/ cd ~/scripts ./csv-results results results.csv ``` -------------------------------- ### Prepare AWS AMI for Minion EuroSys AEC Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Prepares a custom Amazon Machine Image (AMI) with all required software and blockchain binaries for the EuroSys AEC benchmark, specifying base image, key, name, regions, and instance type. ```bash ./bin/minion prepare --base='*ubuntu*20.04*amd64*server*' --key=aec --name=minion-eurosys-aec --region=ap-south-1 --region=af-south-1 --region=eu-south-1 --region=eu-north-1 --region=us-east-2 --region=ap-northeast-1 --region=sa-east-1 --region=ap-southeast-2 --region=me-south-1 --region=us-west-2 --resize=72 --install-region=eu-south-1 --size=1 --security-group=default --type=c5.9xlarge --verbose ``` -------------------------------- ### Clone Minion Repository AEC Branch Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Clones the `minion` repository from GitHub, specifically checking out the `aec` (Artifact Evaluation Committee) branch, which contains the benchmark-specific code. ```bash git clone -b aec https://github.com/lebdron/minion ``` -------------------------------- ### Install GCC and Build Essentials on Linux Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Updates the package list and installs `build-essential`, which includes GCC, G++, and make, necessary for compiling software on Debian/Ubuntu-based systems. ```bash sudo apt update sudo apt install build-essential ``` -------------------------------- ### Install Specific Python Version and PyYAML with Pyenv Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Installs Python version 3.10.6 using pyenv, sets it as the global default, and then installs the `PyYAML` Python package, a common dependency. ```bash pyenv install 3.10.6 pyenv global 3.10.6 pip install PyYAML ``` -------------------------------- ### Run Blockchain Workloads for Datacenter Topology with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command executes blockchain and simple transfer workloads on the provisioned machines. It requires the 'sfr-id@region' output from the previous 'boot' command. Users can specify 'blockchain-name', 'blockchain-type', and 'n' (number of transactions) to define the workload configuration. ```bash ./bin/minion run -vv blockchain-name blockchain-type-datacenter-workload-n.yaml sfr-id@region ``` -------------------------------- ### Install Specific Perl Version and Modules with PerlBrew Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Installs Perl version 5.34.0 using PerlBrew and then installs the `YAML` and `JSON` CPAN modules required for Diablo's operation. ```bash perlbrew install perl-5.34.0 perlbrew switch perl-5.34.0 cpan YAML cpan JSON ``` -------------------------------- ### Unarchive DiabloBench Benchmark Results Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md Demonstrates how to extract the contents of a DiabloBench results archive file, which contains detailed information about the topology, setup, workload, and standard/error outputs of each node. ```bash tar xf0 algorand-1-1-1-native-10_2022-08-21-22-48-58.results.tar.gz algorand-1-1-1-native-10_2022-08-21-22-48-58.results/ ``` -------------------------------- ### Blockchain Performance Result File Naming Convention Source: https://github.com/diablobench/diablobench.github.io/blob/main/artifact.md This pattern describes the naming convention for archived performance results files, which include details such as blockchain name, region, number of secondaries, number of blockchain nodes, workload name, and a timestamp. ```text [blockchain_name]-[region_number]-[#secondaries]-[#blockchain_nodes]-[workload_name]-[timestamp].results.tar.gz ``` -------------------------------- ### Run Blockchain Workloads for Consortium Topology with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command executes blockchain and simple transfer workloads on the provisioned machines across multiple regions. It requires the 'sfr-id@region' output for all regions from the previous 'boot' command. Users can specify 'blockchain-name', 'blockchain-type', and 'contract-type' to define the workload configuration. Note that the 'youtube' contract is not available for Algorand. ```bash ./bin/minion run -vv blockchain-name blockchain-type-workload-contract-type.yaml sfr-id@region ``` -------------------------------- ### Generate configs.csv from results.csv Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Creates the 'configs.csv' file using the 'csv-configs' utility. This step processes the 'results.csv' data, which should be unarchived and placed in the scripts directory, to prepare configuration data for figure generation. ```Shell ./csv-configs ./results.csv ./configs.csv ``` -------------------------------- ### Diablo Primary Node Benchmark Command Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md This command illustrates the underlying Diablo-v2 benchmark command executed by the `eurosys` binary for a primary node. It configures the benchmark with accounts, contracts, output file, compression, and statistics, running for 1 iteration with the specified setup and workload. ```bash diablo primary -vvv --port=5000 \n--env="accounts=accounts.yaml" \n--env="contracts=dapps-directory" \n--output=results.json --compress --stat \n1 setup.txt workload-contract-10.yaml ``` -------------------------------- ### Run Blockchain Workloads for Devnet Topology with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command executes blockchain and simple transfer workloads on the provisioned machines across multiple regions. It requires the 'sfr-id@region' output for all regions from the previous 'boot' command. Users can specify 'blockchain-name', 'blockchain-type', and 'n' (number of transactions) to define the workload configuration. ```bash ./bin/minion run -vv blockchain-name blockchain-type-devnet-workload-n.yaml sfr-id@region ``` -------------------------------- ### Generate PDF Figure Files Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Executes the 'make figures' command to generate various PDF figure files. This command relies on the previously prepared 'configs.csv' and other data to produce the final visual outputs. ```Shell make figures ``` -------------------------------- ### Run Blockchain Workloads for Community Topology with Minion Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md This command executes blockchain and simple transfer workloads on the provisioned machines across multiple regions. It requires the 'sfr-id@region' output for all regions from the previous 'boot' command. Users can specify 'blockchain-name', 'blockchain-type', and 'n' (number of transactions) to define the workload configuration. ```bash ./bin/minion run -vv blockchain-name blockchain-type-community-workload-n.yaml sfr-id@region ``` -------------------------------- ### Generate and Authorize SSH Key for Localhost Source: https://github.com/diablobench/diablobench.github.io/blob/main/fresh-install.md Generates an ED25519 SSH key pair without a passphrase and appends the public key to `authorized_keys` for passwordless SSH connections to localhost, required by minion for local operations. ```bash ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys ``` -------------------------------- ### Implement Twitter DApp Smart Contracts Source: https://github.com/diablobench/diablobench.github.io/blob/main/dapp-howto.md These code snippets demonstrate a simple Twitter DApp smart contract that allows users to post messages with a character limit. Examples are provided for Solidity (Ethereum) and Golang (Hyperledger Fabric), showcasing how to enforce message length and store/emit tweet data, ensuring messages do not exceed a predefined maximum length. ```Solidity modifier checklen ( string memory data ) { require ( bytes ( data ). length <= maxlen , " tweet too large " ); _ ; } function tweet ( string memory data ) public checklen ( data ) { tweets [ msg . sender ] = data ; emit NewTweet ( msg . sender , data ); } ``` ```Golang func ( s * SmartContract ) Tweet ( ctx contractapi . TransactionContextInterface , message string , owner string ) error { if len ( message ) > MaxLen { return fmt . Errorf ( " tweet too large , % v " , len ( message )) } b := [] byte ( message ) return ctx . GetStub (). PutState ( owner , b ) } ``` -------------------------------- ### Render Commit Rate Bar Chart with Chart.js Source: https://github.com/diablobench/diablobench.github.io/blob/main/nasdaq-community-commit-rate.html This JavaScript snippet initializes a bar chart using Chart.js to display commit rates for different blockchain platforms. It targets an HTML canvas element with the ID 'commit-rate' and visualizes data including Avalanche, Algorand, Diem, Ethereum, Quorum, Redbelly, and Solana. The chart shows commit rates as percentages with a y-axis starting at zero. ```JavaScript const ctx = document.getElementById('commit-rate'); new Chart(ctx, { type: 'bar', data: { labels: ['Avalanche', 'Algorand', 'Diem', 'Ethereum', 'Quorum', 'Redbelly', 'Solana'], datasets: [{ label: 'Commit rate (%)', data: [55, 87, 27, 16, 88, 100, 62], borderWidth: 1 }] }, options: { scales: { y: { beginAtZero: true } } } }); ``` -------------------------------- ### Navigate to Minion Directory Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md This command changes the current directory to 'minion', which contains the deployment and workload files necessary for running the blockchain network, the Diablo benchmark, and collecting results. ```bash cd minion ``` -------------------------------- ### Execute Smart Contract Workload Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md This command runs the `eurosys` binary to execute a smart contract workload. The `workload-contract-10.yaml` file specifies sending 10 invocations of the `buy` function per second for 30 seconds, representing NASDAQ Microsoft shares. The `--skip-install` argument is used as binaries are pre-built in the provided image. ```bash ./bin/eurosys --skip-install workload-contract-10.yaml setup.txt ``` -------------------------------- ### Execute Native Transfer Workload Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md This command runs the `eurosys` binary to execute a native transfer workload on each blockchain. The `workload-native-10.yaml` file specifies sending 10 transactions per second for 30 seconds, and `setup.txt` defines the deployment configuration. The `--skip-install` argument is used because all necessary binaries are pre-built in the provided image. ```bash ./bin/eurosys --skip-install workload-native-10.yaml setup.txt ``` -------------------------------- ### Configure DApp Workload in Diablo Source: https://github.com/diablobench/diablobench.github.io/blob/main/dapp-howto.md This configuration file defines the workload for a DApp in Diablo, specifying client behavior, account usage, DApp instance, and load patterns. It uses variables for location, endpoints, accounts, and the DApp itself to simulate user interactions and transaction rates over time, demonstrating how to set up multiple clients, invoke DApp functions, and define variable transaction per second (TPS) rates over the test duration. ```Diablo Configuration let: - &loc { sample: !location [ "us-east-2" ] } - &end { sample: !endpoint [ ".*" ] } - &acc { sample: !account { number: 2000 } } - &dapp { sample: !contract { name: "dota" } } workloads: - number: 3 client: location: *loc view: *end behavior: - interaction: !invoke from: *acc contract: *dapp function: "update(1, 1)" load: 0: 4432 50: 4438 120: 0 ``` -------------------------------- ### Move DiabloBench Results to Analysis Directories Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md Provides commands to organize collected DiabloBench results by moving the archive files (native and contract types) into designated analysis folders for subsequent processing and reporting. ```bash mv *native*.tar.gz ~/scripts/results/native/ mv *contract*.tar.gz ~/scripts/results/contracts/ ``` -------------------------------- ### Diablo Secondary Node Benchmark Command Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md This command illustrates the underlying Diablo-v2 benchmark command executed by the `eurosys` binary for a secondary node. It specifies the verbosity, a tag, and the port for communication with the primary node at 127.0.0.1. ```bash diablo secondary -v --tag="local" \n--port=5000 127.0.0.1 ``` -------------------------------- ### Diablo Blockchain Abstraction Interface Functions Source: https://github.com/diablobench/diablobench.github.io/blob/main/blockchain-howto.md To integrate a new blockchain with Diablo, implement these four functions. They abstract blockchain interactions, converting Diablo's benchmark specification into executable test programs. These functions are fine-grained, leading to small implementation sizes (e.g., 1,000-1,200 LOC in Go). ```APIDOC s.create_client(E) create_resource(P^r) encode(P^i, r, t) trigger(i, r, t) ``` -------------------------------- ### DiabloBench Results CSV File Column Specification Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md Defines the structure and meaning of each column in the `results.csv` file, which summarizes the performance results of each experiment, including unique identifiers, blockchain details, and various latency and throughput metrics. ```APIDOC uid: unique identifier blockchain: name of the blockchain region: the AWS regions we used for the experiment secondary: number of Diablo Secondaries (acting as clients by sending requests to validators) that are deployed in the experiment miner: number of miners/validators in the blockchain network of the experiment machine: the AWS virtual machine specification as available at https://aws.amazon.com/ec2/instance-types/c5/ interaction: the type of requests sent (it can be a transfer request or smart contract invocation request) lastsub: the duration in seconds between the benchmark start time and the time of the last transaction submission time submit: the number of submitted requests lastcom: the duration in seconds between the benchmark start time and the last transaction commit time commit: the number of committed requests latecommit: the number of requests that were committed after all requests were submitted avglat: the average latency of the committed transactions submits: a semi-colon separated list of duration (in seconds) between the benchmark start time and the times each request was submitted latencies: a semi-colon separated list of latencies for each committed request ``` -------------------------------- ### Convert DiabloBench Results to CSV Format Source: https://github.com/diablobench/diablobench.github.io/blob/main/redo-howto.md Illustrates the use of the `csv-results` script to transform raw JSON-formatted DiabloBench performance data into a structured CSV file, `results.csv`, suitable for detailed analysis. ```bash cd ~/scripts ./csv-results results results.csv ``` -------------------------------- ### Sort HTML Table by Numeric Column in JavaScript Source: https://github.com/diablobench/diablobench.github.io/blob/main/ranking.html This JavaScript function sorts an HTML table with the ID 'table' based on the numeric values in a specified column. It retrieves all table rows (excluding the header), sorts them in ascending order by parsing cell content as floats (defaulting to -1 for non-numeric values), and then re-appends the sorted rows to the table's first tbody element. This provides dynamic client-side table sorting functionality. ```JavaScript /** * Sorts the table with id equal to "table" based on the float available * in the specified column. */ function sortTable(columnIndex) { // Get the table rows and remove the header. let table = document.getElementById("table"); let rows = Array.from(table.rows).slice(1); // Generate the sorted rows. let sortedRows = rows.sort((a, b) => { let cellA = parseFloat(a.cells[columnIndex].innerText) || -1; let cellB = parseFloat(b.cells[columnIndex].innerText) || -1; return (cellA >= cellB ? 0 : 1) }); // Update the table data. sortedRows.forEach(row => table.tBodies[0].appendChild(row)); } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.