Git Product home page Git Product logo

amd-miner's Introduction

Alephium

codecov Discord

This repository contains the reference implementation of Alephium, a sharded blockchain that makes programmable money scalable and secure. For more information, please visit the wiki.

Overview

The protocol's innovations extend battle-tested ideas from Bitcoin and Ethereum:

  • BlockFlow algorithm based on UTXO model enables sharding and scalability for today (code + algorithm paper)
    • The first sharding algorithm that supports single-step cross-shard transactions, offering the same user experience as single chain
    • Simple and elegant PoW based sharding, does not rely on beacon chain
  • Stateful UTXO model combines the advantages of both eUTXO model and account model (see code, wiki to come)
    • Tokens are first-class citizens and UTXO-based, which are owned by users directly instead of contracts
    • Offer the same expressiveness as account model. DApps can be easily built on top of it with better security
    • Support multiple participants in a single smart contract transaction. Multiple calls can be packed into a single transaction too.
  • Novel VM design resolves many critical challenges of dApp platforms (see code, wiki to come)
    • Less IO intensive
    • Flash loan is not available by design
    • Eliminate many attack vectors of EVM, including unlimited authorization, double dip issue, reentrancy attack, etc
    • UTXO style fine-grained execution model reduces risk-free arbitrage
  • PoLW algorithm reduces the energy consumption of PoW in the long term (research paper)
    • Adaptive rewards based on hashrate and timestamp are designed and implemented
    • Internal mining cost through burning will be activated when hashrate and energy consumption is significantly high

Installation

Prerequisites

The following dependencies must be installed in order to run the JAR deliverable:

  • java (11+)

Running

You can obtain our latest single JAR distribution from the GitHub releases and start the application using the following command:

java -jar alephium-<VERSION>.jar

Build From Source

Requirements

In order to build the project from source the following dependencies must be installed on your system:

  • java (11+)
  • SBT

Single JAR

Use the following command to build a single runnable JAR :

make assembly

The resulting assembly file will appear in /app/target/scala-2.13/ directory.

Universal Zip distribution

Use the following command to build a zip distribution including launch scripts:

make package

The resulting package file will appear in the app/target/scala-2.13/universal directory.

Docker Image

Use the following command to build a docker image:

make docker

Configuration

You can define user specific settings in the file $ALEPHIUM_HOME/user.conf, where by default $ALEPHIUM_HOME points to ~/.alephium.

Testing

There are two kinds of tests:

  1. Unit tests and property based tests, which can be run with the make test command.
  2. Integration tests, which can be run with the make itest command.

Contribution

Have a look at our contribution guide described in CONTRIBUTING.md

Acknowledgements

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications. YourKit is the creator of YourKit Java Profiler, YourKit .NET Profiler, and YourKit YouMonitor.

amd-miner's People

Contributors

capito27 avatar h0ngcha0 avatar lbqds avatar polarker avatar styp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amd-miner's Issues

CL_INVALID_KERNEL error on 12 GPUs

I have opencl 1.2 and amd-miner 0.2.0 installed on my rig with 12 GPUs RX580
But it cannot mine

root@rad-1:~/alephium# ./alephium-0.2.0-amd-miner-linux -a 192.168.1.100
Running amd-miner version : release-v0.2.0
platform: AMD Accelerated Parallel Processing
platform: 0 has 12 devices
==== build ===
...
==== build ===

opencl error -46 calling 'self->kernel = clCreateKernel(self->program, "blake3_hasher_mine", &err)' (/home/runner/work/amd-miner/amd-miner/src/worker.h line 81)
opencl error -11 calling 'clBuildProgram(self->program, 1, &self->device_id, NULL, NULL, NULL)' (/home/runner/work/amd-miner/amd-miner/src/worker.h line 79)
==== build === fatal error: cannot open file '/usr/lib/clc/polaris10-amdgcn-mesa-mesa3d.bc': No such file or directory

...
hashrate: 341 MH/s gpu0: 5 MH/s gpu1: 177 MH/s gpu2: 53 MH/s gpu3: 0 MH/s gpu4: 0 MH/s gpu5: 106 MH/s gpu6: 0 MH/s gpu7: 2 MH/s gpu8: 0 MH/s gpu9: 0 MH/s gpu10: 0 MH/s gpu11: 0 MH/s gpu12: 0 MH/s gpu13: 0 MH/s gpu14: 0 MH/s gpu15: 0 MH/s gpu16: 0 MH/s gpu17: 0 MH/s gpu18: 0 MH/s gpu19: 0 MH/s gpu20: 0 MH/s gpu21: 0 MH/s gpu22: 0 MH/s gpu23: 0 MH/s
hashrate: 570 MH/s gpu0: 62 MH/s gpu1: 184 MH/s gpu2: 108 MH/s gpu3: 11 MH/s gpu4: 4 MH/s gpu5: 157 MH/s gpu6: 0 MH/s gpu7: 15 MH/s gpu8: 29 MH/s gpu9: 0 MH/s gpu10: 0 MH/s gpu11: 0 MH/s gpu12: 0 MH/s gpu13: 0 MH/s gpu14: 0 MH/s gpu15: 0 MH/s gpu16: 0 MH/s gpu17: 0 MH/s gpu18: 0 MH/s gpu19: 0 MH/s gpu20: 0 MH/s gpu21: 0 MH/s gpu22: 0 MH/s gpu23: 0 MH/s
...
and then it crash with a lot of errors:

opencl error -48 calling 'clSetKernelArg(worker->kernel, 0, sizeof(cl_mem), &worker->device_hasher)' (/home/runner/work/amd-miner/amd-miner/src/mining.h line 27)
opencl error -48 calling 'clEnqueueNDRangeKernel(worker->queue, worker->kernel, 1, NULL, &(worker->grid_size), &(worker->block_size), 0, NULL, NULL)' (/home/runner/work/amd-miner/amd-miner/src/mining.h line 28)

Crashes after work unit #8 or #9 on mixed rig

Running from source pulled and around 8:30am PST 11/26/2021

Rig has 1x Nvidia 3060ti and 1x AMD 6800 (non-xt) running under HiveOS (note - the nvidia 3060ti does just fine with the old miner)
uname -a
Linux mv5800x 5.10.0-hiveos #50.hiveos.210715 SMP Thu Jul 15 10:21:01 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Driver info -
AMD 20.40 (5.11.0701)
Nvidia 465.31

nvidia-info

Fri Nov 26 09:19:32 PST 2021

=== GPU 0, 04:00.0 GeForce RTX 3060 Ti 7982 MB ===
  Bios 94.04.38.40.17, PCIE Link Gen 3, PCIE Link Width 4x
  S/N -, UUID GPU-5986fe60-624e-8046-e33c-a5a327a719d8
  Power Limit:  Min 100.0 W, Default 240.0 W, Max 260.0 W, Current 150.0 W
  Frequency:  GFXCore 1800 MHz, MEMCore 7000 MHz
  Memory:  Total 7982 MB, Used 8 MB, Free 7974 MB, Samsung GDDR6
  Utilization:  GPU 0 %, MEM 0 %, Throttle: Idle
  PSTATE P0, PWR 38.7 W, Temp 45 °C, Fan 52 %, RPM 1019, RPM 1014


amd-info

Fri Nov 26 09:19:46 PST 2021

=== GPU 0, 09:00.0 Radeon RX 6800 16368 MB ===
  Bios: 113-D4120900-101
  Core: 1345 MHz 756mV, Mem: 1000 MHz
  PerfCtrl: manual, Load: 0%, MemLoad: 0%, Power: 34.0 W, Cap: 140 W
  Core: 51°C, HotSpot: 55°C, Mem: 58°C, Fan: 20%, RPM: 660
  Core state: 1, clocks: 500 1345* 1350
  Mem  state: 3, clocks: 96 456 673 1000*
  SOC  state: 1, clocks: 872 1200*
  DCEF state: 1, clocks: 417 960* 1200
  F    state: 0, clocks: 1551* 1551
  PCIE Link speed: n/a, PCIE Link width: n/a
  Memory total: 16368.00 MB, used: 80.41 MB, free: 16287.59 MB, type: Samsung GDDR6

Crashes on 8th or 9th unit every single time. Below values are with no overclocks (but power limits to keep heat down) -

./gpu-miner  -a 172.16.15.10
platform: 0 has 1 devices
platform: 1 has 1 devices
will connect to broker @172.16.15.10:10973
the server is connected 0 0x5560c815bef0
hashrate: 1313 MH/s gpu0: 704 MH/s gpu1: 609 MH/s
hashrate: 1391 MH/s gpu0: 739 MH/s gpu1: 651 MH/s
hashrate: 1409 MH/s gpu0: 756 MH/s gpu1: 653 MH/s
hashrate: 1404 MH/s gpu0: 747 MH/s gpu1: 658 MH/s
hashrate: 1419 MH/s gpu0: 755 MH/s gpu1: 664 MH/s
hashrate: 1425 MH/s gpu0: 760 MH/s gpu1: 665 MH/s
hashrate: 1418 MH/s gpu0: 754 MH/s gpu1: 664 MH/s
opencl error -6 calling 'worker->queue = clCreateCommandQueue(worker->context, worker->device_id, 0, &err)' (src/mining.h line 20)
opencl error -6 calling 'worker->queue = clCreateCommandQueue(worker->context, worker->device_id, 0, &err)' (src/mining.h line 20)
opencl error -6 calling 'worker->queue = clCreateCommandQueue(worker->context, worker->device_id, 0, &err)' (src/mining.h line 20)
opencl error -36 calling 'clEnqueueWriteBuffer(worker->queue, worker->device_hasher, CL_TRUE, 0, hasher_size, worker->hasher, 0, NULL, NULL)' (src/mining.h line 25)
opencl error -36 calling 'clEnqueueNDRangeKernel(worker->queue, worker->kernel, 1, NULL, &(worker->grid_size), &(worker->block_size), 0, NULL, NULL)' (src/mining.h line 27)
opencl error -36 calling 'clEnqueueReadBuffer(worker->queue, worker->device_hasher, CL_TRUE, 0, hasher_size, worker->hasher, 0, NULL, &worker_completed)' (src/mining.h line 30)
Segmentation fault (core dumped)

Repeated with various overclock settings. it crashes consistently.

uv.h: No such file or directory

After the git clone, trying to compile the source using "make" command and got this error :

src/main.cc:11:10: fatal error: uv.h: No such file or directory #include "uv.h" compilation terminated Makefile:13 recipe for target linux-gpu failed

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.