add typo.yml

This commit is contained in:
hinto.janai 2023-06-01 09:07:06 -04:00
parent b511353710
commit df37784ad7
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
9 changed files with 43 additions and 16 deletions

22
.github/workflows/typo.yml vendored Normal file
View file

@ -0,0 +1,22 @@
# This catches typos.
name: Typo
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: "full"
jobs:
typo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Spell Check
uses: crate-ci/typos@master

View file

@ -58,7 +58,7 @@ Gupax is a GUI for mining [**Monero**](https://github.com/monero-project/monero)
[**`P2Pool`**](https://github.com/SChernykh/p2pool) allows you to create/join decentralized peer-to-peer Monero mining pools.
P2Pool as a concept was [first developed for Bitcoin](https://en.bitcoin.it/wiki/P2Pool) although [failed to stay relevent for various reasons](https://github.com/p2pool/p2pool).
P2Pool as a concept was [first developed for Bitcoin](https://en.bitcoin.it/wiki/P2Pool) although [failed to stay relevant for various reasons](https://github.com/p2pool/p2pool).
In late 2021, [`SChernykh`](https://github.com/SChernykh) rewrote P2Pool from scratch for Monero.
@ -83,7 +83,7 @@ Both Monero and P2Pool have built in miners but XMRig is quite faster than both
**`XMRig`** mines to **`P2Pool`**
**`P2Pool`** fetchs blocks from a **`Monero node`**
**`P2Pool`** fetches blocks from a **`Monero node`**
**`Monero GUI`** runs the **`Monero node`**
@ -699,7 +699,7 @@ Although Gupax uses a temporary folder (`gupax_update_[A-Za-z0-9]`) to store tem
### Bundled vs Standalone
`Bundled` Gupax comes with the latest version of P2Pool/XMRig already in the `zip/tar`.
`Standlone` only contains the Gupax executable.
`Standalone` only contains the Gupax executable.
---

2
external/README.md vendored
View file

@ -3,4 +3,4 @@ These are some external git repositories for various purposes:
| Repo | Purpose |
|------|---------------------|
| egui | [external/egui/crates/eframe/src/native/run.rs] line 41: [.with_srgb(true)]. This line causes a [panic!] inside a Windows VM, from a Linux host. The only change is [.with_srgb()] is set to [false]. This is only used for testing, since ironically, this crashes bare-metal Windows. |
| rust-runas | This contains some interesting code that could be used as an alternative to running proccesses with elevated privilege in Windows for Gupax |
| rust-runas | This contains some interesting code that could be used as an alternative to running processes with elevated privilege in Windows for Gupax |

View file

@ -71,7 +71,7 @@ This is how Gupax works internally when starting up:
- Kill processes, kill connections, exit
## Scale
Every frame, the max available `[width, height]` are calculated, and those are used as a baseline for the Top/Bottom bars, containing the tabs and status bar. After that, all available space is given to the middle ui elements. The scale is calculated every frame so that all elements can scale immediately as the user adjusts it; this doesn't take as much CPU as you might think since frames are only rendered on user interaction. Some elements are subtracted a fixed number because the `ui.seperator()`'s add some fixed space which needs to be accounted for.
Every frame, the max available `[width, height]` are calculated, and those are used as a baseline for the Top/Bottom bars, containing the tabs and status bar. After that, all available space is given to the middle ui elements. The scale is calculated every frame so that all elements can scale immediately as the user adjusts it; this doesn't take as much CPU as you might think since frames are only rendered on user interaction. Some elements are subtracted a fixed number because the `ui.separator()`'s add some fixed space which needs to be accounted for.
```
Main [App] outer frame (default: [1280.0, 960.0], 4:3 aspect ratio)

View file

@ -120,7 +120,7 @@ pub const DARK_GRAY: egui::Color32 = egui::Color32::from_gray(13);
// [Duration] constants
pub const SECOND: std::time::Duration = std::time::Duration::from_secs(1);
// The explaination given to the user on why XMRig needs sudo.
// The explanation given to the user on why XMRig needs sudo.
pub const XMRIG_ADMIN_REASON: &str =
r#"The large hashrate difference between XMRig and other miners like Monero and P2Pool's built-in miners is mostly due to XMRig configuring CPU MSRs and setting up hugepages. Other miners like Monero or P2Pool's built-in miner do not do this. It can be done manually but it isn't recommended since XMRig does this for you automatically, but only if it has the proper admin privileges."#;
// Password buttons
@ -342,7 +342,7 @@ pub const XMRIG_ARGUMENTS: &str =
r#"WARNING: Use [--no-color] and make sure to set [--http-host <IP>] & [--http-port <PORT>] so that the [Status] tab can work!
Start XMRig with these arguments and override all below settings"#;
pub const XMRIG_ADDRESS: &str = "Specify which Monero address to payout to. This does nothing if mining to P2Pool since the address being payed out to will be the one P2Pool started with. This doubles as a rig identifier for P2Pool and some pools.";
pub const XMRIG_ADDRESS: &str = "Specify which Monero address to payout to. This does nothing if mining to P2Pool since the address being paid out to will be the one P2Pool started with. This doubles as a rig identifier for P2Pool and some pools.";
pub const XMRIG_NAME: &str = "Add a unique name to identify this pool; Only [A-Za-z0-9-_.] and spaces allowed; Max length = 30 characters";
pub const XMRIG_IP: &str = "Specify the pool IP to connect to with XMRig; It must be a valid IPv4 address or a valid domain name; Max length = 255 characters";
pub const XMRIG_PORT: &str = "Specify the port of the pool; [1-65535]";

View file

@ -255,7 +255,7 @@ impl State {
}
}
// Conver [State] to [String]
// Convert [State] to [String]
pub fn to_string(&self) -> Result<String, TomlError> {
match toml::ser::to_string(self) {
Ok(s) => Ok(s),

View file

@ -419,7 +419,7 @@ impl Helper {
} else {
// Overriding command arguments
if !state.arguments.is_empty() {
// This parses the input and attemps to fill out
// This parses the input and attempts to fill out
// the [ImgP2pool]... This is pretty bad code...
let mut last = "";
let lock = lock!(helper);
@ -813,7 +813,7 @@ impl Helper {
} else {
// Overriding command arguments
if !state.arguments.is_empty() {
// This parses the input and attemps to fill out
// This parses the input and attempts to fill out
// the [ImgXmrig]... This is pretty bad code...
let mut last = "";
let lock = lock!(helper);
@ -1122,8 +1122,8 @@ impl Helper {
//
// GUI Main -> locks [p2pool] first
// Helper -> locks [gui_api_p2pool] first
// GUI Status Tab -> trys to lock [gui_api_p2pool] -> CAN'T
// Helper -> trys to lock [p2pool] -> CAN'T
// GUI Status Tab -> tries to lock [gui_api_p2pool] -> CAN'T
// Helper -> tries to lock [p2pool] -> CAN'T
//
// These two threads are now in a deadlock because both
// are trying to access locks the other one already has.
@ -1302,7 +1302,7 @@ pub struct PubP2poolApi {
pub p2pool_difficulty: HumanNumber,
pub p2pool_hashrate: HumanNumber,
pub miners: HumanNumber, // Current amount of miners on P2Pool sidechain
// Mean (calcualted in functions, not serialized)
// Mean (calculated in functions, not serialized)
pub solo_block_mean: HumanTime, // Time it would take the user to find a solo block
pub p2pool_block_mean: HumanTime, // Time it takes the P2Pool sidechain to find a block
pub p2pool_share_mean: HumanTime, // Time it would take the user to find a P2Pool share

View file

@ -1246,7 +1246,7 @@ impl eframe::App for App {
// This is separate from the [self.width != available_width] logic above
// because placing [init_text_styles()] above would mean calling it 60x a second
// while the user was readjusting the frame. It's a pretty heavy operation and looks
// buggy when calling it that many times. Looking for a [must_resize] in addtion to
// buggy when calling it that many times. Looking for a [must_resize] in addition to
// checking if the user is hovering over the app means that we only have call it once.
debug!("App | Checking if we need to resize");
if self.must_resize && ctx.is_pointer_over_area() {
@ -1329,9 +1329,9 @@ impl eframe::App for App {
ui.add_sized([width, height], Label::new("Reset the manual node list?"))
},
ErrorButtons::Sudo => {
let text = format!("Why does XMRig need admin priviledge?\n{}", XMRIG_ADMIN_REASON);
let text = format!("Why does XMRig need admin privilege?\n{}", XMRIG_ADMIN_REASON);
let height = height/4.0;
ui.add_sized([width, height], Label::new(format!("--- Gupax needs sudo/admin priviledge for XMRig! ---\n{}", &self.error_state.msg)));
ui.add_sized([width, height], Label::new(format!("--- Gupax needs sudo/admin privilege for XMRig! ---\n{}", &self.error_state.msg)));
ui.style_mut().override_text_style = Some(Name("MonospaceSmall".into()));
ui.add_sized([width/2.0, height], Label::new(text));
ui.add_sized([width, height], Hyperlink::from_label_and_url("Click here for more info.", "https://xmrig.com/docs/miner/randomx-optimization-guide"))

5
typos.toml Normal file
View file

@ -0,0 +1,5 @@
[files]
extend-exclude = [
"src/cpu.json",
"pgp/",
]