Skip to content

Commit bf6b905

Browse files
kirill lykovfkouteib
authored andcommitted
reduce CU budget and increase accounts number (anza-xyz#297)
* reduce CU budget and increase accounts number * add constants to the attack plan
1 parent 0150d80 commit bf6b905

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

adversary/scripts/testplan/private-testnet.sh

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,34 +54,40 @@ run_attacks_all() {
5454
attack_replayStage readMaxAccounts
5555
attack_replayStage writeMaxAccounts
5656
# attacks that execute deployed program
57-
# 6 comes from one tx can load up to 64MB
57+
# how many transactions can be processes in parallel by one replay thread.
58+
local BATCH_SIZE=64
59+
# One tx can load up to 64MB, each account is 10MB.
60+
# Hence, 6 is max value we can use.
61+
local NUM_ACCOUNTS_PER_TX=6
62+
# Transaction budget to prevent transaction from being successful.
63+
# Required because `use-failed-transaction-hotpath` txs must not succeed.
64+
local INSUFFICIENT_CU_BUDGET=100
5865
# Temporarily disabled because this causes multiple minute slot times until we
5966
# start constraining max account load size
6067
# attack_replayStage writeProgram \
61-
# --transaction-batch-size 64 \
62-
# --num-accounts-per-tx 6 \
63-
# --transaction-cu-budget 100 \
68+
# --transaction-batch-size ${BATCH_SIZE} \
69+
# --num-accounts-per-tx ${NUM_ACCOUNTS_PER_TX} \
70+
# --transaction-cu-budget ${INSUFFICIENT_CU_BUDGET} \
6471
# --use-failed-transaction-hotpath
6572
# Temporarily disabled because this causes multiple minute slot times until we
6673
# start constraining max account load size
6774
# attack_replayStage readProgram \
68-
# --transaction-batch-size 64 \
69-
# --num-accounts-per-tx 6 \
70-
# --transaction-cu-budget 100 \
75+
# --transaction-batch-size ${BATCH_SIZE} \
76+
# --num-accounts-per-tx ${NUM_ACCOUNTS_PER_TX} \
77+
# --transaction-cu-budget ${INSUFFICIENT_CU_BUDGET} \
7178
# --use-failed-transaction-hotpath
7279
# for txs to succeed we need at least 176k CU
73-
# for use-failed-transaction-hotpath txs must not succeed
7480
attack_replayStage recursiveProgram \
75-
--transaction-batch-size 64 \
76-
--num-accounts-per-tx 1 \
77-
--transaction-cu-budget 100000 \
81+
--transaction-batch-size ${BATCH_SIZE} \
82+
--num-accounts-per-tx ${NUM_ACCOUNTS_PER_TX} \
83+
--transaction-cu-budget ${INSUFFICIENT_CU_BUDGET} \
7884
--use-failed-transaction-hotpath
7985
# attack that executes numerous deployed programs
8086
# which triggers recompilations
8187
attack_replayStage coldProgramCache \
82-
--transaction-batch-size 64 \
83-
--num-accounts-per-tx 1 \
84-
--transaction-cu-budget 20000 \
88+
--transaction-batch-size ${BATCH_SIZE} \
89+
--num-accounts-per-tx ${NUM_ACCOUNTS_PER_TX} \
90+
--transaction-cu-budget ${INSUFFICIENT_CU_BUDGET} \
8591
--use-failed-transaction-hotpath
8692

8793
attack_delayBroadcast

0 commit comments

Comments
 (0)