feat: beta release v0.1.5

This commit is contained in:
Cyrix126 2024-03-28 22:38:04 +01:00
parent 17043bfe38
commit 6dcb393fce
4 changed files with 96 additions and 56 deletions

View file

@ -1,3 +1,19 @@
# v0.1.5
Fix release for beta version.
This version is only made for testing purposes and have feedbacks.
## Changes
update dependencies of UI
replace old http client
## Fixes
fix formatting hr algorithm
fix private round calculation
## Bundled Versions
* [`P2Pool v3.10`](https://github.com/SChernykh/p2pool/releases/tag/v3.10)
* [`XMRig v6.21.1`](https://github.com/xmrig/xmrig/releases/tag/v6.21.1)
# v0.1.4 # v0.1.4
Fix release for beta version. Fix release for beta version.
This version is only made for testing purposes and have feedbacks. This version is only made for testing purposes and have feedbacks.

6
Cargo.lock generated
View file

@ -2070,7 +2070,7 @@ dependencies = [
[[package]] [[package]]
name = "gupaxx" name = "gupaxx"
version = "0.1.4" version = "0.1.5"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"benri", "benri",
@ -3176,9 +3176,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]] [[package]]
name = "openssl-sys" name = "openssl-sys"
version = "0.9.101" version = "0.9.102"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2"
dependencies = [ dependencies = [
"cc", "cc",
"libc", "libc",

View file

@ -1,7 +1,7 @@
cargo-features = ["profile-rustflags"] cargo-features = ["profile-rustflags"]
[package] [package]
name = "gupaxx" name = "gupaxx"
version = "0.1.4" version = "0.1.5"
authors = ["cyrix126 <gupaxx@baermail.fr>"] authors = ["cyrix126 <gupaxx@baermail.fr>"]
description = "Fork of Gupax integrating the XMRvsBeast Raffle " description = "Fork of Gupax integrating the XMRvsBeast Raffle "
documentation = "https://github.com/cyrix126/gupaxx" documentation = "https://github.com/cyrix126/gupaxx"

View file

@ -1090,10 +1090,12 @@ mod test {
// given time should always be less than XVB_TIME_ALGO // given time should always be less than XVB_TIME_ALGO
assert!(given_time < XVB_TIME_ALGO); assert!(given_time < XVB_TIME_ALGO);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::Vip) Some(XvbRound::Vip)
@ -1109,10 +1111,12 @@ mod test {
); );
assert_eq!(given_time, 96); assert_eq!(given_time, 96);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::Vip) Some(XvbRound::Vip)
@ -1133,10 +1137,12 @@ mod test {
// given time should always be less than XVB_TIME_ALGO // given time should always be less than XVB_TIME_ALGO
assert!(given_time < XVB_TIME_ALGO); assert!(given_time < XVB_TIME_ALGO);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::Donor) Some(XvbRound::Donor)
@ -1152,10 +1158,12 @@ mod test {
); );
assert_eq!(given_time, 204); assert_eq!(given_time, 204);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::Donor) Some(XvbRound::Donor)
@ -1176,10 +1184,12 @@ mod test {
// given time should always be less than XVB_TIME_ALGO // given time should always be less than XVB_TIME_ALGO
assert!(given_time < XVB_TIME_ALGO); assert!(given_time < XVB_TIME_ALGO);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorVip) Some(XvbRound::DonorVip)
@ -1195,10 +1205,12 @@ mod test {
); );
assert_eq!(given_time, 446); assert_eq!(given_time, 446);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorVip) Some(XvbRound::DonorVip)
@ -1219,10 +1231,12 @@ mod test {
// given time should always be less than XVB_TIME_ALGO // given time should always be less than XVB_TIME_ALGO
assert!(given_time < XVB_TIME_ALGO); assert!(given_time < XVB_TIME_ALGO);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorWhale) Some(XvbRound::DonorWhale)
@ -1238,10 +1252,12 @@ mod test {
); );
assert_eq!(given_time, 573); assert_eq!(given_time, 573);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorWhale) Some(XvbRound::DonorWhale)
@ -1262,10 +1278,12 @@ mod test {
// given time should always be less than XVB_TIME_ALGO // given time should always be less than XVB_TIME_ALGO
assert!(given_time < XVB_TIME_ALGO); assert!(given_time < XVB_TIME_ALGO);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorMega) Some(XvbRound::DonorMega)
@ -1281,10 +1299,12 @@ mod test {
); );
assert_eq!(given_time, 597); assert_eq!(given_time, 597);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; * lock!(gui_api_xmrig).hashrate_raw_15m)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = / 1000.0;
(given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m; lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32)
* lock!(gui_api_xmrig).hashrate_raw_15m)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorMega) Some(XvbRound::DonorMega)
@ -1306,12 +1326,14 @@ mod test {
// given time should always be less than XVB_TIME_ALGO // given time should always be less than XVB_TIME_ALGO
assert!(given_time < XVB_TIME_ALGO); assert!(given_time < XVB_TIME_ALGO);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) lock!(gui_api_xvb).stats_priv.donor_1hr_avg =
* lock!(gui_api_xmrig).hashrate_raw_15m) (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m)
+ 5000.0; + 5000.0)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) / 1000.0;
* lock!(gui_api_xmrig).hashrate_raw_15m) lock!(gui_api_xvb).stats_priv.donor_24hr_avg =
+ 5000.0; (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m)
+ 5000.0)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorVip) Some(XvbRound::DonorVip)
@ -1328,12 +1350,14 @@ mod test {
); );
assert_eq!(given_time, 378); assert_eq!(given_time, 378);
// verify that right round should be detected. // verify that right round should be detected.
lock!(gui_api_xvb).stats_priv.donor_1hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) lock!(gui_api_xvb).stats_priv.donor_1hr_avg =
* lock!(gui_api_xmrig).hashrate_raw_15m) (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m)
+ 5000.0; + 5000.0)
lock!(gui_api_xvb).stats_priv.donor_24hr_avg = ((given_time as f32 / XVB_TIME_ALGO as f32) / 1000.0;
* lock!(gui_api_xmrig).hashrate_raw_15m) lock!(gui_api_xvb).stats_priv.donor_24hr_avg =
+ 5000.0; (((given_time as f32 / XVB_TIME_ALGO as f32) * lock!(gui_api_xmrig).hashrate_raw_15m)
+ 5000.0)
/ 1000.0;
assert_eq!( assert_eq!(
XvbPrivStats::round_type(share, &gui_api_xvb), XvbPrivStats::round_type(share, &gui_api_xvb),
Some(XvbRound::DonorVip) Some(XvbRound::DonorVip)