Giter Club home page Giter Club logo

ironfish's Introduction

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.

ironfish's People

Contributors

amberkiso avatar andiflabs avatar andreacorbellini avatar blrhc avatar breathshoria avatar cumpsd avatar danield9tqh avatar deekerno avatar dgca avatar dguenther avatar evanjrichard avatar hairtail avatar hamza-siddiq avatar holahula avatar hughy avatar jowparks avatar kernel32uiuc avatar krompets avatar kupuyc avatar leanthebean avatar lwisne avatar mat-if avatar mirayadav avatar nullsoldier avatar patnir avatar rohanjadvani avatar vchs1v avatar wd021 avatar ygao76 avatar yuryironfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ironfish's Issues

Wrong block listed in the mined blocks list: ironfish miners:mined

Running ironfish miners:mined listed a block that was not actually mined by my node, from the looks of it on the explorer

Screenshots:
Screenshot 2021-12-01 at 7 43 17 PM

Link to block explorer: https://explorer.ironfish.network/blocks/0000000050597dfe10efa0d797907ba3333f87dcd4f2b912053a9024b118827a

Screenshot 2021-12-01 at 7 44 05 PM

My graffiti was sebastiantf then later changed to sebastianf. But I've never used the graffiti mentioned in the block explorer - gunwest123#2565

Number of blocks mined in the status report also stays at zero
Screenshot 2021-12-01 at 7 45 38 PM

PID 4228 received SIGSEGV for address: 0x0

I'm creating this issue to track this bug many users are looking at. The cause is a segfault inside the WRTC native library itself. We use SimplePeer, which uses WRTC, which has native bindings to Chromiums WRTC code. The crash looks like this in your logs. It most often happens when peers are disconnecting / reconnecting frequently.

PID 4228 received SIGSEGV for address: 0x0
0   segfault-handler.node               0x00000001046bdfb0 _ZL16segfault_handleriP9__siginfoPv + 304
1   libsystem_platform.dylib            0x00007fff203b3d7d _sigtramp + 29
2   ???                                 0x0000000200583232 0x0 + 8595714610
3   wrtc.node                           0x00000001151e4e86 _ZNK6webrtc22JsepSessionDescription8ToStringEPNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 38
4   wrtc.node                           0x0000000115028fe2 _ZN11node_webrtc9ConverterIPKN6webrtc27SessionDescriptionInterfaceENS_25RTCSessionDescriptionInitEE7ConvertES4_ + 82
5   wrtc.node                           0x0000000115029b60 _ZN11node_webrtc9ConverterINSt3__14pairIN4Napi3EnvEPKN6webrtc27SessionDescriptionInterfaceEEENS3_5ValueEE7ConvertES9_ + 48
6   wrtc.node                           0x000000011510416f _ZN11node_webrtc17RTCPeerConnection19GetLocalDescriptionERKN4Napi12CallbackInfoE + 111
7   wrtc.node                           0x0000000115119bdb _ZZN4Napi10ObjectWrapIN11node_webrtc17RTCPeerConnectionEE29InstanceGetterCallbackWrapperEP10napi_env__P20napi_callback_info__ENKUlvE_clEv + 139
8   wrtc.node                           0x0000000115119a9a _ZN4Napi10ObjectWrapIN11node_webrtc17RTCPeerConnectionEE29InstanceGetterCallbackWrapperEP10napi_env__P20napi_callback_info__ + 42
9   node                                0x000000010006b94a _ZN6v8impl12_GLOBAL__N_123FunctionCallbackWrapper6InvokeERKN2v820FunctionCallbackInfoINS2_5ValueEEE + 122
10  node                                0x0000000100a0bacd Builtins_CallApiCallback + 173
[1]    4227 segmentation fault  npm start

We currently have multiple PRs up in other repositories to track and look at this issue, but we're also looking at forking these libraries to introduce a workarounds.

Stay tuned on fixes.

build from source failing on Linux (ubuntu 18.04)

Building from source by following the steps provided at https://github.com/iron-fish/ironfish#readme. Performed following steps:

  1. Installed nodejs [v14.16.1]
  2. Installed rust [v1.48.0 (7eac88abb 2020-11-16)]
  3. Installed yarn [1.22.5]
  4. Installed WASM using cargo install wasm-pack
  5. Ran yarn from ironfish root directory

Got the following output from yarn

yarn install v1.22.5
$ (cd ironfish-wasm && yarn build)
yarn run v1.22.5
$ node build.js
Building Web: TRUE
Building Node: TRUE
Generating nodejs build...
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
Compiling ironfish_rust v0.1.0 (/home/azureuser/ironfish/ironfish-rust)
error: could not compile ironfish_rust

Caused by:
process didn't exit successfully: rustc --crate-name ironfish_rust --edition=2018 /home/azureuser/ironfish/ironfish-rust/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C metadata=979b04c0e2c98600 -C extra-filename=-979b04c0e2c98600 --out-dir /home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps --target wasm32-unknown-unknown -L dependency=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps -L dependency=/home/azureuser/ironfish/ironfish-wasm/target/release/deps --extern bellman=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libbellman-e76a888b782aa027.rmeta --extern blake2b_simd=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libblake2b_simd-3efcad22c63616cb.rmeta --extern blake2s_simd=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libblake2s_simd-bedfb6996d3abe1c.rmeta --extern byteorder=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libbyteorder-191e06838c827d97.rmeta --extern ff=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libff-0f4bbc378e77dbee.rmeta --extern lazy_static=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/liblazy_static-648b5e6ff3716478.rmeta --extern pairing=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libpairing-92dbfaf097c6ec08.rmeta --extern rand=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/librand-752ac871cf82f4d2.rmeta --extern crypto=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libcrypto-f158c947b1df7fcc.rmeta --extern shrinkwraprs=/home/azureuser/ironfish/ironfish-wasm/target/release/deps/libshrinkwraprs-040184ef3997064b.so --extern bip39=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libbip39-99c803848e0a3a35.rmeta --extern zcash_primitives=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libzcash_primitives-f1386c11db967052.rmeta --extern zcash_proofs=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/deps/libzcash_proofs-13a74049ea3519e1.rlib -L native=/home/azureuser/ironfish/ironfish-wasm/target/wasm32-unknown-unknown/release/build/rust-crypto-wasm-9524ee1103f6eb96/out (signal: 9, SIGKILL: kill)
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute cargo build: exited with exit code: 101
full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Windows native build failing

'yarn install' from the root of repo results in this:

C:\Users\ai\AppData\Local\node-gyp\Cache\16.13.0\include\node\node.h(63,10): fatal error C1083: Cannot open include file: 'v8.h': No such file or directory [C:\Users\ai\Projects.fun\ironfish\node_modules\segfault-handler\build\segfault-handler.vcxproj]

Account Balance wrong

My accounts balance is different from available, for no reason, I have not made payments yet

Error yarn install

Hello!
I have a strange issue when I try to install Ironfish from the source. It looks like errors in dependencies:

image

My environment:
OS FreeBSD 13.0
nodejs v14.16.1
rustc 1.51.0
yarn 1.22.10
wasm-pack 0.9.1

Help me please to resolve this issue! :-)

Export default account (cli)

Description

Bug in ironfish-cli to export the default account.

Config

Default ironfish-cli configuration, with Linux 5.11.11-arch1-1.

To Reproduce

ironfish accounts:export default
TypeError: json_colorizer_1.default is not a function

Building on Linux from source requires an additional dependency 'lerna'

Following these instructions https://ironfish.network/docs/onboarding/installation-iron-fish#from-source

Using Ubuntu 20.04, ran into the following when I tried yarn build:

    Finished release [optimized] target(s) in 0.04s
[INFO]: License key is set in Cargo.toml but no LICENSE file(s) were found; Please add the LICENSE file(s) to your project directory
[INFO]: Installing wasm-bindgen...
[INFO]: Optimizing wasm binaries with `wasm-opt`...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository'. These are not necessary, but recommended
[INFO]: :-) Done in 26.35s
[INFO]: :-) Your wasm pkg is ready to publish at /home/fireball/code/ironfish/ironfish-wasm/web.
Replacing name in web/package.json...
Done!
$ lerna run build
/bin/sh: 1: lerna: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Doing yarn global add lerna followed by yarn in the root folder fixed it, just wanted to bring this to your notice. Not sure if this is an issue just on my end.

cli hangs indefinitely despite ctrl+c / sigint

After starting the node and miner, it seemed like nothing was happening. I decided to kill both, but the node does not get killed. It hangs indefinitely despite multiple ctrl+c.

Screen Shot 2021-04-08 at 10 14 27 AM

macOS v10.15.7
node v15.14.0
npm v7.7.6

config:set bootstrapNodes

"Could not convert % to array" error, regardless of how the command is formatted.
I also tried without quotation marks (not pictured below).
image

404/incorrect peer dependency?

I get the following error when running command, yarn install.

[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "e
[email protected]".
warning " > [email protected]" has incorrect peer dependency "eslint-
[email protected]".
warning "[email protected]" is missing a bundled dependency "node-pre-gyp". This should
be reported to the package maintainer.
[4/4] Building fresh packages...
[1/9] ⢀ mrmr
[8/9] ⢀ @nestjs/core
[3/9] ⢀ segfault-handler
[4/9] ⢀ wrtc
error C:\Users\anon\desktop\ironfish-master\ironfish-master\node_modules\wrtc:
Command failed.
Exit code: 1
Command: node scripts/download-prebuilt.js
Arguments:
Directory: C:\Users\anon\desktop\ironfish-master\ironfish-master\node_modules\w
rtc
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | win32 | ia32
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "C:\Users\anon\desktop\ironfish-master\iron
fish-master\node_modules\wrtc\build\Release\wrtc.node" (not found)
node-pre-gyp http GET https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/w
in32-ia32.tar.gz
node-pre-gyp http 404 https://node-webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/w
in32-ia32.tar.gz
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: 404 status code downloading tarball https://node-
webrtc.s3.amazonaws.com/wrtc/v0.4.7/Release/win32-ia32.tar.gz
node-pre-gyp ERR! stack at Request. (C:\Users\anon\Desktop\ironf
ish-master\ironfish-master\node_modules\node-pre-gyp\lib\install.js:149:27)
node-pre-gyp ERR! stack at Request.emit (events.js:388:22)
node-pre-gyp ERR! stack at Request.onRequestResponse (C:\Users\anon\Desktop
\ironfish-master\ironfish-master\node_modules\request\request.js:1059:10)
node-pre-gyp ERR! stack at ClientRequest.emit (events.js:376:20)
node-pre-gyp ERR! stack at HTTPParser.parserOnIncomingClient [as onIncoming]
(_http_client.js:647:27)
node-pre-gyp ERR! stack at HTTPParser.parserOnHeadersComplete (_http_common.
js:126:17)
node-pre-gyp ERR! stack at TLSSocket.socketOnData (_http_client.js:515:22)
node-pre-gyp ERR! stack at TLSSocket.emit (events.js:376:20)
node-pre-gyp ERR! stack at addChunk (internal/streams/readable.js:309:12)
node-pre-gyp ERR! stack at readableAddChunk (internal/streams/readable.js:28
4:9)
node-pre-gyp ERR! System Windows_NT 10.0.19042
node-pre-gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Users
\anon\Desktop\ironfish-master\ironfish-master\node_modules\node-pre-gyp\
bin\node-pre-gyp" "install"
node-pre-gyp ERR! cwd C:\Users\dylan\desktop\ironfish-master\ironfish-master\nod
e_modules\wrtc
node-pre-gyp ERR! node -v v14.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok

can anyone please help?

ironfish config:show

After you change your account to a different one,
ironfish config:show still shows you are using the default account

Miner's fee

When mining with multiple threads, I'm getting the following error after a while:

Error: Miner's fee is incorrect
    at /usr/local/Cellar/ironfish/17/libexec/node_modules/ironfish/build/src/blockchain/blockchain.js:569:27
    at async LevelupDatabase.withTransaction (/usr/local/Cellar/ironfish/17/libexec/node_modules/ironfish/build/src/storage/database/database.js:39:28)
...

WebRTC crash: RTCDataChannel.readyState is not 'open'

I've seen this error come up in Discord several times:

(node:1) UnhandledPromiseRejectionWarning: InvalidStateError: RTCDataChannel.readyState is not 'open'
    at RTCDataChannel._send (<anonymous>)
    at RTCDataChannel.send (/usr/src/app/node_modules/wrtc/lib/index.js:49:8)
    at Peer.send (/usr/src/app/node_modules/simple-peer/index.js:239:19)
    at WebRtcConnection.send (/usr/src/app/node_modules/ironfish/build/src/network/peers/connections/webRtcConnection.js:37:23)
    at Peer.send (/usr/src/app/node_modules/ironfish/build/src/network/peers/peer.js:259:47)
    at PeerManager.sendTo (/usr/src/app/node_modules/ironfish/build/src/network/peers/peerManager.js:452:21)
    at PeerManager.handleSignalMessage (/usr/src/app/node_modules/ironfish/build/src/network/peers/peerManager.js:805:18)
    at PeerManager.handleMessage (/usr/src/app/node_modules/ironfish/build/src/network/peers/peerManager.js:554:18)
    at /usr/src/app/node_modules/ironfish/build/src/network/peers/peerManager.js:428:18
    at Event.emitAsync (/usr/src/app/node_modules/ironfish/build/src/event.js:61:39)

IRO-591

Having issues installing/running on M1 Mac via Homebrew

/opt/homebrew/Cellar/ironfish/934/libexec/node_modules/bindings/bindings.js:121
throw e;
^

Error: dlopen(/opt/homebrew/Cellar/ironfish/934/libexec/node_modules/segfault-handler/build/Release/segfault-handler.node, 1): no suitable image found. Did find:
/opt/homebrew/Cellar/ironfish/934/libexec/node_modules/segfault-handler/build/Release/segfault-handler.node: mach-o, but wrong architecture
/opt/homebrew/Cellar/ironfish/934/libexec/node_modules/segfault-handler/build/Release/segfault-handler.node: mach-o, but wrong architecture
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at bindings (/opt/homebrew/Cellar/ironfish/934/libexec/node_modules/bindings/bindings.js:112:48)
at Object. (/opt/homebrew/Cellar/ironfish/934/libexec/node_modules/segfault-handler/index.js:3:37)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)

wasm doesn't work on M1 mac

I'm following instructions to compile from source but I get the following


wasm-pack-init: no precompiled binaries available for CPU architecture: arm64```

Is there a workaround?

memory leak

I use command "ironfish start" start a node.
The node process used memory increases over time.
OS kill it at last.

Print node status (cli)

Description

Bug in ironfish-cli to print node status.

Config

Default ironfish-cli configuration, with Linux 5.11.11-arch1-1.

To Reproduce

ironfish status -f
TypeError: Cannot read property 'screen' of undefined

Can't connect on OSX

Running a 2019 Macbook Pro, 2.6 GHz 6-Core Intel Core i7, getting the following when running ironfish start:

Peer Identity 7NIsQ8zHoX0JC0O9s4XrBnWF/mXxukB8vM1JPB0O5wU=
Peer Agent    ironfish/1/cli/a596c5f
Port          9033
Bootstrap     test.bn1.ironfish.network
Node Name     NONE
 
WebSocket server started at :::9033
Connected to the Iron Fish network
Not connected to the Iron Fish network
Connected to the Iron Fish network
Not connected to the Iron Fish network
Connected to the Iron Fish network
panicked at 'called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: UnexpectedEof, error: "failed to fill whole buffer" })', src/wasm_structs/transaction.rs:26:75

Stack:

Error
    at module.exports.__wbg_new_59cb74e423758ede (/usr/local/Cellar/ironfish/2/libexec/node_modules/ironfish-wasm-nodejs/ironfish-wasm-nodejs.js:1013:15)
    at console_error_panic_hook::hook::h3aa8a16325f13826 (<anonymous>:wasm-function[321]:0xb9cff)
    at core::ops::function::Fn::call::he5ac40e34c768b40 (<anonymous>:wasm-function[773]:0xd01bb)
    at std::panicking::rust_panic_with_hook::hc5713da015ebaa19 (<anonymous>:wasm-function[522]:0xcb218)
    at std::panicking::begin_panic_handler::{{closure}}::hc5eba7f0030e8f4f (<anonymous>:wasm-function[668]:0xcf57b)
    at std::sys_common::backtrace::__rust_end_short_backtrace::he811f0bd07938b42 (<anonymous>:wasm-function[676]:0xcf6e4)
    at rust_begin_unwind (<anonymous>:wasm-function[644]:0xcf028)
    at core::panicking::panic_fmt::h775d5c012939dd41 (<anonymous>:wasm-function[677]:0xcf71a)
    at core::option::expect_none_failed::h924688d051ea0ca4 (<anonymous>:wasm-function[579]:0xcd957)
    at wasmtransactionposted_deserialize (<anonymous>:wasm-function[449]:0xc67bc)

noticing stacktrace-1234567890-123456.log file(s) in my ironfish-cli root directory

  • I am running my iron node and iron miner as systemd services
  • This morning when I logged into my server, I noticed a bunch of stacktrace log file(s)
  • Happy to provide additional log files, if this is leading up to a bug

$ pwd

/home/iron/ironfish/ironfish-cli

$ ll *log

-r--r--r-- 1 iron iron 802 Apr  7 17:01 stacktrace-1617807696-3175040.log
-r--r--r-- 1 iron iron 802 Apr  8 03:25 stacktrace-1617845116-3633719.log
-r--r--r-- 1 iron iron 802 Apr  8 03:50 stacktrace-1617846617-3708477.log
-r--r--r-- 1 iron iron 802 Apr  8 04:21 stacktrace-1617848502-3716918.log
-r--r--r-- 1 iron iron 802 Apr  8 06:50 stacktrace-1617857456-3864442.log
-r--r--r-- 1 iron iron 802 Apr  8 06:59 stacktrace-1617857987-3885817.log
-r--r--r-- 1 iron iron 802 Apr  8 07:52 stacktrace-1617861149-3895565.log
-r--r--r-- 1 iron iron 802 Apr  8 07:59 stacktrace-1617861590-3944525.log
-r--r--r-- 1 iron iron 802 Apr  8 08:43 stacktrace-1617864235-3952714.log
-r--r--r-- 1 iron iron 802 Apr  8 09:29 stacktrace-1617866975-4001195.log
-r--r--r-- 1 iron iron 802 Apr  8 10:54 stacktrace-1617872047-4068046.log
-r--r--r-- 1 iron iron 802 Apr  8 10:54 stacktrace-1617872088-4125569.log
-r--r--r-- 1 iron iron 802 Apr  8 11:56 stacktrace-1617875817-4184416.log
-r--r--r-- 1 iron iron 802 Apr  8 12:18 stacktrace-1617877116-4185199.log
-r--r--r-- 1 iron iron 801 Apr  8 15:02 stacktrace-1617886956-163669.log
-r--r--r-- 1 iron iron 801 Apr  8 15:30 stacktrace-1617888628-181277.log
-r--r--r-- 1 iron iron 801 Apr  8 17:51 stacktrace-1617897095-346438.log
-r--r--r-- 1 iron iron 801 Apr  8 18:20 stacktrace-1617898841-390843.log
-r--r--r-- 1 iron iron 801 Apr  8 19:21 stacktrace-1617902475-401763.log
-r--r--r-- 1 iron iron 801 Apr  8 20:09 stacktrace-1617905361-529657.log
-r--r--r-- 1 iron iron 801 Apr  8 20:12 stacktrace-1617905543-530659.log
-r--r--r-- 1 iron iron 801 Apr  8 20:21 stacktrace-1617906103-534272.log
-r--r--r-- 1 iron iron 801 Apr  8 20:35 stacktrace-1617906944-544474.log
-r--r--r-- 1 iron iron 801 Apr  8 20:49 stacktrace-1617907747-559037.log
-r--r--r-- 1 iron iron 320 Apr  8 21:06 stacktrace-1617908798-573133.log
-r--r--r-- 1 iron iron 801 Apr  8 22:37 stacktrace-1617914229-666695.log

$ cat stacktrace-1617914229-666695.log

PID 666695 received SIGSEGV for address: 0x0
/home/iron/ironfish/node_modules/segfault-handler/build/Release/segfault-handler.node(+0x3785)[0x7fa4bf3e4785]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7fa4bf07f3c0]
/home/iron/ironfish/node_modules/wrtc/build/Release/wrtc.node(+0x2ae2a7)[0x7fa4a532d2a7]
/home/iron/ironfish/node_modules/wrtc/build/Release/wrtc.node(+0x2accb6)[0x7fa4a532bcb6]
/home/iron/ironfish/node_modules/wrtc/build/Release/wrtc.node(+0xb3f72)[0x7fa4a5132f72]
/home/iron/ironfish/node_modules/wrtc/build/Release/wrtc.node(+0xb4dcf)[0x7fa4a5133dcf]
/home/iron/ironfish/node_modules/wrtc/build/Release/wrtc.node(+0x1b83b8)[0x7fa4a52373b8]
/home/iron/ironfish/node_modules/wrtc/build/Release/wrtc.node(+0x1cc1ed)[0x7fa4a524b1ed]
/usr/bin/node[0x9b8c6f]
/usr/bin/node[0x139b3ed]

Blocks mined shows incorrect amount

Running ironfish miners:mined shows much fewer blocks than I have actually mined (On the left is ironfish miners:mined on the right is the blocks actually mined):

image

Exporting mined block from 1 -> 3312
00000005b418ff1bee10284b60f9f4cadfb70571493a22b10970282559f73abb default 20 MAIN 1993: view in web
0000006d1972fc704cba46184bf5042c46a0d03367269b0fc5fca083741fbde3 default 20 MAIN 2004: view in web
0000007fbbda74c6c85eca21da68dfdb4b9d08f4c4f0c192a22b9c0dae3f599b default 20 MAIN 2012: view in web
000000722023dee618e71f841e27353d5ca48bbea30ad9277aa4578be249818f default 20 MAIN 2057: view in web
00000023335a0e926ba4317f2c7c7b7c5bb6fd741db6190bdc97accb04192d09 default 20 MAIN 2148: view in web
0000003abab55ee41a0ecfb82b8f0f1dacd820dd9691d995b42a07bb08263bb4 default 20 MAIN 2236: view in web
0000002e780449951ce1f10b73847cc910e9e59297a537a6905f347c85488159 default 20 MAIN 2293: view in web
000000386dfdb90c772bd8298e824be41581c832cf908966530932d5b7e99da5 default 20 MAIN 2307: view in web
000000111ef7da2a9428985e8ccffd09f108b72c5c98055e9e51a434b712ab1e default 20 MAIN 2412: view in web
000000050b58f4941d03f76861a2bd098b74891856925f86636a5f9b604c537f default 20 MAIN 2557: view in web
000000054ea39570ba4d271d76cbbe3e1ada135a17c85bed04879a495dae9669 default 20 MAIN 3030: view in web
00000002fd49d21f936f3b7c6199959fbde83f305a70b8701796bd68b103401c default 20 MAIN 3296: view in web
Starting to mine with 7 threads
Submitting hash for block 1993 on request 7 (5736139675215568)
Submitting hash for block 2004 on request 18 (255264717240277)
Submitting hash for block 2012 on request 26 (8043460617275522)
Submitting hash for block 2034 on request 49 (376878631972230)
Submitting hash for block 2057 on request 74 (7998747506209830)
Submitting hash for block 2080 on request 98 (2382528076171591)
Submitting hash for block 2148 on request 171 (8947350981963191)
Submitting hash for block 2178 on request 203 (1626497567707570)
Submitting hash for block 2210 on request 239 (2364300450674606)
Submitting hash for block 2236 on request 268 (1545723624750108)
Submitting hash for block 2293 on request 330 (6712706181200427)
Submitting hash for block 2307 on request 344 (2566272658477294)
Submitting hash for block 2412 on request 456 (8980068995789577)
Submitting hash for block 2468 on request 519 (1924303586221211)
Submitting hash for block 2557 on request 617 (3315686123177657)
Submitting hash for block 3030 on request 1118 (5912270041165313)
Not connected to a node - waiting 5s before retrying
Starting to mine with 7 threads
Submitting hash for block 3271 on request 22 (8699893836991765)
Submitting hash for block 3296 on request 49 (6739170551846981)
Submitting hash for block 3323 on request 81 (2913925304896520)```

run ironfish Log stuck

docker runs ironfish log for the first time and gets stuck,I don't know if the node is running。
IMG_20211201_000612

Building & Running on Ubuntu from source requires a workaround

Context

  • I am running Iron Fish on Ubuntu.
  • The build from source works alright.
  • But when I try to run the node, it gives an error.
  • Luckily, a community member posted a workaround for now.
  • Keen to see if/when/how we can resolve the error.

Environment Version

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal
$ node -v
v14.16.1
$ rustup -V
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.51.0 (2fd73fabe 2021-03-23)`
$ yarn -v
1.22.5

Command

$ cd ironfish
$ ironfish-cli/bin/run start

Error

TypeError: Cannot read property 'box' of undefined

Workaround

$ cd ironfish-cli
$ yarn start:js start

Output

yarn run v1.22.5
$ OCLIF_TS_NODE=0 IRONFISH_DEBUG=1 node bin/run start


::::::::::          :::::::::::::::::
::::::::::::       :::::::::::::::::::
:::::::::::::     :::::::::::::::::::::
::::::::::::::   ::::::::::::::::::::::::
 ::::::::::::: ::::::::::        :::::::::
   :::::::::::::::::::::          ::::::::::
   :::::::::::::::::::::          :::::::::
 ::::::::::::: ::::::::::        :::::::::
::::::::::::::   ::::::::::::::::::::::::
:::::::::::::     :::::::::::::::::::::
::::::::::::       :::::::::::::::::::
::::::::::           ::::::::::::::::

Peer Identity                 nifCWCJF13mAdej5LIhoZOk8Kr9dWrGC5LkCxmba3xg=
Peer Version                  ironfish-sdk/1/cli
Port                          9033
Bootstrap                     test.bn1.ironfish.network

WebSocket server started at :::9033
Connected to the Iron Fish network

Resources
Iron Fish Installation - Linux

Ignoring unsupported ICE candidate

Created this to publically track this issue. It's caused by a bug inside the SimplePeer library. It's an ignorable error.

We filed a ticket on their repro, and are looking at workarounds for now, potentially by forking that library.

See feross/simple-peer#811

Node won't sync from Docker or CLI

I'm running the node from the docker image, ironfish-cli installed and working as expected. Tests all pass.

As the node attempts to connect to peers, it bans each peer in turn with the following error:

Peer kPA/lIK (SIN5A) sent an invalid block. score: 10, hash: 00000...6da7a (
294880
), reason: error

This repeats endlessly for each peer that connects.

ironfish status output:

Node STARTED @ 3813c31
P2P Network CONNECTED - In: 83 KB/s, Out: 5 KB/s, peers 12
Mining STOPPED - 0 miners, 0 mined
Mem Pool 0 tx
Syncer IDLE @ 1.83 blocks per seconds
Blockchain NOT SYNCED @ HEAD 00007981659f7ae2cc6432543256b67ecc4861e07fd1aab4c8336e12742ad589 (420313)
Workers STARTED - 0 -> 0 / 11 - 0 jobs Δ, 6.6 jobs/s

Version info:

name ironfish
version 0.1.0
git src
runtime node/14.18.0

What am I missing?

Accounts export does not support directory

IF you try to use ironfish accounts:export default ~/ you will get an error like this...

Error: EISDIR: illegal operation on a directory, open '/home/dvm/IRON/iii/ironfish/ironfish-cli'
    at Object.openSync (fs.js:498:3)
    at Object.writeFileSync (fs.js:1524:35)
    at ExportCommand.start (/home/dvm/IRON/iii/ironfish/ironfish-cli/build/commands/accounts/export.js:26:26)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async ExportCommand.run (/home/dvm/IRON/iii/ironfish/ironfish-cli/build/command.js:22:13)
    at async ExportCommand._run (/home/dvm/IRON/iii/ironfish/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/home/dvm/IRON/iii/ironfish/node_modules/@oclif/config/lib/config.js:173:24)
    at async Main.run (/home/dvm/IRON/iii/ironfish/node_modules/@oclif/command/lib/main.js:27:9)
    at async Main._run (/home/dvm/IRON/iii/ironfish/node_modules/@oclif/command/lib/command.js:43:20)

This code needs to detect its exporting to a directory and specify a default export name here.

https://github.com/iron-fish/ironfish/blob/master/ironfish-cli/src/commands/accounts/export.ts#L49-L50

Reported here, https://discord.com/channels/771503434028941353/816795916627345450/879788757430181918

Connection Refused error

Getting the following error when starting a node and checking the status.
Error: connect ECONNREFUSED 54.84.67.207:9033

image

ironfish miner stops every time with the error "Command failed with exit code 1."

Every time when I restart my miner it stops with the error like below. Tho sometimes it can mine 1-2 blocks before stops, but it has never worked smoothly.

Oct 28 20:45:56 vmi675023.contaboserver.net systemd[1]: Started IronFish Miner.
Oct 28 20:45:56 vmi675023.contaboserver.net yarn[790190]: yarn run v1.22.11
Oct 28 20:45:56 vmi675023.contaboserver.net yarn[790190]: $ node start miners:start -t -1
Oct 28 20:45:57 vmi675023.contaboserver.net yarn[790221]: [52B blob data]
Oct 28 20:45:57 vmi675023.contaboserver.net yarn[790221]: 8:45:57 PM - Found 0 errors. Watching for file changes.
Oct 28 20:45:58 vmi675023.contaboserver.net yarn[790243]: $ cross-env OCLIF_TS_NODE=0 IRONFISH_DEBUG=1 node bin/run miners:start -t -1
Oct 28 20:45:59 vmi675023.contaboserver.net yarn[790262]: Starting to mine with 10 threads
Oct 28 20:59:57 vmi675023.contaboserver.net yarn[790262]: Mining a block... !
Oct 28 20:59:57 vmi675023.contaboserver.net yarn[790243]: `error Command failed with exit code 1.`
Oct 28 20:59:57 vmi675023.contaboserver.net yarn[790243]: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

how to run CLI when installed using docker on Ubuntu

Hi there,

Looking for help on how to run ironfish after installing using docker on ubuntu. I just get "command not found" when using ironfish start in the command line.

If I try run the docker command again (the one under the install instruction for linux) it says that the another node is using the database.

Complete noob so any help in layman's terms would be greatly appreciated.

Thanks,

Import an Account

Screen Shot 2021-04-07 at 11 25 50 AM

It looks like there's either confusion around how to import an account without a file, or the command is not prompting the user to enter in account details.

libc++abi: terminating

https://discord.com/channels/771503434028941353/828778383918891038/867529972112424981

Snowgirl ran into this issue on the beta branch testing the new WebRTC

Reorganized chain. blocks: 1, old: 00000...4ae85 (176793), new: 00000...05d2d (176792), fork: 00000...05d2d (176792)
Added block to fork seq: 176793, head-seq: 176793, hash: 00000...dac9d, head-hash: 00000...e9e91, work: 46840437769338, head-work: 46840437769338, work-diff: 0
libc++abi: terminating
/usr/local/bin/ironfishbeta: line 46: 11947 Abort trap: 6           "$NODE" "$DIR/run" "$@"

Ironfish CLI does not start

System:
Linux vps 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Status:
service ironfishd status

ironfishd.service - IronFish Node
Loaded: loaded (/etc/systemd/system/ironfishd.service; enabled; vendor pre>
Active: active (running) since Sun 2021-08-15 19:43:53 UTC; 18min ago
Main PID: 987 (node)
Tasks: 91 (limit: 629145)
Memory: 681.3M
CGroup: /system.slice/ironfishd.service
├─ 987 node /usr/bin/yarn --cwd /root/ironfish/ironfish-cli/ start>
├─1117 /bin/sh -c node start start
├─1118 /usr/bin/node start start
├─1147 /bin/sh -c tsc-watch --build --onSuccess "yarn run start:js>
├─1149 /usr/bin/node /root/ironfish/ironfish-cli/node_modules/.bin>
├─1197 /usr/bin/node /root/ironfish/node_modules/typescript/bin/ts>
├─1271 /usr/bin/node /usr/bin/yarn run start:js start
├─1303 /bin/sh -c cross-env OCLIF_TS_NODE=0 IRONFISH_DEBUG=1 node >
├─1304 /usr/bin/node /root/ironfish/ironfish-cli/node_modules/.bin>
└─1319 /usr/bin/node bin/run start

Aug 15 20:02:26 vps yarn[1319]: Connected to the Iron Fish network
Aug 15 20:02:26 vps yarn[1319]: Starting sync from 1MhOpDu (bootstrap). work: +>
Aug 15 20:02:26 vps yarn[1319]: Found peer 1MhOpDu (bootstrap) ancestor e12b4..>
Aug 15 20:02:26 vps yarn[1319]: Requesting 20 blocks starting at e12b4...5978c >
Aug 15 20:02:28 vps yarn[1319]: Added block seq: 20, hash: 00007...043e2, txs:

service ironfishd-miner status
ironfishd-miner.service - IronFish Miner
Loaded: loaded (/etc/systemd/system/ironfishd-miner.service; enabled; vend>
Active: active (running) since Sun 2021-08-15 19:43:53 UTC; 20min ago
Main PID: 986 (node)
Tasks: 68 (limit: 629145)
Memory: 342.4M
CGroup: /system.slice/ironfishd-miner.service
├─ 986 node /usr/bin/yarn --cwd /root/ironfish/ironfish-cli/ start>
├─1126 /bin/sh -c node start miners:start -t -1
├─1128 /usr/bin/node start miners:start -t -1
├─1145 /bin/sh -c tsc-watch --build --onSuccess "yarn run start:js>
├─1148 /usr/bin/node /root/ironfish/ironfish-cli/node_modules/.bin>
├─1202 /usr/bin/node /root/ironfish/node_modules/typescript/bin/ts>
├─1272 /usr/bin/node /usr/bin/yarn run start:js miners:start -t -1
├─1311 /bin/sh -c cross-env OCLIF_TS_NODE=0 IRONFISH_DEBUG=1 node >
├─1312 /usr/bin/node /root/ironfish/ironfish-cli/node_modules/.bin>
└─1320 /usr/bin/node bin/run miners:start -t -1

Aug 15 19:43:53 vps systemd[1]: Started IronFish Miner.
Aug 15 19:43:55 vps yarn[986]: yarn run v1.22.11
Aug 15 19:43:55 vps yarn[986]: $ node start miners:start -t -1
Aug 15 19:43:56 vps yarn[1148]: [52B blob data]
Aug 15 19:43:56 vps yarn[1148]: 7:43:56 PM - Found 0 errors. Watching for file

sudo ironfish status -f

internal/modules/cjs/loader.js:892
throw err;
^

Error: Cannot find module '/usr/bin/run'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:889:15)
at Function.Module._load (internal/modules/cjs/loader.js:745:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}


please advise how to fix

ironfish miners:mined not showing correct results

HI Team

I have mined 2 blocks successfully, but when I view the blocks mined (ironfish miners:mined) its showing 4 entries. The last 2 blocks are not mine. Why is showing like that?
My graffiti : saneesh.eth
Mail id : [email protected]

ironfish miners:mined

Scanning for mined blocks
Exporting mined block from 1 -> 5330
0000000cfc52c6c94102da5599cc30a99ec2855f9a2c035c49b01debb2908679 saneesh.eth 20 MAIN 2844: view in web
000000036d19ee8336fed688f744e496bb24402a3713791f7f9048f8c942604d saneesh.eth 20 MAIN 2910: view in web
0000000050597dfe10efa0d797907ba3333f87dcd4f2b912053a9024b118827a saneesh.eth 20 MAIN 4685: view in web
000000003bed9482f67d684d1dff5007b3855defde3f83fcaac6eb4159521150 saneesh.eth 20 MAIN 4702: view in web
Exporting blocks: [========================================] 5325/5330 99% | ETA: soon | SEQ 5326#

iron fish issue

Node stops responding to commands

Following the instructions from the readme files, no responses appear from the CLI on my M1 MBP.

I can connect to the IronFish network, but nothing else:

account:giveme asks me for my email, then does nothing.
accounts:balance never responds.
miners:start just starts a loading state and never gives any additional info.

I only noticed something was wrong and not by design seeing a different response from accounts:giveme in the documentation.

Anyone else having similar issues? Tips on debugging?

CLI doesn't respond at all

trying to enableTelemetry but CLI doesn't respond, also can't check node or miners state, or at least account balance.

Снимок экрана 2021-04-25 в 13 46 51
Снимок экрана 2021-04-25 в 13 39 23
Снимок экрана 2021-04-25 в 13 39 56
Снимок экрана 2021-04-25 в 13 44 32

having trouble with my IRON balance again

I again facing this error All decryptable notes should be in the noteToNullifier map when trying to check my node balance. Last time the command ironfish accounts:rescan --reset reset my balance to 0, so maybe there is another way to fix this bug?

the beta-node doesn't sync, neither mining or showing balance

Hello, I'm running Ironfish node version 0.1.0 and it stopped mining and syncing from Aug 05. What should I do to fix it? Already tried to restart both miner and node a couple of times but it didn't help, though both are active. My node name is: alterkahn

Снимок экрана 2021-08-17 в 17 45 32
Снимок экрана 2021-08-17 в 17 36 35
Снимок экрана 2021-08-17 в 17 38 24
Снимок экрана 2021-08-17 в 17 51 32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.