Skip to content

Commit

Permalink
Merge pull request #2854 from iron-fish/staging
Browse files Browse the repository at this point in the history
STAGING -> MASTER
  • Loading branch information
NullSoldier committed Jan 9, 2023
2 parents 38d2528 + 0726594 commit efc3bc6
Show file tree
Hide file tree
Showing 177 changed files with 5,321 additions and 3,248 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build-ironfish-rust-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
cache: yarn

- name: Install
Expand Down Expand Up @@ -89,19 +89,19 @@ jobs:

- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: node:16-slim
docker: node:18-slim

- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: node:16-alpine
docker: node:18-alpine

- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs:aarch64-16

- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: arm64v8/node:16-alpine
docker: arm64v8/node:18-alpine
platform: linux/arm64/v8

name: Test bindings for ${{ matrix.settings.target }}
Expand All @@ -117,7 +117,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'

- name: Download artifacts
uses: actions/download-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
cache: 'yarn'

- name: Install packages
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
cache: 'yarn'

- name: Cache Rust
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
cache: 'yarn'

- name: Cache Rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
cache: 'yarn'

- name: Build Ironfish CLI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-npm-ironfish-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
registry-url: 'https://registry.npmjs.org'
cache: yarn

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-npm-ironfish-rust-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
registry-url: 'https://registry.npmjs.org'
cache: yarn

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-npm-ironfish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.13.0'
node-version: '18.12.1'
registry-url: 'https://registry.npmjs.org'
cache: yarn

Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: false
shared-key: base

- name: Check that cargo lockfile is up to date
Expand Down Expand Up @@ -74,12 +75,13 @@ jobs:
with:
shared-key: base

# Build & Run test & Collect Code coverage
# Run tests to collect code coverage
- name: Run cargo-tarpaulin on ironfish-rust
uses: actions-rs/[email protected]
with:
version: "0.22.0"
args: --avoid-cfg-tarpaulin --manifest-path ironfish-rust/Cargo.toml --release -- --test-threads 1
run: |
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
tar -xzf tarpaulin.tar.gz
mv cargo-tarpaulin ~/.cargo/bin/
cargo tarpaulin -p ironfish_rust --release --out Xml --avoid-cfg-tarpaulin --skip-clean -- --test-threads 1
# Upload code coverage to Codecov
- name: Upload to codecov.io
Expand All @@ -102,12 +104,13 @@ jobs:
with:
shared-key: zkp

# Build & Run test & Collect Code coverage
# Run tests to collect code coverage
- name: Run cargo-tarpaulin on ironfish-zkp
uses: actions-rs/[email protected]
with:
version: "0.22.0"
args: --avoid-cfg-tarpaulin --manifest-path ironfish-zkp/Cargo.toml --release -- --test-threads 1
run: |
wget -O tarpaulin.tar.gz https://github.com/xd009642/tarpaulin/releases/download/0.22.0/cargo-tarpaulin-0.22.0-travis.tar.gz
tar -xzf tarpaulin.tar.gz
mv cargo-tarpaulin ~/.cargo/bin/
cargo tarpaulin -p ironfish_zkp --release --out Xml --avoid-cfg-tarpaulin --skip-clean -- --test-threads 1
# Upload code coverage to Codecov
- name: Upload to codecov.io
Expand Down
34 changes: 23 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ edition = "2021"

[patch.crates-io]
bellman = { git = "https://github.com/iron-fish/bellman", rev = "1cc52ca33e6db14233f1cbc0c9c5b7c822b229ec" }
napi = { git = "https://github.com/napi-rs/napi-rs", rev = "26f6c926d30de744146fe54db6a6b399e142e63c" }
napi-derive-backend = { git = "https://github.com/napi-rs/napi-rs", rev = "26f6c926d30de744146fe54db6a6b399e142e63c" }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See https://ironfish.network

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/docs/onboarding/installation-iron-fish

1. Install [Node.js 16.x](https://nodejs.org/download/release/latest-v16.x/)
1. Install [Node.js 18.x](https://nodejs.org/en/download/)
1. Install [Rust](https://www.rust-lang.org/learn/get-started).
1. Install [Yarn](https://classic.yarnpkg.com/en/docs/install).
1. Windows:
Expand Down
4 changes: 2 additions & 2 deletions ironfish-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.15.1-bullseye as build
FROM node:18.12.1-bullseye as build
ENV PATH="/root/.cargo/bin:${PATH}"

RUN \
Expand All @@ -13,7 +13,7 @@ COPY ./ ./

RUN ./ironfish-cli/scripts/build.sh

FROM node:16.15.1-bullseye-slim
FROM node:18.12.1-bullseye-slim
EXPOSE 8020:8020
EXPOSE 9033:9033
VOLUME /root/.ironfish
Expand Down
4 changes: 2 additions & 2 deletions ironfish-cli/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ if (process.platform !== 'win32') {
require('segfault-handler').registerHandler('segfault.log')
}

if(process.versions.node.split('.')[0] !== '16') {
console.log('NodeJS version ' + process.versions.node + ' is not compatible. Must have node v16.x installed: https://nodejs.org/en/blog/release/v16.16.0')
if(process.versions.node.split('.')[0] !== '18') {
console.log('NodeJS version ' + process.versions.node + ' is not compatible. Must have node v18.x installed: https://nodejs.org/en/download/')
process.exit(1)
}

Expand Down
12 changes: 6 additions & 6 deletions ironfish-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ironfish",
"version": "0.1.55",
"version": "0.1.56",
"description": "CLI for running and interacting with an Iron Fish node",
"author": "Iron Fish <[email protected]> (https://ironfish.network)",
"main": "build/src/index.js",
Expand All @@ -20,12 +20,12 @@
"/oclif.manifest.json"
],
"engines": {
"node": "16.x"
"node": "18.x"
},
"devDependencies": {
"@oclif/test": "2.1.0",
"@types/blessed": "0.1.17",
"@types/node": "16.11.1",
"@types/node": "18.11.16",
"@types/tar": "6.1.1",
"@types/ws": "7.4.5",
"chai": "4.2.0",
Expand Down Expand Up @@ -57,9 +57,9 @@
"dependencies": {
"@aws-sdk/client-cognito-identity": "3.215.0",
"@aws-sdk/client-s3": "3.127.0",
"@ironfish/rust-nodejs": "0.1.18",
"@ironfish/sdk": "0.0.32",
"@oclif/core": "1.16.1",
"@ironfish/rust-nodejs": "0.1.19",
"@ironfish/sdk": "0.0.33",
"@oclif/core": "1.23.1",
"@oclif/plugin-help": "5.1.12",
"@oclif/plugin-not-found": "2.3.1",
"@types/tar": "6.1.1",
Expand Down
40 changes: 40 additions & 0 deletions ironfish-cli/src/commands/chain/asset.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
import { Assert, BufferUtils } from '@ironfish/sdk'
import { IronfishCommand } from '../../command'
import { RemoteFlags } from '../../flags'

export default class Asset extends IronfishCommand {
static description = 'Get the asset info'

static args = [
{
name: 'identifier',
parse: (input: string): Promise<string> => Promise.resolve(input.trim()),
required: true,
description: 'The identifier of the asset',
},
]

static flags = {
...RemoteFlags,
}

async start(): Promise<void> {
const { args } = await this.parse(Asset)
Assert.isString(args.id)
const assetId = args.id

const client = await this.sdk.connectRpc()
const data = await client.getAsset({ id: assetId })

this.log(`Name: ${BufferUtils.toHuman(Buffer.from(data.content.name, 'hex'))}`)
this.log(`Metadata: ${BufferUtils.toHuman(Buffer.from(data.content.metadata, 'hex'))}`)
this.log(`Owner: ${data.content.owner}`)
this.log(`Supply: ${data.content.supply}`)
this.log(`Nonce: ${data.content.nonce}`)
this.log(`Identifier: ${data.content.id}`)
this.log(`Transaction Created: ${data.content.createdTransactionHash}`)
}
}
2 changes: 0 additions & 2 deletions ironfish-cli/src/commands/chain/benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { LocalFlags } from '../../flags'
import { IronfishCliPKG } from '../../package'

export default class Benchmark extends IronfishCommand {
static aliases = ['chain:benchmark']

static description =
'Test the performance of the chain by re-importing data from an existing chain'

Expand Down
2 changes: 0 additions & 2 deletions ironfish-cli/src/commands/chain/readd-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { IronfishCommand } from '../../command'
import { LocalFlags } from '../../flags'

export default class ReAddBlock extends IronfishCommand {
static aliases = ['chain:readdblock']

static description =
'Remove and readd a block on the chain if it has no other blocks after it'

Expand Down
1 change: 0 additions & 1 deletion ironfish-cli/src/commands/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { ColorFlag, ColorFlagKey } from '../../flags'
import { RemoteFlags } from '../../flags'

export class ShowCommand extends IronfishCommand {
static aliases = ['config:show']
static description = `Print out the entire config`

static flags = {
Expand Down
Loading

0 comments on commit efc3bc6

Please sign in to comment.