-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Auto Bench] Scripts of Running Benchmarks in AWS (#2793)
* update setting * update webserver pub ip * updated dockerfile * dockerfile updated * clean up log and scripts running on ecs * real script added * fix * update script and config file * parameterizing webserver url * add to ci * to pass ci docker test * to pass ci docker test again * test ci with script, just and ecs * fix duplicate part for ci test * fix ci test * today's last try with ci * fix merge * really last ci try * commented out ci * fix scripts * add file * fix config * fix config * fix bug after upgradability? * init try on parameterization in script * better parameterization for script * clean up and more parameterization * fix lint * finish parameterization for scripts * preserve yml for ci * add blank line * fix less than or equal in script * upload results for init run * last blank line * nit for nano representation * change back transaction size * remove autobench on ci * remove autobench on ci * remove ci_ecs_benchmarks.sh * remove ci autobench script
- Loading branch information
1 parent
beee7b9
commit 66c8b3d
Showing
14 changed files
with
281 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
ValidatorConfig { | ||
public_key: BLSPubKey { | ||
pub_key: VerKey( | ||
( | ||
QuadExtField( | ||
2264797523581107490935262917175769123227923636811928330606075281145117212394 | ||
+ 15807017392833049888165434456991157794698032464874424842715555348468160607934 * u | ||
), | ||
QuadExtField( | ||
7996517616082121122160563552650547601395271017260499735456299700133762512689 | ||
+ 7504045709281061282278228438613345070383424761478787301859187055302953740948 * u | ||
), | ||
QuadExtField( | ||
1515973040548822760825076242090160370742046237881440422068330135941139244581 | ||
+ 20251846261653098602911417004145145971080304248810966341160788194007704966108 * u | ||
) | ||
) | ||
public_key: VerKey( | ||
( | ||
QuadExtField(2264797523581107490935262917175769123227923636811928330606075281145117212394 + 15807017392833049888165434456991157794698032464874424842715555348468160607934 * u), | ||
QuadExtField(7996517616082121122160563552650547601395271017260499735456299700133762512689 + 7504045709281061282278228438613345070383424761478787301859187055302953740948 * u), | ||
QuadExtField(1515973040548822760825076242090160370742046237881440422068330135941139244581 + 20251846261653098602911417004145145971080304248810966341160788194007704966108 * u) | ||
) | ||
), | ||
private_key: SignKey( | ||
BigInt( | ||
[3505488234151006356, 6655477166151225138, 3291219027844407676, 2153641080015542578] | ||
) | ||
), | ||
stake_value: 1, | ||
state_key_pair: StateKeyPair( | ||
KeyPair { | ||
sk: SignKey( | ||
BigInt( | ||
[2822822805887490846, 6664316196088353173, 4926510007447087464, 116097479308258694] | ||
) | ||
), | ||
vk: VerKey( | ||
Projective { | ||
x: BigInt([11315198235793138814, 4744451806709910489, 6921831025042192557, 1125393823825936625]), | ||
y: BigInt([13035879815613524256, 18225673961538637854, 12006860967936477969, 1516668567229692859]), | ||
t: BigInt([13450777528397789701, 12242009376162249168, 12596256366242272750, 3368076418495976469]), | ||
z: BigInt([10465708325245823445, 13967918689717629445, 14943426723808572731, 621075342718756551]) | ||
} | ||
) | ||
} | ||
) | ||
}, | ||
private_key: BLSPrivKey { | ||
priv_key: SignKey( | ||
BigInt( | ||
[3505488234151006356, 6655477166151225138, 3291219027844407676, 2153641080015542578] | ||
) | ||
) | ||
}, | ||
stake_value: 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:jammy | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y curl libcurl4 wait-for-it tini \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ARG ASYNC_EXECUTOR=async-std | ||
|
||
COPY ./target/${ASYNC_EXECUTOR}/debug/examples/validator-webserver /usr/local/bin/validator-webserver | ||
|
||
# logging | ||
ENV RUST_LOG="warn" | ||
|
||
# log format. JSON no ansi | ||
ENV RUST_LOG_FORMAT="json" | ||
|
||
ENTRYPOINT ["validator-webserver"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
__pycache__ | ||
*.output | ||
*.output | ||
benchmarks_results/results.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
|
||
source "$HOME/.cargo/env" | ||
|
||
# assign local ip | ||
ip=`curl http://169.254.169.254/latest/meta-data/local-ipv4` | ||
webserver_url=http://"$ip":9000 | ||
da_webserver_url=http://"$ip":9001 | ||
orchestrator_url=http://"$ip":4444 | ||
|
||
# build | ||
just async_std build | ||
sleep 30s | ||
|
||
# docker build and push | ||
docker build . -f ./docker/validator-webserver-local.Dockerfile -t ghcr.io/espressosystems/hotshot/validator-webserver:main-async-std | ||
docker push ghcr.io/espressosystems/hotshot/validator-webserver:main-async-std | ||
|
||
# ecs deploy | ||
ecs deploy --region us-east-2 hotshot hotshot_centralized -i centralized ghcr.io/espressosystems/hotshot/validator-webserver:main-async-std | ||
ecs deploy --region us-east-2 hotshot hotshot_centralized -c centralized ${orchestrator_url} | ||
|
||
for total_nodes in 10 50 100 | ||
do | ||
for da_committee_size in 10 50 100 | ||
do | ||
if [ $da_committee_size -le $total_nodes ] | ||
then | ||
for transactions_per_round in 1 10 50 100 | ||
do | ||
for transaction_size in 512 4096 #1000000 20000000 | ||
do | ||
rounds=100 | ||
# start webserver | ||
just async_std example webserver -- http://0.0.0.0:9000 & | ||
just async_std example webserver -- http://0.0.0.0:9001 & | ||
sleep 1m | ||
|
||
# start orchestrator | ||
just async_std example orchestrator-webserver -- --config_file ./crates/orchestrator/run-config.toml \ | ||
--orchestrator_url http://0.0.0.0:4444 \ | ||
--webserver_url ${webserver_url} \ | ||
--da_webserver_url ${da_webserver_url} \ | ||
--total_nodes ${total_nodes} \ | ||
--da_committee_size ${da_committee_size} \ | ||
--transactions_per_round ${transactions_per_round} \ | ||
--transaction_size ${transaction_size} \ | ||
--rounds ${rounds} \ | ||
--commit_sha test & | ||
sleep 30 | ||
|
||
# start validators | ||
ecs scale --region us-east-2 hotshot hotshot_centralized ${total_nodes} --timeout -1 | ||
sleep $(($rounds + $total_nodes)) | ||
|
||
# kill them | ||
ecs scale --region us-east-2 hotshot hotshot_centralized 0 --timeout -1 | ||
sleep 1m | ||
for pid in $(ps -ef | grep "orchestrator" | awk '{print $2}'); do kill -9 $pid; done | ||
for pid in $(ps -ef | grep "webserver" | awk '{print $2}'); do kill -9 $pid; done | ||
done | ||
done | ||
fi | ||
done | ||
done |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.