mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-17 04:23:08 +00:00
add cortze/py-dht as submodule + add DHT related parameters to the DAS conf/shape
This commit is contained in:
parent
db5fd6c157
commit
808f857659
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ myenv*/
|
||||
doc/_build
|
||||
!results/plots.py
|
||||
Frontend/
|
||||
.idea
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "py-dht"]
|
||||
path = py-dht
|
||||
url = https://github.com/cortze/py-dht.git
|
||||
@ -26,7 +26,7 @@ cd das-research
|
||||
```
|
||||
python3 -m venv myenv
|
||||
source myenv/bin/activate
|
||||
pip3 install -r DAS/requirements.txt
|
||||
bash install_dependencies.sh
|
||||
```
|
||||
|
||||
## Run the simulator
|
||||
|
||||
20
install_dependencies.sh
Normal file
20
install_dependencies.sh
Normal file
@ -0,0 +1,20 @@
|
||||
VENV="./myenv"
|
||||
|
||||
echo "Installing dependencies for DAS..."
|
||||
|
||||
# activate the venv or raise error if error
|
||||
source $VENV/bin/activate
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "venv successfully sourced"
|
||||
else
|
||||
echo "unable to source venv at $VENV , does it exist?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# make sure that the submodule module is correctly downloaded
|
||||
git submodule update --init
|
||||
|
||||
# install requirements for DAS and py-dht and install the dht module from py-dht
|
||||
pip3 install -r DAS/requirements.txt
|
||||
pip3 install -r py-dht/requirements.txt
|
||||
pip3 install -e py-dht
|
||||
1
py-dht
Submodule
1
py-dht
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3f7d75451905b7bd9e6207a1168b3086b244f890
|
||||
22
smallConf.py
22
smallConf.py
@ -101,10 +101,26 @@ diagnostics = False
|
||||
# True to save git diff and git commit
|
||||
saveGit = False
|
||||
|
||||
# --- DHT Parameters ---
|
||||
|
||||
# True to simulate the distribution of the BlockSegments over a simulated DHTNetwork
|
||||
dhtSimulation = True
|
||||
|
||||
# K replication factor, in how many DHT nodes are we going to store the block segments
|
||||
# reused as how many DHT nodes will fit into each Kbucket to the routing table
|
||||
ks = [20]
|
||||
|
||||
# Number of concurrent DHT nodes that will be contacted during a Lookup
|
||||
alphas = [1]
|
||||
|
||||
# Number of steps without finding any closer DHT nodes to a Hash will the DHT lookup perform before finishing it
|
||||
# Not using steps4StopCondition as 7 steps looks too much for the DHT (although it could be changed :))
|
||||
nilStepsToStopLookup = 3
|
||||
|
||||
def nextShape():
|
||||
for run, fm, fr, class1ratio, chi, vpn1, vpn2, blockSize, nn, netDegree, bwUplinkProd, bwUplink1, bwUplink2 in itertools.product(
|
||||
runs, failureModels, failureRates, class1ratios, chis, validatorsPerNode1, validatorsPerNode2, blockSizes, numberNodes, netDegrees, bwUplinksProd, bwUplinks1, bwUplinks2):
|
||||
for run, fm, fr, class1ratio, chi, vpn1, vpn2, blockSize, nn, netDegree, bwUplinkProd, bwUplink1, bwUplink2, k, alpha in itertools.product(
|
||||
runs, failureModels, failureRates, class1ratios, chis, validatorsPerNode1, validatorsPerNode2, blockSizes, numberNodes, netDegrees, bwUplinksProd, bwUplinks1, bwUplinks2, ks, alphas):
|
||||
# Network Degree has to be an even number
|
||||
if netDegree % 2 == 0:
|
||||
shape = Shape(blockSize, nn, fm, fr, class1ratio, chi, vpn1, vpn2, netDegree, bwUplinkProd, bwUplink1, bwUplink2, run)
|
||||
shape = Shape(blockSize, nn, fm, fr, class1ratio, chi, vpn1, vpn2, netDegree, bwUplinkProd, bwUplink1, bwUplink2, k, alpha, run)
|
||||
yield shape
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user