- There must be an env.py file in the Client subfolder. This file must have three variables declared, with these names: serverIP, contractABI, and contractAddress.
- Deploy the smart contract to the blockchain. Recommended: Remix and Ganache. The ABI can be found under the Compile tab in the Remix IDE. Once deployed, the contact's new address (and the ABI if necessary) must be updated in the Client/env.py file.
- The scripts must be interacted with from a terminal window with administrator privileges. This is to ensure that the measurement process has sufficient privileges.
- The GUI allows for two use cases:
- To place bounties
- To take a new measurement, collect the NN metrics, commit these to the SC, check for any qualified bounties, and collect them
- Other interactions with the SC must be done through the command line. Possible commands:
- python Client/SmartContractTest.py getBountyTimestamps $address
- Get a list of timestamps the $address has placed bounties at
- python Client/SmartContractTest.py getBounty $address $timestamp
- Get the values of the bounty submitted by $address at $timestamp
- python Client/SmartContractTest.py getMeasurementResults $address $index
- Get the test descriptors and metrics collected by $address at $index
- python Client/SmartContractTest.py filterMeasurementsByISP $targetISP
- Get the measurement addresses and indexes with $targetISP
- python Client/SmartContractTest.py filterMeasurementsByPing $targetPing
- Get the measurement addresses and indexes with ping in a range around $targetPing (in ms)
- python Client/SmartContractTest.py filterMeasurementsByDistance $targetDistance
- Get the measurement addresses and indexes with distance in a range around $targetDistance (in km)
- python Client/SmartContractTest.py getBountyTimestamps $address