Skip to content

test: L2 chain-specific threshold signing test suite#6

Open
abhicris wants to merge 3 commits intoluxfi:mainfrom
kcolbchain:feat/l2-chain-tests
Open

test: L2 chain-specific threshold signing test suite#6
abhicris wants to merge 3 commits intoluxfi:mainfrom
kcolbchain:feat/l2-chain-tests

Conversation

@abhicris
Copy link
Copy Markdown

Summary

Adds a comprehensive test suite validating threshold signature behavior across major Ethereum L2s: Arbitrum One, Optimism, Base, Scroll, zkSync Era, and Linea.

Tests added

Test What it validates
TestL2ChainConfigs All L2 chain configs are correctly registered with right chain IDs
TestL2EthereumAdapterChainID Adapter correctly switches chain ID for each L2
TestL2LegacyTransactionDigest EIP-155 replay protection produces unique digests per chain
TestL2EIP1559TransactionDigest EIP-1559 tx digests are chain-specific
TestL2CrossChainReplayProtection Critical: same tx on different chains = different digests (no replay)
TestL2GasEstimation Gas estimation works across all L2 chains
TestL2ChainIDEdgeCases Zero and very large chain IDs handled correctly

All 36 assertions pass across 6 L2 chains.

Why this matters

Threshold signatures for L2s are increasingly important as MPC wallets expand to multi-chain. This test suite ensures:

  1. No cross-chain replay vulnerabilities when signing for L2s
  2. Chain configs are correct for production deployment
  3. EIP-1559 and legacy tx types both work per-chain

About

Contributed by kcolbchain — independent blockchain research collective (est. 2015) focused on L2 infrastructure, security, and protocol design.

hanzo-dev and others added 3 commits April 7, 2026 00:00
Validates threshold signature behavior across major Ethereum L2s:
Arbitrum, Optimism, Base, Scroll, zkSync Era, Linea.

Tests:
- L2 chain config correctness (chain IDs, EIP-1559 support, L2 flags)
- Ethereum adapter chain ID switching for each L2
- Legacy transaction digest with EIP-155 replay protection per L2
- EIP-1559 transaction digest per L2
- Cross-chain replay protection (critical: same tx must produce
  different digests on different chains)
- Gas estimation across L2 chains
- Chain ID edge cases (zero, very large)

All 6 L2s × 6 test categories = 36 assertions, all passing.

Contributed by kcolbchain (https://kcolbchain.com)
zeekay pushed a commit that referenced this pull request Apr 23, 2026
The `Lint` job has been failing on master with:

    can't load config: the Go language version (go1.24) used to build
    golangci-lint is lower than the targeted Go version (1.26.1)

Root cause: `.github/workflows/ci.yml` used
`golangci/golangci-lint-action@v6` with `version: latest`, which resolves
to `golangci-lint v1.64.8`. That binary is built with Go 1.24, while
`go.mod` targets `go 1.26.1`. golangci-lint refuses to load the config
when the build-time Go version is lower than the `run.go` target it
infers from `go.mod`.

Minimal fix:

- Add `run.go: "1.24"` to `.golangci.yml` so the version check sees a
  target equal to the build version and proceeds.
- Pin `golangci-lint-action` to `version: v1.64.8` explicitly. The v1
  config format we use today is not parsed by golangci-lint v2.x, so
  future drift of `latest` onto v2 would silently break us again.

Non-goals: migrating `.golangci.yml` to the v2 schema. That is a
separate, larger PR once a golangci-lint release built with Go 1.26 is
available.

This unblocks stalled docs PRs: #6, #7, #8 (all UNSTABLE purely because
of this lint failure on master).

— [kcolbchain](https://kcolbchain.com) / [Abhishek Krishna](https://abhishekkrishna.com)
@hanzo-dev hanzo-dev force-pushed the main branch 6 times, most recently from cda4729 to 64b875c Compare May 4, 2026 06:17
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