Skip to content

feat: consolidate Zone scenario support#170

Draft
Zygimantass wants to merge 47 commits into
mainfrom
amp/zones-txgen-consolidated
Draft

feat: consolidate Zone scenario support#170
Zygimantass wants to merge 47 commits into
mainfrom
amp/zones-txgen-consolidated

Conversation

@Zygimantass

Copy link
Copy Markdown
Member

Summary

Consolidates the currently open Zone-related txgen work into one integration branch:

Also resolves the integration conflict so adapter scenario actions use the chain's query provider.

Validation

  • cargo +nightly fmt --all -- --check
  • cargo test -p txgen-cli --lib (106 passed)
  • cargo test -p txgen-tempo --lib (43 passed, 1 ignored)
  • cargo test -p txgen-ethereum
  • cargo build -p txgen-tempo --bin txgen-tempo
  • git diff --check

Follow-up

The workflows integration will target zone-unstable (Zone ID 2, chain ID 421700002). Its public RPC is used for queries and its authenticated private RPC for submissions.

Rjected and others added 30 commits July 20, 2026 14:40
# Conflicts:
#	Cargo.lock
#	README.md
#	crates/bench-core/src/lib.rs
#	crates/bench-core/src/sender.rs
#	crates/txgen-ethereum/src/lib.rs
#	crates/txgen-tempo/Cargo.toml
Route sender-scoped scenario requests through per-chain authenticated submission endpoints while keeping checkpoint and log queries on query RPCs.\n\nWrite reports before returning a failed exit status, and preflight sender authentication before setup dispatch.
- add a chain-neutral scenario `invoke` step for adapter-defined,
query-only actions
- add Tempo's `prepare_encrypted_deposit`, matching viem's
`zone.encryptedDeposit.prepareRecipient` input/output shape and ECIES
format
- allow named or positional Solidity tuple arguments so the returned
`encrypted` object can flow directly into `depositEncrypted`
- validate fixed-size ABI byte lengths instead of padding, truncating,
or panicking

For every invocation, txgen:

1. reads `encryptionKeyCount()` and `sequencerEncryptionKey()` from the
active ZonePortal
2. derives `keyIndex = count - 1`, retrying if the key rotates between
reads
3. creates a fresh secp256k1 ephemeral key and 12-byte nonce from
`OsRng`
4. derives the AES-256-GCM key using the same ECDH/HKDF inputs as viem
and Zones
5. returns viem-compatible `chainId`, `encrypted`, `keyIndex`,
`portalAddress`, and `zoneId` fields

The deterministic crypto test uses a cross-language vector, and the RPC
tests cover active-key lookup and the no-key failure path.

```yaml
- invoke:
    chain: l1
    action: prepare_encrypted_deposit
    with:
      recipient: { var: user.address }
      zoneId: 9
      portalAddress: ${ZONE_PORTAL_ADDRESS}
  save: prepared

- submit:
    chain: l1
    template: encrypted_deposit
    with:
      call:
        args:
          - ${TOKEN_ADDRESS}
          - 1000000
          - { var: prepared.keyIndex }
          - { var: prepared.encrypted }
```

- `cargo +nightly fmt --all -- --check`
- `cargo test --workspace`
- `cargo clippy --workspace --all-targets -- -D warnings`

This targets `dan/zones-716-txgen` because it depends on the multi-chain
scenario engine currently under review in #157. It can be
rebased/retargeted after that stack lands.
Rjected and others added 17 commits July 22, 2026 15:41
…lure-fixes

# Conflicts:
#	crates/txgen-cli/src/scenario/mod.rs
…eporting

# Conflicts:
#	README.md
#	crates/txgen-cli/src/scenario/report.rs
… into amp/zones-txgen-consolidated

# Conflicts:
#	Cargo.lock
#	README.md
#	crates/bench-core/src/lib.rs
#	crates/bench-core/src/sender.rs
#	crates/txgen-ethereum/src/lib.rs
#	crates/txgen-tempo/Cargo.toml
… into amp/zones-txgen-consolidated

# Conflicts:
#	README.md
#	crates/bench-core/src/sender.rs
#	crates/txgen-cli/src/scenario/composition.rs
#	crates/txgen-cli/src/scenario/mod.rs
… amp/zones-txgen-consolidated

# Conflicts:
#	crates/txgen-cli/src/scenario/schema.rs
#	crates/txgen-tempo/src/lib.rs
…nto amp/zones-txgen-consolidated

# Conflicts:
#	crates/txgen-cli/src/scenario/engine.rs
Consolidate the open Zone txgen changes and route adapter invocations through the query provider.
…lidated

# Conflicts:
#	crates/txgen-cli/src/scenario/schema.rs
#	crates/txgen-cli/src/scenario/value.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants