Skip to content
Draft
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
84 changes: 84 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,97 @@ jobs:
- name: Run tests
run: cargo nextest run --profile ci

txgen-e2e-spam:
name: txgen L2 transfer spam
runs-on: depot-ubuntu-latest-16
timeout-minutes: 45
permissions:
contents: read
outputs:
comment_body: ${{ steps.spam.outputs.comment_body }}
env:
RUSTC_WRAPPER: ""
TXGEN_DIR: ${{ github.workspace }}/txgen
L1_HTTP_URL: http://127.0.0.1:8545
COUNT: "5000"
TPS: "1000"
MAX_CONCURRENT: "2000"
DRAIN_TIMEOUT: "240"
SYNC_TIMEOUT: "300"
TXGEN_NONCE_LANES: "1000000"
TXGEN_TRANSFER_ACCOUNTS: "8"
TXGEN_DEPOSIT_AMOUNT: "5000000000"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
submodules: recursive

- name: Checkout txgen
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: tempoxyz/txgen
ref: b8776357c3a16d494d2d482b19d19adab1421235
path: txgen
persist-credentials: false

- uses: tempoxyz/gh-actions/actions/setup-rust-build@98b1081dcf34361b576aca2ab3041772708582ef
with:
toolchain: stable
sccache: "false"

- name: Install Foundry
uses: tempoxyz/gh-actions/actions/setup-foundry@98b1081dcf34361b576aca2ab3041772708582ef
with:
version: nightly

- name: Build and run txgen L2 transfer spam
id: spam
run: scripts/ci-txgen-e2e-spam.sh

- name: Upload txgen reports and node logs
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: txgen-e2e-spam-${{ github.run_attempt }}
path: ${{ runner.temp }}/txgen-e2e
if-no-files-found: warn
retention-days: 14

txgen-e2e-comment:
name: txgen spam PR comment
runs-on: ubuntu-latest
if: >-
always() &&
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
needs:
- txgen-e2e-spam
timeout-minutes: 5
permissions:
contents: read
pull-requests: write
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
COMMENT_BODY: ${{ needs.txgen-e2e-spam.outputs.comment_body }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Create or update txgen result comment
run: scripts/ci-txgen-e2e-comment.sh

test-success:
name: test success
runs-on: ubuntu-latest
if: always()
permissions: {}
needs:
- test
- txgen-e2e-spam
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ metrics = "0.24.3"
k256 = { version = "0.13.4", features = ["arithmetic", "ecdh"] }
parking_lot = "0.12.4"
p256 = { version = "0.13.2", default-features = false, features = ["ecdsa"] }
proptest = "1.11.0"
rand = "0.8.5"
sha2 = "0.10.9"
rayon = "1.10"
Expand Down
5 changes: 5 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,11 @@ spam-deposits total="20" per-block="10" amount="1000000" encrypted="" token="0x2
fi
cargo run -p tempo-xtask -- spam-deposits --private-key "$PK" $ARGS

[group('zone')]
[doc('Spam randomized multi-sender L2 TIP-20 transfers against tempo-zone dev and report sustained TPS.')]
txgen-e2e-spam count="5000" tps="1000":
COUNT="{{count}}" TPS="{{tps}}" scripts/txgen-e2e-spam.sh

[group('zone')]
[doc('Runs the full TIP-20 + TIP-403 blacklist demo: creates token, enables on zone, blacklists address, shows deposit bounce, unblacklists, shows deposit success, withdraws. Requires PRIVATE_KEY for the token admin/depositor, L1_PORTAL_ADDRESS, and portal admin authority via ADMIN_KEY or matching generated/<name>/zone.json adminKey.')]
demo-blacklist amount="500000" rpc=zone_rpc zone-dir="":
Expand Down
1 change: 1 addition & 0 deletions crates/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const-hex.workspace = true
commonware-codec.workspace = true
commonware-cryptography.workspace = true
p256.workspace = true
proptest.workspace = true
rand.workspace = true
reth-ethereum = { workspace = true, features = ["node", "test-utils"] }
reth-node-core.workspace = true
Expand Down
Loading
Loading