Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/bench-e2e-scheduled.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Scheduled e2e regression benchmarks.
#
# Runs nightly at 02:00 UTC and on v*.*.* tag pushes for the tip20 preset.
# Runs nightly at 02:00 UTC and on v*.*.* tag pushes for each preset below.
# Nightly runs compare the latest main commit against the
# last commit that completed this scheduled e2e workflow successfully for the
# same preset.
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
INPUT_FORCE: ${{ inputs.force || 'false' }}
INPUT_REF: ${{ inputs.ref || '' }}
run: |
presets=(tip20)
presets=(tip20 tip20_existing_recipients)
bench_entries=()
save_entries=()
stale_presets=()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bench-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ on:
description: Benchmark preset.
type: choice
required: true
default: tip20
default: tip20_existing_recipients
options:
- tip20
- tip20_2d_nonces
Expand Down Expand Up @@ -178,7 +178,7 @@ on:
preset:
type: string
required: false
default: tip20
default: tip20_existing_recipients
duration:
type: string
required: false
Expand Down
17 changes: 17 additions & 0 deletions contrib/bench/txgen/helpers.nu
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ const TXGEN_HELPER_PRESETS_DIR = "contrib/bench/txgen/presets"
const TXGEN_HELPER_EXISTING_RECIPIENTS_PRESETS = ["tip20_existing_recipients" "tip20_2d_nonces"]
const TXGEN_HELPER_EXISTING_RECIPIENTS_START = 10000

def txgen-tip20-token-address [token_id: int] {
^printf "0x20c000000000000000000000%016x" $token_id
}

def txgen-tip20-token-choices [token_count: int] {
if $token_count <= 0 {
error make { msg: "TIP20 token count must be greater than zero" }
}

0..<$token_count | each { |id| txgen-tip20-token-address $id } | to json -r
}

def --env txgen-configure-tip20-token-env [token_count: int] {
$env.TXGEN_TIP20_TOKENS = (txgen-tip20-token-choices $token_count)
}

def txgen-shell-quote [value: any] {
let s = ($value | into string)
let escaped = ($s | str replace -a "'" "'\"'\"'")
Expand Down Expand Up @@ -258,6 +274,7 @@ def txgen-run-preset-pipeline [
if not ($spec_path | path exists) {
error make { msg: $"txgen preset file not found: ($spec_path)" }
}
txgen-configure-tip20-token-env $bloat_token_count
txgen-configure-existing-recipients-env $spec_path $bloat_mib $bloat_token_count
if not $skip_funding {
txgen-fund-accounts $txgen_tempo_bin $spec_path $generate_rpc_url
Expand Down
3 changes: 2 additions & 1 deletion contrib/bench/txgen/presets/mix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ templates:
expiring_nonce: true
valid_for_secs: 25
call:
to: "0x20c0000000000000000000000000000000000000"
to:
choice: ${TXGEN_TIP20_TOKENS}
abi: ERC20
function: transfer
args:
Expand Down
4 changes: 2 additions & 2 deletions contrib/bench/txgen/presets/tip20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ templates:
expiring_nonce: true
valid_for_secs: 5
call:
to: "0x20c0000000000000000000000000000000000000"
to:
choice: ${TXGEN_TIP20_TOKENS}
abi: ERC20
function: transfer
args:
Expand All @@ -39,4 +40,3 @@ templates:
mix:
- template: tip20_transfer
weight: 100

3 changes: 2 additions & 1 deletion contrib/bench/txgen/presets/tip20_2d_nonces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ templates:
nonce_key:
uniform: [1, 18446744073709551615]
call:
to: "0x20c0000000000000000000000000000000000000"
to:
choice: ${TXGEN_TIP20_TOKENS}
abi: ERC20
function: transfer
args:
Expand Down
3 changes: 2 additions & 1 deletion contrib/bench/txgen/presets/tip20_existing_recipients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ templates:
expiring_nonce: true
valid_for_secs: 5
call:
to: "0x20c0000000000000000000000000000000000000"
to:
choice: ${TXGEN_TIP20_TOKENS}
abi: ERC20
function: transfer
args:
Expand Down
3 changes: 2 additions & 1 deletion contrib/bench/txgen/presets/tip20_random_recipients.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ templates:
expiring_nonce: true
valid_for_secs: 5
call:
to: "0x20c0000000000000000000000000000000000000"
to:
choice: ${TXGEN_TIP20_TOKENS}
abi: ERC20
function: transfer
args:
Expand Down
5 changes: 4 additions & 1 deletion tempo.nu
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ def run-bench-single [
--git-ref $git_ref
--build-profile $build_profile
--benchmark-mode $benchmark_mode
--bloat-token-count ($TIP20_TOKEN_IDS | length)
--skip-funding=($bloat > 0))
if not $result.ok {
print $" Benchmark run ($run_label) failed with exit code ($result.exit_code)"
Expand Down Expand Up @@ -2911,6 +2912,7 @@ def "main bench" [
--git-ref $current_sha
--build-profile $profile
--benchmark-mode $mode
--bloat-token-count ($TIP20_TOKEN_IDS | length)
--skip-funding=($bloat > 0))
$result
} catch { |e|
Expand Down Expand Up @@ -3323,7 +3325,8 @@ tempo-precompiles = { path = '($tempo_root)/crates/precompiles' }
--accounts $accounts
--max-concurrent-requests 100
--build-profile "coverage"
--benchmark-mode "coverage")
--benchmark-mode "coverage"
--bloat-token-count ($TIP20_TOKEN_IDS | length))
if not $bench_result.ok {
print "Bench finished (or interrupted)."
}
Expand Down
Loading