Code Monkey home page Code Monkey logo

rusty_pickaxe's Issues

Improve error handling

There are unwraps everywhere. Should add proper error handling at least for critical ones like getting config or gem info.

error building in ubuntu 21.04

cargo run --features cuda --release config.json

building it with. -> SM_86, compute_86

Compiling rusty_pickaxe v0.0.4 (/home/dnubuntu/downloads/git/denaro/rusty_pickaxe)
The following warnings were emitted during compilation:

warning: nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
warning: In file included from /usr/include/cuda_runtime.h:83,
warning: from :
warning: /usr/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
warning: 139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
warning: | ^~~~~

error: failed to run custom build command for rusty_pickaxe v0.0.4 (/home/dnubuntu/downloads/git/denaro/rusty_pickaxe)

Caused by:
process didn't exit successfully: /home/dnubuntu/downloads/git/denaro/rusty_pickaxe/target/release/build/rusty_pickaxe-def47e0ef59265f6/build-script-build (exit status: 1)
--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-gnu")
CXX_x86_64-unknown-linux-gnu = None
CXX_x86_64_unknown_linux_gnu = None
HOST_CXX = None
CXX = None
NVCC_x86_64-unknown-linux-gnu = None
NVCC_x86_64_unknown_linux_gnu = None
HOST_NVCC = None
NVCC = None
CXXFLAGS_x86_64-unknown-linux-gnu = None
CXXFLAGS_x86_64_unknown_linux_gnu = None
HOST_CXXFLAGS = None
CXXFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "nvcc" "-ccbin=c++" "-Xcompiler" "-O3" "-Xcompiler" "-ffunction-sections" "-Xcompiler" "-fdata-sections" "-Xcompiler" "-fPIC" "-m64" "-I" "./src" "-Xcompiler" "-Wall" "-Xcompiler" "-Wextra" "-cudart=shared" "-gencode" "arch=compute_50,code=sm_50" "-gencode" "arch=compute_52,code=sm_52" "-gencode" "arch=compute_60,code=sm_60" "-gencode" "arch=compute_61,code=sm_61" "-gencode" "arch=compute_75,code=sm_75" "-gencode" "arch=compute_86,code=sm_86" "-o" "/home/dnubuntu/downloads/git/denaro/rusty_pickaxe/target/release/build/rusty_pickaxe-6f5eb213ebf68f2a/out/./src/keccak.o" "-c" "./src/keccak.cu"
cargo:warning=nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
cargo:warning=In file included from /usr/include/cuda_runtime.h:83,
cargo:warning= from :
cargo:warning=/usr/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
cargo:warning= 139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
cargo:warning= | ^~~~~
exit status: 1

--- stderr

error occurred: Command "nvcc" "-ccbin=c++" "-Xcompiler" "-O3" "-Xcompiler" "-ffunction-sections" "-Xcompiler" "-fdata-sections" "-Xcompiler" "-fPIC" "-m64" "-I" "./src" "-Xcompiler" "-Wall" "-Xcompiler" "-Wextra" "-cudart=shared" "-gencode" "arch=compute_50,code=sm_50" "-gencode" "arch=compute_52,code=sm_52" "-gencode" "arch=compute_60,code=sm_60" "-gencode" "arch=compute_61,code=sm_61" "-gencode" "arch=compute_75,code=sm_75" "-gencode" "arch=compute_86,code=sm_86" "-o" "/home/dnubuntu/downloads/git/denaro/rusty_pickaxe/target/release/build/rusty_pickaxe-6f5eb213ebf68f2a/out/./src/keccak.o" "-c" "./src/keccak.cu" with args "nvcc" did not execute successfully (status code exit status: 1).

Errors while compiling in windows

Hi
I get the following error while compiling in windows

Compiling rusty_pickaxe v0.0.1 (C:\rusty_pickaxe)
warning: unused import: `FromHex`
 --> src\main.rs:6:17
  |
6 | use rustc_hex::{FromHex, ToHex};
  |                 ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `Options`
 --> src\main.rs:8:32
  |
8 | use web3::contract::{Contract, Options};
  |                                ^^^^^^^

warning: unused imports: `Bytes`, `H160`, `H256`
 --> src\main.rs:9:28
  |
9 | use web3::types::{Address, Bytes, H160, H256, U256};
  |                            ^^^^^  ^^^^  ^^^^

error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
   --> src\main.rs:35:69
    |
19  |   async fn main() -> web3::Result<()> {
    |  _____________________________________-
20  | |     env_logger::init();
21  | |     let config_path = std::env::args().nth(1).expect("no config given");
22  | |     let mut file = File::open(config_path).unwrap();
...   |
35  | |     let transport = web3::transports::Http::new(&config.network.rpc)?;
    | |                                                                     ^ cannot use the `?` operator in an async block that returns `()`
...   |
114 | |
115 | | }
    | |_- this function should return `Result` or `Option` to accept `?`
    |
    = help: the trait `FromResidual<Result<Infallible, web3::Error>>` is not implemented for `()`
note: required by `from_residual`

error[E0277]: the `?` operator can only be used in an async block that returns `Result` or `Option` (or another type that implements `FromResidual`)
   --> src\main.rs:37:47
    |
19  |   async fn main() -> web3::Result<()> {
    |  _____________________________________-
20  | |     env_logger::init();
21  | |     let config_path = std::env::args().nth(1).expect("no config given");
22  | |     let mut file = File::open(config_path).unwrap();
...   |
37  | |     let chain_id = web3.eth().chain_id().await?;
    | |                                               ^ cannot use the `?` operator in an async block that returns `()`
...   |
114 | |
115 | | }
    | |_- this function should return `Result` or `Option` to accept `?`
    |
    = help: the trait `FromResidual<Result<Infallible, web3::Error>>` is not implemented for `()`
note: required by `from_residual`

error[E0308]: mismatched types
   --> src\main.rs:68:5
    |
19  |   async fn main() -> web3::Result<()> {
    |                      ---------------- expected `Result<(), web3::Error>` because of return type
...
68  | /     loop {
69  | |         //let eth_nonce = web3.eth().transaction_count(config.address, None).await.unwrap();
70  | |         let tx = contract.query("nonce", (config.address,), config.address, web3::contract::Options::default(), None);
71  | |         let eth_nonce_tx: (U256, ) = tx.await.unwrap();
...   |
112 | |         if !config.r#loop { break; }
113 | |     };
    | |______^ expected enum `Result`, found `()`
    |
    = note:   expected enum `Result<(), web3::Error>`
            found unit type `()`
help: try using a variant of the expected enum
    |
68  |     utils::_::_serde::__private::Ok(loop {
69  |         //let eth_nonce = web3.eth().transaction_count(config.address, None).await.unwrap();
70  |         let tx = contract.query("nonce", (config.address,), config.address, web3::contract::Options::default(), None);
71  |         let eth_nonce_tx: (U256, ) = tx.await.unwrap();
72  |         let eth_nonce = eth_nonce_tx.0.as_u32();
73  |
  ...

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
warning: `rusty_pickaxe` (bin "rusty_pickaxe") generated 3 warnings
error: could not compile `rusty_pickaxe` due to 3 previous errors; 3 warnings emitted

cant build - linux 21.04 cpu

thread 'main' panicked at 'called Result::unwrap() on an Err value: Error("invalid length 17, expected a 0x-prefixed hex string with length of 40", line: 10, column: 36)', src/main.rs:125:69
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Can't running with ubuntu

I followed install instructions but I met a problem.

OS

ubuntu

cargo version

(base) ➜  rusty_pickaxe cargo version
cargo 1.55.0 (32da73ab1 2021-08-23)

GPU verion

(base) ➜  rusty_pickaxe lspci | grep VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7)

result

(base) ➜  rusty_pickaxe RUST_BACKTRACE=1 cargo run --release config.json
warning: unused import: `FromHex`
 --> src/main.rs:6:17
  |
6 | use rustc_hex::{FromHex, ToHex};
  |                 ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `Options`
 --> src/main.rs:8:32
  |
8 | use web3::contract::{Contract, Options};
  |                                ^^^^^^^

warning: unused imports: `Bytes`, `H160`, `H256`
 --> src/main.rs:9:28
  |
9 | use web3::types::{Address, Bytes, H160, H256, U256};
  |                            ^^^^^  ^^^^  ^^^^

warning: `rusty_pickaxe` (bin "rusty_pickaxe") generated 3 warnings
    Finished release [optimized] target(s) in 0.07s
     Running `target/release/rusty_pickaxe config.json`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("0x prefix is missing", line: 10, column: 34)', src/main.rs:26:65
stack backtrace:
   0: rust_begin_unwind
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:515:5
   1: core::panicking::panic_fmt
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:92:14
   2: core::result::unwrap_failed
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/result.rs:1599:5
   3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   4: tokio::park::thread::CachedParkThread::block_on
   5: tokio::runtime::thread_pool::ThreadPool::block_on
   6: tokio::runtime::Runtime::block_on
   7: rusty_pickaxe::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.