Skip to content
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(testing): Task Sender / Stress Tester #1189

Merged
merged 111 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
012cf22
add task sender
PatStiles Oct 7, 2024
121dd87
add toolchain
PatStiles Oct 7, 2024
adf2257
feat(batcher-task-sender): only connect to server
MarcosNicolau Oct 8, 2024
98633d1
refactor: using tasks instead of theads as it is too much overhead
MarcosNicolau Oct 8, 2024
5a714b2
refactor: task sender to allow sending proofs and connections
MarcosNicolau Oct 8, 2024
5378710
chore: makefile test connections
MarcosNicolau Oct 8, 2024
8817c81
feat: action arg for generate-proofs, infinite-proofs, test-connection
MarcosNicolau Oct 8, 2024
7e5be9c
feat: clean proofs
MarcosNicolau Oct 8, 2024
fe52343
feat: multiple senders infinite-proofs
MarcosNicolau Oct 8, 2024
0055d01
fix: deposit to aligned
MarcosNicolau Oct 9, 2024
b31a095
fix: burst_size makefile
MarcosNicolau Oct 9, 2024
220df4e
feat: generate and fund wallets
MarcosNicolau Oct 9, 2024
23e967b
feat: loading wallets form files
MarcosNicolau Oct 9, 2024
a54ea3c
chore: address clippy warnings
MarcosNicolau Oct 9, 2024
654c0ec
chore: update task sender targets
MarcosNicolau Oct 9, 2024
963fcc3
fix: hang connections
MarcosNicolau Oct 9, 2024
c4a6c33
feat: params for deposit and number of proofs
MarcosNicolau Oct 9, 2024
87fce78
refactor: store private key as a string
MarcosNicolau Oct 9, 2024
15ac8a7
feat: read/write wallets from one file
MarcosNicolau Oct 9, 2024
73a7d19
chore: task sender for holesky
MarcosNicolau Oct 9, 2024
45ee17b
refactor(task-sender): add subcommands structs
MarcosNicolau Oct 10, 2024
bb927bc
reafactor(task-sender): commands
MarcosNicolau Oct 10, 2024
7fbc7ec
feat: accept output dir in generate groth16 proofs
MarcosNicolau Oct 10, 2024
274629b
reafactor(task-sender): main program calls lib
MarcosNicolau Oct 10, 2024
d0e3794
refactor(task-sender): get generated verification data and logs
MarcosNicolau Oct 10, 2024
451ebc2
fix(task-sender): commdands arguments
MarcosNicolau Oct 10, 2024
a4f2f9f
chore: task sender update makefile
MarcosNicolau Oct 10, 2024
b11baae
fix: makefile
uri-99 Oct 21, 2024
30ab36e
feat: add simple readme of stress tester
uri-99 Oct 21, 2024
ff4ca6e
fix: on commands.rs
uri-99 Oct 21, 2024
de2cc98
refactor: add `send` to infinite_proofs
uri-99 Oct 21, 2024
e94ac7c
Merge remote-tracking branch 'origin/staging' into 1015-task-sender
uri-99 Oct 21, 2024
46a7b6e
fix: task sender file and nonce reading
uri-99 Oct 21, 2024
0b10cd5
fix: get proofs until batch_size is filled
uri-99 Oct 22, 2024
5940660
fix: stress tester funding wallets in devnet
uri-99 Oct 23, 2024
d6f4a95
fix: on task sender
uri-99 Oct 23, 2024
4458e1d
feat: add devnet private keys
uri-99 Oct 23, 2024
fe29225
fix: comment on readme
uri-99 Oct 23, 2024
e678783
chore: clippy and fmt
MarcosNicolau Oct 23, 2024
8dc80d8
feat: add new types to ValidityResponseMessage
uri-99 Oct 24, 2024
6b707bf
Merge remote-tracking branch 'origin/1314-fix-sender-receive-batchinc…
uri-99 Oct 24, 2024
4665a82
chore: cargo lock
uri-99 Oct 24, 2024
4784118
fix: separate anvil_start_with_more_prefunded
uri-99 Oct 25, 2024
2a3b46c
fix: task sender readme
uri-99 Oct 25, 2024
115950d
remove: senders to holesky
uri-99 Oct 25, 2024
8011158
refactor: send_message, receive and process_batch_inclusion_data
uri-99 Oct 25, 2024
d78960e
refactor: new calls to refactored functions, avoiding 2 listening events
uri-99 Oct 25, 2024
9e9ab02
refactor: consolidate ValidityResponseMessage into ResponseMessage
uri-99 Oct 25, 2024
b64bcb6
fix: compilation errors
uri-99 Oct 25, 2024
c6fbc11
Merge branch '1314-fix-sender-receive-batchinclusiondata-or-createnew…
uri-99 Oct 25, 2024
88bc36f
feat: new version with tokio join
uri-99 Oct 28, 2024
5298915
feat: messaging.rs with channels for new version with join
uri-99 Oct 28, 2024
728c838
refactor: handle_batch_inclusion_data receives single element for new…
uri-99 Oct 28, 2024
b82ab64
Merge branch '1314-fix-sender-receive-batchinclusiondata-or-createnew…
uri-99 Oct 28, 2024
9643edc
fix: detail
uri-99 Oct 29, 2024
3266ade
fix: remove unpaying address from devnet wallets
uri-99 Oct 29, 2024
de91065
feat: start batcher without funding
uri-99 Oct 29, 2024
efbc46c
feat: add ReplacementMessageReceived msg from batcher
uri-99 Oct 29, 2024
ff9cf81
fix: detail on sdk
uri-99 Oct 29, 2024
ce07c08
feat: handle channel errors
uri-99 Oct 29, 2024
413d3cd
feat: sequencial send msg and recv response
uri-99 Nov 4, 2024
b04ce50
remove: replacement_message_received message
uri-99 Nov 4, 2024
2b21071
feat: add user_nonce on batch response
uri-99 Nov 4, 2024
666cfe5
refactor: send() and receive() to use storage instead of channel
uri-99 Nov 4, 2024
d66ed15
refactor: provess_batcher_response() and verify_proof_inclusion()
uri-99 Nov 4, 2024
1469c7d
Merge branch '1314-fix-sender-receive-batchinclusiondata-or-createnew…
uri-99 Nov 4, 2024
bcb68f5
fix: details on fund_devnet and read_proofs
uri-99 Nov 4, 2024
0de8d9b
feat: check latest nonce response to know when to cut the connection
uri-99 Nov 4, 2024
5c1bead
Merge branch '1314-fix-sender-receive-batchinclusiondata-or-createnew…
uri-99 Nov 4, 2024
95592ee
refactor: make fund devnet target
uri-99 Nov 4, 2024
18de39a
fix: better batcher log with nonce error
uri-99 Nov 4, 2024
f3bc8b7
feat: better tx revert error
uri-99 Nov 4, 2024
1026494
Merge branch '1314-fix-sender-receive-batchinclusiondata-or-createnew…
uri-99 Nov 4, 2024
57615c4
chore: improve comments
uri-99 Nov 5, 2024
42ec9f0
chore: cargo fmt
uri-99 Nov 5, 2024
b977c25
Merge branch 'staging' into 1314-fix-sender-receive-batchinclusiondat…
uri-99 Nov 5, 2024
2e94f49
chore: cargo clippy
uri-99 Nov 5, 2024
04db964
chore: update anvil states
uri-99 Nov 5, 2024
09c3813
fix: build anvil state with correct version
uri-99 Nov 5, 2024
a205f34
Merge branch '1314-fix-sender-receive-batchinclusiondata-or-createnew…
uri-99 Nov 5, 2024
ca51f3d
chore: details
uri-99 Nov 5, 2024
0ced4dc
chore: devnet wallets
uri-99 Nov 5, 2024
d944f4f
fix: use correct ethers version in sender
uri-99 Nov 5, 2024
397a4f7
fix: remove dead make target
uri-99 Nov 5, 2024
cc0f71a
remove: unused struct
uri-99 Nov 5, 2024
c8ea291
chore: cargo fmt in task-sender
uri-99 Nov 5, 2024
8a0aa67
chore: cargo clippy
uri-99 Nov 5, 2024
c0390b1
Fix Typo
MauroToscano Nov 6, 2024
1d96ddc
refactor: reverse sent_verification_data array for cheaper remove
uri-99 Nov 7, 2024
8305ddc
chore: cargo.lock
uri-99 Nov 7, 2024
4a6c6ca
refactor: better logs
uri-99 Nov 7, 2024
5a43143
feat: build and return array of results instead of result<vec,err>
uri-99 Nov 7, 2024
688b017
Merge branch 'staging' into 1314-fix-sender-receive-batchinclusiondat…
uri-99 Nov 7, 2024
e513997
fix: non paying case
uri-99 Nov 7, 2024
91ba39a
chore: cargo fmt
uri-99 Nov 7, 2024
446c4a7
fix: 2 send target2 bugs
uri-99 Nov 8, 2024
222b7c6
chore: cargo clippy
uri-99 Nov 8, 2024
2a537be
chore: cargo fmt
uri-99 Nov 8, 2024
3030f1e
docs: update docs
avilagaston9 Nov 8, 2024
5c6c776
chore: comments on cut condition
uri-99 Nov 11, 2024
e4e58c0
Merge branch '1314-fix-sender-receive-batchinclusiondata-or-createnew…
uri-99 Nov 11, 2024
624602e
fix: compatibility with base branch
uri-99 Nov 11, 2024
51663d6
chore: cargo.lock
uri-99 Nov 11, 2024
176f19c
Merge branch 'staging' into 1015-task-sender
uri-99 Nov 11, 2024
761e1df
chore: cargo lock
uri-99 Nov 11, 2024
7d47a69
refactor: make target send_inf_proofs
uri-99 Nov 12, 2024
cee9553
Merge branch 'staging' into 1015-task-sender
uri-99 Nov 12, 2024
dee5570
chore: details and compatibility
uri-99 Nov 12, 2024
34998e3
refactor: add `accounts` to make target
uri-99 Nov 13, 2024
bdc09cb
chore: cargo
uri-99 Nov 13, 2024
7bce519
refactor: await all handles
uri-99 Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 86 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ anvil_start_with_block_time:
@echo "Starting Anvil..."
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7

anvil_start_with_block_time_with_more_prefunded_accounts:
@echo "Starting Anvil..."
anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000

_AGGREGATOR_:

aggregator_start:
Expand Down Expand Up @@ -280,7 +284,7 @@ verifier_disable:

__BATCHER__:

BURST_SIZE=5
BURST_SIZE ?= 5

user_fund_payment_service:
@. ./scripts/user_fund_payment_service_devnet.sh
Expand All @@ -297,6 +301,11 @@ batcher_start_local: user_fund_payment_service
@$(MAKE) run_storage &
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env.dev

batcher_start_local_no_fund:
@echo "Starting Batcher..."
@$(MAKE) run_storage &
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env.dev

install_batcher:
@cargo install --path batcher/aligned-batcher

Expand Down Expand Up @@ -444,6 +453,82 @@ batcher_send_burst_groth16: batcher/target/release/aligned
@mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs
@./batcher/aligned/send_burst_tasks.sh $(BURST_SIZE) $(START_COUNTER)


__TASK_SENDER__:
BURST_TIME_SECS ?= 3

task_sender_generate_groth16_proofs:
@cd batcher/aligned-task-sender && \
cargo run --release -- generate-proofs \
--number-of-proofs $(NUMBER_OF_PROOFS) --proof-type groth16 \
--dir-to-save-proofs $(CURDIR)/scripts/test_files/task_sender/proofs

# ===== DEVNET =====
task_sender_fund_wallets_devnet:
@cd batcher/aligned-task-sender && \
cargo run --release -- generate-and-fund-wallets \
--eth-rpc-url http://localhost:8545 \
--network devnet \
--amount-to-deposit 1 \
--amount-to-deposit-to-aligned 0.9999 \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/devnet

task_sender_send_infinite_proofs_devnet:
@cd batcher/aligned-task-sender && \
cargo run --release -- send-infinite-proofs \
--burst-size $(BURST_SIZE) --burst-time-secs $(BURST_TIME_SECS) \
--eth-rpc-url http://localhost:8545 \
--batcher-url ws://localhost:8080 \
--network devnet \
--proofs-dirpath $(CURDIR)/scripts/test_files/task_sender/proofs \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/devnet

task_sender_test_connections_devnet:
@cd batcher/aligned-task-sender && \
cargo run --release -- test-connections \
--batcher-url ws://localhost:8080 \
--num-senders $(NUM_SENDERS)

# ===== HOLESKY-STAGE =====
task_sender_generate_and_fund_wallets_holesky_stage:
@cd batcher/aligned-task-sender && \
cargo run --release -- generate-and-fund-wallets \
--eth-rpc-url https://ethereum-holesky-rpc.publicnode.com \
--network holesky-stage \
--funding-wallet-private-key $(FUNDING_WALLET_PRIVATE_KEY) \
--number-wallets $(NUM_WALLETS) \
--amount-to-deposit $(AMOUNT_TO_DEPOSIT) \
--amount-to-deposit-to-aligned $(AMOUNT_TO_DEPOSIT_TO_ALIGNED) \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/holesky-stage

task_sender_send_infinite_proofs_holesky_stage:
@cd batcher/aligned-task-sender && \
cargo run --release -- send-infinite-proofs \
--burst-size $(BURST_SIZE) --burst-time-secs $(BURST_TIME_SECS) \
--eth-rpc-url https://ethereum-holesky-rpc.publicnode.com \
--batcher-url wss://stage.batcher.alignedlayer.com \
--network holesky-stage \
--proofs-dirpath $(CURDIR)/scripts/test_files/task_sender/proofs \
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/holesky-stage

task_sender_test_connections_holesky_stage:
@cd batcher/aligned-task-sender && \
cargo run --release -- test-connections \
--batcher-url wss://stage.batcher.alignedlayer.com \
--num-senders $(NUM_SENDERS)

__UTILS__:
aligned_get_user_balance_devnet:
@cd batcher/aligned/ && cargo run --release -- get-user-balance \
--user_addr $(USER_ADDR)

aligned_get_user_balance_holesky:
@cd batcher/aligned/ && cargo run --release -- get-user-balance \
--rpc_url https://ethereum-holesky-rpc.publicnode.com \
--network holesky \
--user_addr $(USER_ADDR)


__GENERATE_PROOFS__:
# TODO add a default proving system

Expand Down
Loading
Loading