Skip to content

Commit fc253e1

Browse files
authored
Merge pull request #208 from PracticalParticle/dev
Dev
2 parents a5825e6 + 4b584ff commit fc253e1

20 files changed

Lines changed: 178 additions & 56 deletions

.github/workflows/particle-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
- name: Checkout code
2020
uses: actions/checkout@v4
2121

22-
# Step 2: Setup Node.js (must satisfy engines.node >=18.20.5 with engine-strict)
22+
# Step 2: Setup Node.js (must satisfy root engines.node with engine-strict)
2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: '20'
26+
node-version: '22'
2727
cache: 'npm'
2828

2929
# Step 3: Install dependencies

.github/workflows/release-please.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,13 @@ jobs:
1717
outputs:
1818
release_created: ${{ steps.release.outputs.release_created }}
1919
tag_name: ${{ steps.release.outputs.tag_name }}
20-
20+
2121
steps:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
2626

27-
- name: Setup Node.js
28-
uses: actions/setup-node@v4
29-
with:
30-
node-version: '20'
31-
cache: 'npm'
32-
33-
- name: Install dependencies
34-
run: npm ci
35-
3627
- name: Run release-please
3728
id: release
3829
uses: google-github-actions/release-please-action@v4

.github/workflows/sync-contract-versions.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ jobs:
2626
- name: Setup Node.js
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: '20'
30-
cache: 'npm'
31-
32-
- name: Install dependencies
33-
run: npm ci
29+
node-version: '22'
3430

3531
- name: Verify EngineBlox.VERSION mirror
3632
run: node scripts/sync-versions.cjs --verify

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Maintainers merge contributions at their discretion. Opening a PR does not creat
5858

5959
## Core Contracts (`contracts/core/`)
6060

61-
The core protocol library under `contracts/core/` is the **audited source of truth** for Bloxchain behavior. It has undergone **external security review**; changes affect deployed security assumptions and require controlled release management.
61+
The core protocol library under `contracts/core/` is the **audited source of truth** for Bloxchain behavior. It has been independently audited by **Nethermind** (report [NM_0828](audits/nethermind/)); see **[contracts/core/AUDIT.md](contracts/core/AUDIT.md)** for scope, the published report, and change policy. Changes affect deployed security assumptions and require controlled release management.
6262

6363
### Who may change core
6464

@@ -151,7 +151,7 @@ By signing off, you certify the DCO terms (original work or right to submit, per
151151

152152
Before contributing, ensure you have:
153153

154-
- **Node.js** (v16 or higher)
154+
- **Node.js** **>=22.12.0** for monorepo development (root `engines`; matches `@commitlint/cli` 21.x). SDK **consumers** need **>=18.20.5** at runtime per `sdk/typescript/package.json`.
155155
- **npm** (v8 or higher)
156156
- **Truffle** (v5.15 or higher)
157157
- **Git** (latest version)
@@ -391,7 +391,7 @@ npm run test:coverage
391391

392392
## Documentation
393393

394-
**Source of truth:** Solidity contracts are the source of truth for protocol API and behavior. The `docs/` directory is generated from contract NatSpec; do not edit those generated files by hand. For the full documentation map, updating process, and audit checklist, see **[CODEBASE_DOCUMENTATION.md](CODEBASE_DOCUMENTATION.md)**.
394+
**Source of truth:** Solidity contracts are the source of truth for protocol API and behavior. The `docs/` directory is generated from contract NatSpec; do not edit those generated files by hand. For reviewer context and audit scope, see **[TECHNICAL_OVERVIEW.md](TECHNICAL_OVERVIEW.md)** and **[contracts/core/AUDIT.md](contracts/core/AUDIT.md)**; published third-party reports live under **[audits/](audits/README.md)**.
395395

396396
### Contract Documentation
397397
- **NatSpec comments** for all public functions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Sepolia](https://img.shields.io/badge/Sepolia-Testnet-purple.svg)](https://sepolia.etherscan.io/)
88
[![Particle CS](https://img.shields.io/badge/Particle-CS-blue.svg)](https://particlecs.com/)
99

10-
> **Security audit status:** A third-party security audit of the protocol smart contracts is in progress; no independent audit report has been published yet.
10+
> **Core audit:** [`contracts/core/`](./contracts/core/) independently audited by [Nethermind](./audits/nethermind/). Report: [`Nethermind-Bloxchain-Core-NM_0828.pdf`](./audits/nethermind/Nethermind-Bloxchain-Core-NM_0828.pdf) · [details](./contracts/core/AUDIT.md). **Network:** pre-mainnet today; mainnet deployment coming soon. Security: [SECURITY.md](./SECURITY.md).
1111
1212
## System overview
1313

@@ -131,7 +131,7 @@ Two workflow patterns share the same **PENDING → EXECUTING → terminal** prog
131131

132132
## 🚀 Quick Start
133133

134-
**Prerequisites:** Node.js **>=18.20.5** (required for published `@bloxchain/sdk` ESM JSON import attributes; enforced via `engines` + `.npmrc` `engine-strict=true`)
134+
**Prerequisites:** Node.js **>=22.12.0** for this monorepo (dev tooling, CI, `npm ci`; enforced via root `engines` + `.npmrc` `engine-strict=true`). Published **`@bloxchain/sdk`** consumers still need **>=18.20.5** at runtime (see `sdk/typescript/package.json`).
135135

136136
```bash
137137
git clone https://github.com/PracticalParticle/Bloxchain-Protocol.git
@@ -213,7 +213,7 @@ npm run test:foundry:fuzz
213213

214214
## 🔧 Development Tools
215215

216-
Requires Node.js **>=18.20.5** (maintenance/security floor for SDK ESM; see `engines` in `package.json`).
216+
Requires Node.js **>=22.12.0** for repo development (see root `package.json` `engines`). SDK runtime floor for npm consumers remains **>=18.20.5** in `sdk/typescript/package.json`.
217217

218218
```bash
219219
npm run compile:foundry # compile; add :size for 24KB check
@@ -228,7 +228,7 @@ npm run docgen # docs
228228

229229
## 📚 Documentation
230230

231-
- **[Codebase documentation process & audit checklist](CODEBASE_DOCUMENTATION.md)** – Source of truth, how to update docs, audit-ready checklist
231+
- **[Core audit & change policy](contracts/core/AUDIT.md)** · **[Nethermind report](audits/nethermind/)** · **[Technical overview](TECHNICAL_OVERVIEW.md)** – Source of truth, reviewer context, published audit
232232
- **[Versioning & releases](docs/VERSIONING.md)** – npm packages, on-chain `EngineBlox.VERSION`, Release Please
233233
- [Protocol Architecture](./docs/bloxchain-architecture.md) · [State Machine](./docs/state-machine-engine.md) · [Getting Started](./docs/getting-started.md) · [API Reference](./docs/api-reference.md) · [SecureOwnable](./docs/secure-ownable.md) · [RuntimeRBAC](./docs/runtime-rbac.md) · [Best Practices](./docs/best-practices.md) · [Examples](./docs/examples-basic.md)
234234
- **Contract API (generated):** [docs/](docs/) – generated from Solidity NatSpec via `npm run docgen`

SECURITY.md

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
## Supported Versions
44

5-
**⚠️ IMPORTANT: Bloxchain Protocol is currently in testing phase and not yet live on mainnet.**
5+
**⚠️ IMPORTANT: Bloxchain Protocol is not yet live on Ethereum mainnet.** Testnet validation continues; **mainnet deployment is planned soon.**
66

77
We actively maintain security updates for the following versions:
88

99
| Version | Supported | Status |
1010
| ------- | ------------------ | ------ |
11-
| 1.0.x | :white_check_mark: | Testing phase (third-party audit in progress) |
11+
| 1.0.x | :white_check_mark: | Pre-mainnet; core audited by Nethermind (see below) |
1212
| < 1.0 | :x: | End of life |
1313

14-
**Note**: A third-party security audit of the protocol smart contracts is in progress; no independent audit report has been published yet. This security policy will become fully effective after third-party audit completion, which will mark the official launch of version 1.0.0.
14+
**Core smart contracts (`contracts/core/`):** Independently audited by **Nethermind** ([audit index](audits/README.md), [report PDF](audits/nethermind/Nethermind-Bloxchain-Core-NM_0828.pdf), [core policy](contracts/core/AUDIT.md)). The audit applies to the commit recorded in [audits/nethermind/README.md](audits/nethermind/README.md) (see the report PDF for the exact SHA). Later changes to core are outside that report until a re-audit or addendum.
15+
16+
Examples, community contracts, and application code under `contracts/examples/` and `contracts/community/` are **not** covered by that engagement.
1517

1618
## Reporting a Vulnerability
1719

@@ -72,36 +74,49 @@ Our State Abstraction framework implements multiple layers of security:
7274
### Security Best Practices
7375

7476
#### For Developers
75-
- Always use the latest version of our contracts
77+
- Always use the latest supported version of our contracts
7678
- Implement proper access controls using our RBAC system
7779
- Follow our secure development guidelines
7880
- Test thoroughly using our provided test suites
81+
- Pin releases and verify them against the [audited core commit](audits/nethermind/README.md) before production use
7982

8083
#### For Auditors
81-
- Review our security architecture documentation
82-
- Focus on the EngineBlox library core functions
84+
- Start with [contracts/core/AUDIT.md](contracts/core/AUDIT.md) and the [Nethermind report](audits/nethermind/)
85+
- Review [TECHNICAL_OVERVIEW.md](TECHNICAL_OVERVIEW.md) and the EngineBlox library
8386
- Verify multi-signature workflow implementations
8487
- Check meta-transaction signature validation
8588

8689
## Security Audit Status
8790

88-
A third-party security audit of the protocol smart contracts is in progress; no independent audit report has been published yet.
91+
### Third-party audit (core)
92+
93+
| Item | Status |
94+
|------|--------|
95+
| **Auditor** | Nethermind |
96+
| **Scope** | `contracts/core/` |
97+
| **Report** | [audits/nethermind/Nethermind-Bloxchain-Core-NM_0828.pdf](audits/nethermind/Nethermind-Bloxchain-Core-NM_0828.pdf) (NM_0828) |
98+
| **Engagement details** | [audits/nethermind/README.md](audits/nethermind/README.md) |
99+
100+
### Deployment and launch
101+
102+
| Item | Status |
103+
|------|--------|
104+
| **Mainnet** | Not live yet; deployment planned soon |
105+
| **Development** | Testing and validation on testnets (e.g. Sepolia) |
106+
| **Bug bounty** | Program details to be announced around mainnet launch |
89107

90-
### Current Status
91-
- **Development Phase**: Testing and validation ongoing
92-
- **Third-Party Security Audit**: In progress (report not yet published)
93-
- **Official Launch**: After third-party audit completion
108+
### Completed reviews
94109

95-
### Completed Reviews
96-
- **Internal Security Review**: Completed (v1.0.0)
97-
- **Code Review**: Ongoing with each release
110+
- **Nethermind (core):** Completed — see [audits/nethermind/](audits/nethermind/)
111+
- **Internal security review:** Ongoing with releases
112+
- **Code review:** Ongoing with each release
98113

99114
## Bug Bounty Program
100115

101-
We are developing a bug bounty program for security researchers. Details will be announced after third-party audit completion and the official launch of version 1.0.0.
116+
We are developing a bug bounty program for security researchers. Details will be announced in coordination with **mainnet deployment**.
102117

103118
### Scope
104-
- Smart contract vulnerabilities
119+
- Smart contract vulnerabilities in **audited core** (`contracts/core/`) at the published commit
105120
- Protocol design flaws
106121
- Implementation bugs
107122
- Cryptographic weaknesses
@@ -111,6 +126,7 @@ We are developing a bug bounty program for security researchers. Details will be
111126
- Physical security issues
112127
- Issues in third-party dependencies
113128
- Issues in experimental features
129+
- Example and community contracts unless explicitly listed in a future program scope
114130

115131
## Security Updates
116132

@@ -145,4 +161,4 @@ We appreciate the security research community's efforts to help keep Bloxchain P
145161

146162
*This security policy is subject to updates. Please check back regularly for the latest information.*
147163

148-
**Last Updated**: May 2026
164+
**Last Updated**: June 2026

TECHNICAL_OVERVIEW.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ This document provides:
3434

3535
**For AI auditors**: Use this as the primary context document. Cross-reference each invariant and restriction with the Codex (section and vector ID) to confirm test coverage and protection status.
3636

37+
### Published third-party audit (core)
38+
39+
`contracts/core/` was independently audited by **Nethermind** (report NM_0828). Index: [audits/nethermind/README.md](audits/nethermind/README.md) · PDF: [Nethermind-Bloxchain-Core-NM_0828.pdf](audits/nethermind/Nethermind-Bloxchain-Core-NM_0828.pdf) · Policy: [contracts/core/AUDIT.md](contracts/core/AUDIT.md). Record the audited git commit from the report on the engagement README; changes after that commit are outside the report until re-audit.
40+
3741
### Quick Reference: File → Primary Responsibility
3842

3943
| File | Responsibility |
@@ -265,6 +269,8 @@ The file **test/foundry/docs/ATTACK_VECTORS_CODEX.md** is the authoritative list
265269

266270
Use **ATTACK_VECTORS_CODEX.md** for the full list of vector IDs, locations, and related tests.
267271

272+
For the formal third-party report, see **[audits/nethermind/](audits/nethermind/README.md)** (complements this document; does not replace it).
273+
268274
---
269275

270-
*This technical overview is the single source of context for the Bloxchain core protocol. For threat coverage and test references, always cross-check with the Attack Vectors Codex.*
276+
*This technical overview is the single source of context for the Bloxchain core protocol. For threat coverage and test references, cross-check with the Attack Vectors Codex; for Nethermind engagement scope and report, see [audits/](audits/README.md).*

audits/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Security audits
2+
3+
Third-party and published security reviews for Bloxchain Protocol.
4+
5+
## Published audits
6+
7+
| Auditor | Report ID | Scope | Summary | Report |
8+
|---------|-----------|-------|---------|--------|
9+
| [Nethermind](https://nethermind.io/) | NM_0828 | [`contracts/core/`](../contracts/core/) | Independent review of the core protocol library | [Engagement page](./nethermind/README.md) · [PDF](./nethermind/Nethermind-Bloxchain-Core-NM_0828.pdf) |
10+
11+
## Not covered by the Nethermind engagement
12+
13+
- [`contracts/examples/`](../contracts/examples/) — per-file licenses; not core MPL assurance
14+
- [`contracts/community/`](../contracts/community/) — community-maintained; not maintainer-audited
15+
- [`contracts/components/`](../contracts/components/) — official components; outside NM_0828 scope unless a future report states otherwise
16+
- TypeScript SDK, deployment scripts, and example applications
17+
18+
For core-specific policy and change rules, see [`contracts/core/AUDIT.md`](../contracts/core/AUDIT.md).
19+
20+
## Security contact
21+
22+
Report vulnerabilities per [`SECURITY.md`](../SECURITY.md)**security@particlecs.com** (do not use public issues for undisclosed flaws).
336 KB
Binary file not shown.

audits/nethermind/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Nethermind audit — Bloxchain core (`contracts/core/`)
2+
3+
| Field | Value |
4+
|-------|--------|
5+
| **Auditor** | [Nethermind](https://nethermind.io/) |
6+
| **Report ID** | NM_0828 |
7+
| **Scope** | All Solidity under [`contracts/core/`](../../contracts/core/) |
8+
| **Full report** | [`Nethermind-Bloxchain-Core-NM_0828.pdf`](./Nethermind-Bloxchain-Core-NM_0828.pdf) |
9+
10+
## Status
11+
12+
- **Audit:** Completed by Nethermind for the in-scope core tree.
13+
- **Report in repository:** [`Nethermind-Bloxchain-Core-NM_0828.pdf`](./Nethermind-Bloxchain-Core-NM_0828.pdf)
14+
- **Audited commit:** _Record the git commit SHA from the report here when maintaining this page._
15+
16+
## Scope (in-repo paths)
17+
18+
| Path | Role |
19+
|------|------|
20+
| `lib/EngineBlox.sol` | State machine, RBAC, meta-tx, payments |
21+
| `base/BaseStateMachine.sol` | `_secureState`, EngineBlox wrappers |
22+
| `security/SecureOwnable.sol` | Owner, broadcaster, recovery, timelock |
23+
| `access/RuntimeRBAC.sol` | Dynamic roles and batch config |
24+
| `execution/GuardController.sol` | Guarded execution and config |
25+
| `pattern/Account.sol` | Composition of core components |
26+
| `lib/utils/SharedValidation.sol` | Shared errors and validation |
27+
| `*/lib/definitions/*Definitions.sol` | Function schemas and default permissions |
28+
| `*/interface/*.sol` | Core interfaces |
29+
30+
## Out of scope
31+
32+
Examples, community contracts, components, standards, SDK, and deployment tooling — see [`../README.md`](../README.md).
33+
34+
## Using this audit
35+
36+
1. Read [`Nethermind-Bloxchain-Core-NM_0828.pdf`](./Nethermind-Bloxchain-Core-NM_0828.pdf) for findings, severities, and the **exact commit** audited.
37+
2. Update the **Audited commit** line above with that SHA.
38+
3. Compare your deployment or fork to that commit; changes to `contracts/core/` after that commit are **outside** the report until a re-audit or addendum.
39+
4. For maintainer change policy and vulnerability reporting, see [`../../contracts/core/AUDIT.md`](../../contracts/core/AUDIT.md) and [`../../SECURITY.md`](../../SECURITY.md).
40+
41+
## Related documentation
42+
43+
- [`../../contracts/core/AUDIT.md`](../../contracts/core/AUDIT.md) — core audit notice and contribution alignment
44+
- [`../../TECHNICAL_OVERVIEW.md`](../../TECHNICAL_OVERVIEW.md) — technical map for reviewers
45+
- [`../../test/foundry/docs/ATTACK_VECTORS_CODEX.md`](../../test/foundry/docs/ATTACK_VECTORS_CODEX.md) — internal test-backed threat catalog (separate from this third-party report)

0 commit comments

Comments
 (0)