diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4eedfd..856616d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,3 +74,5 @@ jobs: steps: - uses: actions/checkout@v4 - uses: EmbarkStudios/cargo-deny-action@v2 + with: + command: check licenses diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f8ff31..ad9b4d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,8 +37,13 @@ jobs: if: matrix.arch == 'arm64' run: | sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu protobuf-compiler + sudo apt-get install -y gcc-aarch64-linux-gnu protobuf-compiler libssl-dev pkg-config + sudo dpkg --add-architecture arm64 echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV" + echo "OPENSSL_DIR=/usr" >> "$GITHUB_ENV" + echo "OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu" >> "$GITHUB_ENV" + echo "OPENSSL_INCLUDE_DIR=/usr/include" >> "$GITHUB_ENV" + echo "OPENSSL_STATIC=1" >> "$GITHUB_ENV" - name: Install protoc if: matrix.arch == 'amd64' diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c272dfb --- /dev/null +++ b/LICENSE @@ -0,0 +1,65 @@ +Business Source License 1.1 + +License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. +"Business Source License" is a trademark of MariaDB Corporation Ab. + +----------------------------------------------------------------------------- + +Parameters + +Licensor: Don Johnson + +Licensed Work: GasHammer + The Licensed Work is (c) 2025-present Don Johnson + +Additional Use Grant: None + +Change Date: Four years from the date the Licensed Work is published. + +Change License: Apache License, Version 2.0 + +----------------------------------------------------------------------------- + +Terms + +The Licensor hereby grants you the right to copy, modify, create derivative +works, redistribute, and make non-production use of the Licensed Work. The +Licensor may make an Additional Use Grant, above, permitting limited +production use. + +Effective on the Change Date, or the fourth anniversary of the first publicly +available distribution of a specific version of the Licensed Work under this +License, whichever comes first, the Licensor hereby grants you rights under +the terms of the Change License, and the rights granted in the paragraph +above terminate. + +If your use of the Licensed Work does not comply with the requirements +currently in effect as described in this License, you must purchase a +commercial license from the Licensor, its affiliated entities, or authorized +resellers, or you must refrain from using the Licensed Work. + +All copies of the original and modified Licensed Work, and derivative works +of the Licensed Work, are subject to this License. This License applies +separately for each version of the Licensed Work and the Change Date may vary +for each version of the Licensed Work released by Licensor. + +You must conspicuously display this License on each original or modified copy +of the Licensed Work. If you receive the Licensed Work in original or +modified form from a third party, the terms and conditions set forth in this +License apply to your use of that work. + +Any use of the Licensed Work in violation of this License will automatically +terminate your rights under this License for the current and all other +versions of the Licensed Work. + +This License does not grant you any right in any trademark or logo of +Licensor or its affiliates (provided that you may use a trademark or logo of +Licensor as expressly required by this License). + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +TITLE. + +GasHammer is a registered trademark of Don Johnson. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c6846e1 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# GasHammer + +**Adversarial load-testing and correctness-verification platform for Arbitrum Nitro rollup infrastructure.** + +[![CI](https://github.com/copyleftdev/gashammer/actions/workflows/ci.yml/badge.svg)](https://github.com/copyleftdev/gashammer/actions/workflows/ci.yml) +[![Docs](https://github.com/copyleftdev/gashammer/actions/workflows/docs.yml/badge.svg)](https://copyleftdev.github.io/gashammer/) +[![License: BSL-1.1](https://img.shields.io/badge/License-BSL--1.1-blue.svg)](LICENSE) + +GasHammer stress-tests Nitro rollup deployments by generating realistic, gas-modeled transaction workloads and verifying correctness invariants under load. It interacts with Nitro exclusively through wire protocols (JSON-RPC, WebSocket feed, gRPC) — no internal linking against Nitro. + +## Key Capabilities + +- **Gas-first workload modeling** — workloads defined by target gas/sec, not requests/sec +- **Deterministic reproducibility** — seeded PRNGs produce identical transaction sequences +- **Correctness verification** — oracle checks invariants (balance conservation, nonce monotonicity, gas accounting) +- **Fault injection** — controlled network faults via tc netem and iptables +- **Capacity envelope** — find the safe operating range with ramp-to-saturation scenarios +- **Regression detection** — compare runs against baselines for release gating + +## Architecture + +``` + ┌──────────────┐ + │ Hive │ Control plane + │ REST + gRPC │ + └──────┬───────┘ + │ + ┌────────────┼────────────┐ + │ │ │ + ┌─────┴─────┐┌────┴──────┐┌────┴──────┐ + │ Edge A ││ Edge B ││ Edge N │ Workers + └─────┬─────┘└────┬──────┘└────┬──────┘ + └───────────┼────────────┘ + │ + ┌─────┴──────┐ + │ Nitro │ System under test + └────────────┘ +``` + +## Quick Start + +```bash +cargo build --workspace +cargo test --workspace +``` + +See the [documentation](https://copyleftdev.github.io/gashammer/) for installation, configuration, and scenario authoring guides. + +## Workspace Crates + +| Crate | Purpose | +|-------|---------| +| `gashammer-common` | Shared types, error codes, build info | +| `gashammer-nitro` | RPC, WebSocket feed, L1 contract readers | +| `gashammer-edge` | Edge worker runtime and binary | +| `gashammer-hive` | Hive control plane and binary | +| `gashammer-workload` | Gas-rate engine, tx templates, account pool | +| `gashammer-telemetry` | Event model, pipeline, Parquet storage | +| `gashammer-oracle` | Correctness invariants and verdicts | +| `gashammer-fault` | Fault injection (netem, iptables) | +| `gashammer-report` | Capacity envelope, regression detection | +| `gashammer-scenario` | SDL parser, validator, compiler | +| `gashammer-docgen` | Source-to-mdBook documentation engine | +| `gashammer-testenv` | Testcontainers Nitro devnet orchestrator | + +## Documentation + +Full documentation is available at **[copyleftdev.github.io/gashammer](https://copyleftdev.github.io/gashammer/)**. + +Design specifications live in `rfcs/` (RFC-0001 through RFC-0013). + +## Acknowledgments + +GasHammer targets [Arbitrum Nitro](https://github.com/OffchainLabs/nitro) by [Offchain Labs](https://offchainlabs.com/). Recognition to [@PlasmaPower](https://github.com/PlasmaPower) (Lee Bousfield) and the Offchain Labs engineering team for building Nitro and making the protocol surface well-documented and testable. + +## License + +Licensed under the [Business Source License 1.1](LICENSE). GasHammer is a registered trademark of Don Johnson. diff --git a/deny.toml b/deny.toml index 450a1e2..25d18d6 100644 --- a/deny.toml +++ b/deny.toml @@ -1,6 +1,8 @@ [advisories] vulnerability = "deny" unmaintained = "warn" +yanked = "warn" +ignore = [] [licenses] allow = [ @@ -11,6 +13,11 @@ allow = [ "ISC", "Unicode-3.0", "Unicode-DFS-2016", + "BSL-1.1", + "OpenSSL", + "Zlib", + "MPL-2.0", + "CC0-1.0", ] confidence-threshold = 0.8