Skip to content

Commit

Permalink
Bump to 2501.
Browse files Browse the repository at this point in the history
Signed-off-by: Pttn <28868425+Pttn@users.noreply.github.com>
  • Loading branch information
Pttn committed Jan 8, 2025
1 parent bee2ac9 commit 7e61237
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 34 deletions.
2 changes: 1 addition & 1 deletion GBTClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "Stella.hpp"
#include "main.hpp"

const std::string cbMsg("/rM0.94/");
const std::string cbMsg("/rM51/");
static std::vector<uint8_t> coinbaseGen(const std::vector<uint8_t> &scriptPubKey, const uint32_t height, const uint64_t coinbasevalue, const std::vector<uint8_t> &dwc) {
std::vector<uint8_t> coinbase;
// Version (01000000)
Expand Down
2 changes: 1 addition & 1 deletion GetDependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

deps=rieMiner0.94Deps
deps=rieMiner2501Deps
if test -f "${deps}.tar.gz" || test -d "${deps}" ; then
echo "Dependencies already downloaded, delete the ${deps}.tar.gz archive and ${deps} folder if you want to download it again."
exit
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VER = 0.94ES
VER = 2501
CXX = g++
M4 = m4
AS = as
Expand Down Expand Up @@ -91,7 +91,7 @@ rieMinerWin64: main.o Stella.o StratumClient.o GBTClient.o Client.o API.o tools.
$(CXX) $(CFLAGS) -o rieMiner $^ $(LIBS)

main.o: main.cpp main.hpp Stella.hpp Client.hpp tools.hpp
$(CXX) $(CFLAGS) -c -o $@ -DversionShort=\"$(VER)\" -DversionString=\"rieMiner$(VER)\" main.cpp
$(CXX) $(CFLAGS) -c -o $@ -DversionShort=\"$(VER)\" -DversionString=\"rieMiner\ $(VER)\" main.cpp

Stella.o: Stella.cpp Stella.hpp
$(CXX) $(CFLAGS) -c -o $@ Stella.cpp
Expand Down
44 changes: 17 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,19 @@ This README is intended for advanced users and will mainly only describe the dif

Happy Mining or Good Luck on finding a new record!

## Minimum requirements
## Recommended Requirements

* Windows 10 or recent enough Linux;
* Virtually any usual 32 or 64 bits CPU (should work for any x86 since Pentium Pro and recent ARMs);
* 512 MiB of RAM (the prime table limit must be manually set at a lower value in the options);
* We only provide binaries for Windows and Linux x64. In the other cases, you must have access to an appropriate build environment and compile yourself the code.
* Windows 11 x64 (latest version) or Debian 12 x64
* AMD Zen 5 Processor (Ryzen 9000) or better, with efficient AVX512 implementation and 8 cores or more
* 16 GiB of RAM or more

Recommended:
We only provide binaries for Windows x64 and Linux x64 + Arm64. In other situations, you are on your own, and must have access to an appropriate build environment and compile yourself the code, as well as find out yourself which modifications might be required for an older version.

* Windows 11 (latest version) or Debian 11;
* Recent x64 with AVX2 (Intel Haswell, AMD Zen2, or better), with 8 cores or more;
* 8 GiB (16 if using more than 8 cores) of RAM or more.
Memory usage can be reduced using the PrimeTableLimit option.

## Compile this program

rieMiner should be compilable on recent Linuxes. Building on another system is not supported, and Debian 11 Amd64 is our reference OS. It should be used for cross compiling in order to generate binaries for other systems, that can be distributed. If you don't have Debian 11, you can install it in a virtual machine, as Dual Boot, or in a spare machine.
rieMiner should be compilable on recent Linuxes. Building on another system is not supported, and Debian 12 Amd64 is our reference OS. It should be used for cross compiling in order to generate binaries for other systems, that can be distributed. If you do not have Debian 12, you can install it in a virtual machine, as Dual Boot, or in a spare machine.

### Native building

Expand All @@ -32,7 +29,6 @@ Here is how to build rieMiner to run it directly on the same computer. Libraries
You will need g++, as, m4, make, and the following dependencies:

* [GMP](https://gmplib.org/)
* [libSSL](https://www.openssl.org/)
* [cURL](https://curl.haxx.se/)
* [NLohmann Json](https://json.nlohmann.me/)

Expand All @@ -44,19 +40,19 @@ apt install g++ make m4 git libgmp-dev libssl-dev libcurl4-openssl-dev nlohmann-
And on an Arch based distribution:

```bash
pacman -S gcc make m4 git gmp openssl curl nlohmann-json
pacman -S gcc make m4 git gmp curl nlohmann-json
```

For Apple Silicon:

```bash
brew install gcc make m4 git gmp openssl@1.1 curl nlohmann-json
brew install gcc make m4 git gmp curl nlohmann-json
```

Then, download the source files, go/`cd` to the directory:

```bash
git clone https://github.com/Pttn/rieMiner.git
git clone https://github.com/RiecoinTeam/rieMiner.git
cd rieMiner
```

Expand All @@ -75,12 +71,12 @@ For other Linux, executing equivalent commands (using `pacman` instead of `apt`,

### Static/Cross Compiling

To generage binaries that can be distributed, cross compiling is done on Debian 11 Amd64. This statically links the libraries and the compiler does not optimize for a particular processor. Here is how you can do it yourself.
To generate binaries that can be distributed, cross compiling is done on Debian 12 Amd64. This statically links the libraries and the compiler does not optimize for a particular processor. Here is how you can do it yourself.

Firstly, make sure that you are running Debian 11 x64. You may need to install some basic tools,
Firstly, make sure that you are running Debian 12 x64. You may need to install some basic tools,

```bash
apt install make m4 git wget lzip
apt install make m4 git wget
```

You will also need appropriate compilers depending on the target system, use this table to find out what to install.
Expand All @@ -92,25 +88,23 @@ You will also need appropriate compilers depending on the target system, use thi
| Linux Arm64 | `g++-aarch64-linux-gnu` |
| Android Arm64 | not in repository, see below |


Now, get the rieMiner's source code.

```bash
git clone https://github.com/Pttn/rieMiner.git
git clone https://github.com/RiecoinTeam/rieMiner.git
cd rieMiner
```

A script that retrieves the dependencies' source codes from Riecoin.dev and compiles them is provided. Run the script with
A script that retrieves the dependencies' source codes from Riecoin.xyz and compiles them is provided. Run the script with

```bash
sh GetDependencies.sh
```

A folder named `rieMiner0.93aDeps` must have appeared. We assume that you are in it when starting a subsection below.

A folder named `rieMiner2501Deps` must have appeared. We assume that you are in it when starting a subsection below.

```bash
cd rieMiner0.94Deps
cd rieMiner2501Deps
```

If you are going to compile for several systems, doing `make clean`s in the rieMiner's directory will be very useful between builds (it will not delete rieMiner binaries). If you already built the dependencies once, you can usually reuse existing `incs` and `libs` folders and skip several steps, though the dependencies may be updated once a while on Riecoin.dev.
Expand Down Expand Up @@ -279,10 +273,6 @@ This work is released under the MIT license, except the modified GMP code which

[More Contributors](https://github.com/Pttn/rieMiner/graphs/contributors)

### Versioning

The version naming scheme is 0.9, 0.99, 0.999 and so on for major versions, analogous to 1.0, 2.0, 3.0,.... The first non 9 decimal digit is minor, etc. For example, the version 0.9925a can be thought as 2.2.5a. A perfect bug-free software will be version 1. No precise criteria have been decided about incrementing major or minor versions for now.

## Contributing

Feel free to do a pull request or open an issue, and I will review it. I am open for adding new features, but I also wish to keep this project minimalist. Any useful contribution will be welcomed.
Expand Down
2 changes: 1 addition & 1 deletion StratumClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "Client.hpp"
#include "Stella.hpp"

constexpr const char* userAgent("rieMiner/0.94");
constexpr const char* userAgent("rieMiner/2501");

static std::array<uint8_t, 32> calculateMerkleRootStratum(const std::vector<std::array<uint8_t, 32>> &merkleBranches) {
std::array<uint8_t, 32> merkleRoot{};
Expand Down
4 changes: 2 additions & 2 deletions main.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
#include "Stella.hpp"

#ifndef versionShort
#define versionShort "0.9x"
#define versionShort "2xxx"
#endif
#ifndef versionString
#define versionString "rieMiner 0.9x"
#define versionString "rieMiner 2xxx"
#endif

static inline std::string timeNowStr() {
Expand Down

0 comments on commit 7e61237

Please sign in to comment.