3 releases (breaking)

0.3.0 Feb 13, 2024
0.2.0 Feb 12, 2024
0.1.0 Dec 14, 2023

#16 in #fish

Download history 154/week @ 2024-06-22 27/week @ 2024-06-29 107/week @ 2024-07-06 100/week @ 2024-07-13 49/week @ 2024-07-20 95/week @ 2024-07-27 102/week @ 2024-08-03 217/week @ 2024-08-10 109/week @ 2024-08-17 56/week @ 2024-08-24 23/week @ 2024-08-31 107/week @ 2024-09-07 193/week @ 2024-09-14 194/week @ 2024-09-21 31/week @ 2024-09-28 51/week @ 2024-10-05

506 downloads per month

MPL-2.0 license

13KB
272 lines

Iron Fish

Iron Fish

Node CI Rust CI Node CI Regenerate Fixtures codecov

Iron Fish is a Layer 1 blockchain that provides the strongest privacy guarantees on every single transaction. Leveraging zero-knowledge proofs (zk-SNARKs), and the highest industry standards for encryption.

See https://ironfish.network

Developer Install

The following steps should only be used to install if you are planning on contributing to the Iron Fish codebase. Otherwise, we strongly recommend using the installation methods here: https://ironfish.network/use/get-started/installation

  1. Install Node.js 20 LTS (or greater).

  2. Install Rust.

  3. Install Yarn.

  4. Windows:

    1. Install the current version of Python from the Microsoft Store package.
    2. Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" or "Desktop development with C++" workload)

    If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.

  5. Run yarn install from the root directory to install packages.

    • If yarn install fails with an error that includes "Failed to build cmake", you may need to first install cmake. For example, on macOS:

      1. Run brew install cmake, you'll need cmake version 3.15 or higher.
    • If yarn install fails with an error that includes "Could NOT find OpenSSL", you may need to first install OpenSSL and add an environment variable. For example, on macOS:

      1. Run brew install openssl
      2. Run export OPENSSL_ROOT_DIR=`brew --prefix openssl`
      3. Run yarn install again.
    • If yarn install fails with an error that includes "Error: not found: make", "make: cc: Command not found", or "make: g++: Command not found", you may need to install a C/C++ compiler toolchain.

      1. On Ubuntu: apt install build-essential
      2. On Amazon Linux: sudo yum groupinstall "Development Tools"
    • If yarn install fails with an error that includes "Error: Could not find any Python installation to use", you may need to install Python3 (required by node-gyp). on macOS:

      1. Run brew install python

Usage

Once your environment is set up - you can run the CLI by following these directions.

Running Tests

Note: Running tests requires Node.js 20 or greater.

  1. To test the entire monorepo:
    1. Run yarn test at the root of the repository
    2. Run yarn test:slow in ./ironfish/ to run slow tests
    3. Run yarn test:coverage at the root of the repository for tests and coverage
  2. To test a specific project
    1. Run yarn test at the root of the project
    2. Run yarn test:watch in ./ironfish or ./ironfish-cli if you want the tests to run on change
    3. Run yarn test:coverage:html if you want to export the coverage in an easy-to-use format (open the index.html file in the coverage folder of the project)

Running Benchmarks and Performance Tests

  1. Rust benchmarks:
    • cargo benchmark is a cargo alias, defined in ./.cargo/config.toml
    1. cargo benchmark to run all benchmark tests
    2. cargo benchmark -- simple to run only benchmarks containing the text 'simple' in the name
  2. Typescript benchmarks:
    1. cd ironfish
    2. yarn test:perf

Structure of the repository

  • ironfish: The library that contains the IronfishSDK and all Ironfish code written in TypeScript.
  • ironfish-cli: The main client for Iron Fish as of today. It is a command-line interface built on Node. More details in our documentation.
  • ironfish-rust: Core API for interacting with the transactions and chain and using ZKP.
  • ironfish-rust-nodejs: Wrapper for ironfish-rust as a native NodeJS addon.

Contributing Code

If you want to contribute code, you must first read our contributing guidelines or risk having your pull request closed.

Other Repositories

Audit

The Iron Fish core protocol implementation in this repo went through a security audit by Inversed Tech, finalized on June 1, 2023. The full audit, including a summary of findings, outline of resources, and a detailed breakdown, can be found here. See our blog post on it for more details.

Licensing

This code base and any contributions will be under the MPL-2.0 Software License.

Dependencies

~1.5MB
~44K SLoC