DEFIANCE: Decentralized Evidentiary Forensics for Immutable Auditability, Networked Chain-of-Custody, and Enforcement (A Blockchain-Based Forensic Firearm Tracking System and Evidentiary Dataset)
Description
This dataset supports the thesis "A Cryptographic Architecture for Decentralized Firearm Forensics" and contains the complete codebase, verification artifacts, deployment scripts, audit records, forensic output samples, and evidentiary templates that comprise the DEFIANCE system — the first decentralized blockchain-based firearm forensic infrastructure. DEFIANCE enables smart contract–governed NFT firearm identity, biometric transfer validation, multisignature warrant-based access control, and zero-knowledge-compatible forensic event logging. This dataset includes all modules necessary to deploy, test, audit, and reproduce the system in compliance with U.S. evidentiary law (Federal Rules of Evidence 902(13) and 902(14)) and academic reproducibility guidelines.
Files
Steps to reproduce
This dataset supports full reproduction of the DEFIANCE forensic blockchain system as detailed in the thesis "A Cryptographic Architecture for Decentralized Firearm Forensics". To reproduce the system, users will need Node.js (v16+), Hardhat, and a Solidity compiler version 0.8.20. For advanced validation, optional tools such as the MythX CLI (for static security analysis) and the Certora Prover (for formal symbolic verification) may be installed. To begin, clone the repository and install the dependencies using `npm install`. Copy the provided `.env.example` file to `.env` and enter your private deployment key along with the desired RPC URL (Infura, Alchemy, or a public provider). Once configured, compile the smart contracts using Hardhat by running `npx hardhat compile`. Next, execute the full test suite with `npx hardhat test` to validate biometric transfer logic, warrant signature enforcement, multisignature threshold access, NICS simulation, and forensic hash matching. The test suite uses snapshot isolation to ensure reproducibility and adversarial simulation. To deploy the system, run `npm run deploy`. This will deploy all core and supporting contracts — including MockNFT, MockOracle, FirearmTransfer, RegistryAccess, and ForensicMatch — using OpenZeppelin’s UUPS proxy pattern. Deployment addresses are automatically written to `deployments.json`. If you wish to simulate contract upgrade scenarios, set `CONTRACT_TO_UPGRADE` in your `.env` file to the desired module and execute `npm run upgrade`. The upgrade script will update the contract logic and log the event to `upgrade-history.json`, including timestamp and signer metadata. For static analysis, run `mythx analyze -c mythx.yaml` to confirm the absence of critical vulnerabilities. To formally verify smart contract behavior under all possible inputs, use the Certora Prover with the provided `.spec` files (e.g., `FirearmTransfer.spec` and `RegistryAccess.spec`). To verify forensic evidence reproducibility, review the included files: `ChainofCustodyBundle.sample.json`, `Rule90214CertificateTemplate.pdf`, and `DCCCE_math_proof.pdf`. These files represent real-world audit and court-admissible artifacts that are cryptographically anchored to contract state and deployment metadata. All components of the system are cryptographically bound, formally verified, and courtroom-aligned. Reproduction of test results, deployment, upgrade history, and forensic match traceability is ensured via deterministic scripts, role-based access control, and event logs. This dataset, and the underlying DEFIANCE system, are designed to be testable, provable, and legally actionable by any qualified academic, forensic lab, or federal agency. If using this dataset in your own work, please cite: Decker, Nicolin. (2025). DEFIANCE: Decentralized Evidentiary Forensics for Immutable Auditability, Networked Chain-of-Custody, and Enforcement. Mendeley Data, V1, doi: 10.17632/dhdt6xrhrm.1