-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(auctioneer): POC of an auctioneer smoke test #1975
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,22 @@ | |
> just ibc-test delete | ||
``` | ||
|
||
## Running an Auctioneer smoke test | ||
|
||
You can run a smoke test which tests the full auctioneer functionality end to end. | ||
Check failure on line 201 in charts/README.md
|
||
|
||
1. The bid is streamed from the flame node to the auctioneer node | ||
2. The auctioneer node wraps the winning bid in an allocation and sends it to the sequencer. | ||
Check failure on line 204 in charts/README.md
|
||
3. The sequencer node includes the allocation in a block | ||
4. The flame node reads the allocation and places the winning tx at the top of the block | ||
Check failure on line 206 in charts/README.md
|
||
|
||
``` | ||
Check failure on line 208 in charts/README.md
|
||
> just deploy cluster | ||
> just auctioneer-test deploy | ||
> just auctioneer-test run | ||
> just auctioneer-test delete | ||
``` | ||
|
||
## Examining Deployments | ||
|
||
[k9s](https://k9scli.io/) is a useful utility for inspecting deployed | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
_default: | ||
@just --list auctioneer-test | ||
|
||
defaultTag := "" | ||
defaultNamespace := "astria-dev-cluster" | ||
evm_destination_address := "0x507056D8174aC4fb40Ec51578d18F853dFe000B2" | ||
smoke_test_image := "bharath123456/auctioneer-smoke-test:latest" | ||
sequencer_grpc_url := "grpc.sequencer.localdev.me" | ||
eth_rpc_url := "http://executor.astria.localdev.me" | ||
searcher_private_key := "5478c1df1db4867e4d29ab1cf6c6ed0ae0b2c3fbe7fc6e00edd0891d507d43f2" | ||
rollup_name := "astria" | ||
amount_to_send := "10000" | ||
|
||
delete: | ||
-just delete celestia-local | ||
-just delete sequencers | ||
-just delete rollup | ||
|
||
@deploy tag=defaultTag: | ||
echo "Deploying ingress controller..." && just deploy-ingress-controller > /dev/null | ||
just wait-for-ingress-controller > /dev/null | ||
echo "Deploying local celestia instance..." | ||
helm install celestia-local-chart ./celestia-local --namespace {{defaultNamespace}} --set fast=true --create-namespace > /dev/null | ||
helm dependency update ./sequencer > /dev/null | ||
helm dependency update ./evm-stack > /dev/null | ||
|
||
echo "Setting up 3 astria sequencer nodes" | ||
echo "Setting up the first astria sequencers..." && helm install \ | ||
-n astria-validator-node0 node0-sequencer-chart ./sequencer \ | ||
-f ../dev/values/validators/all.yml \ | ||
-f ../dev/values/validators/node0.yml \ | ||
--set sequencer.optimisticBlockApis.enabled=true \ | ||
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \ | ||
--create-namespace > /dev/null | ||
|
||
echo "Setting up the second astria sequencer..." && helm install \ | ||
-n astria-validator-node1 node1-sequencer-chart ./sequencer \ | ||
-f ../dev/values/validators/all.yml \ | ||
-f ../dev/values/validators/node1.yml \ | ||
--set sequencer.optimisticBlockApis.enabled=true \ | ||
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \ | ||
--create-namespace > /dev/null | ||
|
||
echo "Setting up the third astria sequencer..." && helm install \ | ||
-n astria-validator-node2 node2-sequencer-chart ./sequencer \ | ||
-f ../dev/values/validators/all.yml \ | ||
-f ../dev/values/validators/node2.yml \ | ||
--set sequencer.optimisticBlockApis.enabled=true \ | ||
{{ if tag != '' { replace('--set images.sequencer.devTag=# --set sequencer-relayer.images.sequencerRelayer.devTag=#', '#', tag) } else { '' } }} \ | ||
--create-namespace > /dev/null | ||
Comment on lines
+27
to
+50
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could probably do this in a more concise way. |
||
|
||
just wait-for-sequencer > /dev/null | ||
echo "Starting Flame EVM rollup and the Auctioneer..." && helm install -n astria-dev-cluster astria-chain-chart ./evm-stack \ | ||
-f ../dev/values/rollup/auctioneer-test.yaml \ | ||
{{ if tag != '' { replace('--set evm-rollup.images.conductor.devTag=# --set auctioneer.images.auctioneer.devTag=# --set composer.images.composer.devTag=# --set evm-bridge-withdrawer.images.evmBridgeWithdrawer.devTag=#', '#', tag) } else { '' } }} \ | ||
--set blockscout-stack.enabled=false \ | ||
--set postgresql.enabled=false \ | ||
--set auctioneer.enabled=true \ | ||
--set config.geth.auctioneer=true \ | ||
--set evm-bridge-withdrawer.enabled=false \ | ||
--set evm-faucet.enabled=false > /dev/null | ||
# TODO - don't wait for evm-bridge-withdrawer | ||
just wait-for-rollup > /dev/null | ||
|
||
[no-cd] | ||
run tag=defaultTag: | ||
#!/usr/bin/env bash | ||
set +e | ||
echo "Running auctioneer smoke test 5 times..." | ||
echo | ||
|
||
success=0 | ||
for i in {1..5} ; do | ||
echo "Running test iteration $i..." | ||
echo | ||
|
||
echo "Getting initial balance of {{evm_destination_address}}" | ||
initial_balance=$(just evm-get-balance {{evm_destination_address}}) | ||
echo "Initial balance: $initial_balance" | ||
echo | ||
|
||
expected_balance=$(echo "$initial_balance + {{amount_to_send}}" | bc) | ||
|
||
docker run --rm \ | ||
--network host {{smoke_test_image}} \ | ||
--sequencer-url {{sequencer_grpc_url}} \ | ||
--eth-rpc-url {{eth_rpc_url}} \ | ||
--searcher-private-key {{searcher_private_key}} \ | ||
--rollup-name {{rollup_name}} \ | ||
--address-to-send {{evm_destination_address}} \ | ||
--amount-to-send {{amount_to_send}} \ | ||
|
||
if [ $? -ne 0 ]; then | ||
echo | ||
echo "Smoke test iteration $i failed!" | ||
echo | ||
continue | ||
fi | ||
|
||
echo | ||
echo "Getting final balance of {{evm_destination_address}}" | ||
final_balance=$(just evm-get-balance {{evm_destination_address}}) | ||
|
||
echo "Verifying if the final balance is as expected..." | ||
if [ "$final_balance" -eq "$expected_balance" ]; then | ||
(( success++ )) | ||
echo "Smoke test iteration $i passed!" | ||
else | ||
echo "Smoke test iteration $i failed!" | ||
echo "Expected balance: $expected_balance, Actual balance: $final_balance" | ||
fi | ||
echo | ||
done | ||
echo "Done with all iterations!" | ||
echo | ||
echo "Verifying if the smoke test passed at least 3 times..." | ||
echo | ||
echo "$success/5 tests has passed" | ||
if [ "$success" -gt 2 ]; then | ||
echo "Smoke test passed!" | ||
else | ||
echo "Smoke test failed!" | ||
exit 1 | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,8 @@ images: | |
auctioneer: | ||
repo: ghcr.io/astriaorg/auctioneer | ||
pullPolicy: IfNotPresent | ||
# TODO - update to latest tag | ||
tag: "pr-1839" | ||
devTag: "pr-1839" | ||
tag: sha-2db84ed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to merge #1972 for these changes to go into main. |
||
devTag: latest | ||
|
||
config: | ||
sequencerGrpcEndpoint: "" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ images: | |
repo: ghcr.io/astriaorg/flame | ||
pullPolicy: IfNotPresent | ||
tag: sha-457e1f9 | ||
devTag: sha-457e1f9 | ||
devTag: latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to merge #1972 for these changes to go into main. |
||
conductor: | ||
repo: ghcr.io/astriaorg/conductor | ||
pullPolicy: IfNotPresent | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed the image to my personal dockerhub account for the purpose of a POC. it should be trivial to move it to an ghcr/astria account.