Skip to content

Commit

Permalink
Add proxy monerod resiliency
Browse files Browse the repository at this point in the history
Added resiliency to the merge mining proxy monerod connection.
  • Loading branch information
hansieodendaal committed Oct 17, 2024
1 parent c6cbbc1 commit 81f423b
Show file tree
Hide file tree
Showing 8 changed files with 413 additions and 144 deletions.
2 changes: 1 addition & 1 deletion applications/minotari_merge_mining_proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ hex = "0.4.2"
hyper = { version ="0.14.12", features = ["default"] }
jsonrpc = "0.12.0"
log = { version = "0.4.8", features = ["std"] }
markup5ever = "0.11.0"
monero = { version = "0.21.0" }
reqwest = { version = "0.11.4", features = ["json"] }
serde = { version = "1.0.136", features = ["derive"] }
Expand All @@ -57,5 +58,4 @@ scraper = "0.19.0"
tari_features = { path = "../../common/tari_features", version = "1.7.0-pre.2" }

[dev-dependencies]
markup5ever = "0.11.0"
hyper = { version ="0.14.12", features = ["full"] }
35 changes: 34 additions & 1 deletion applications/minotari_merge_mining_proxy/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,40 @@ impl Default for MergeMiningProxyConfig {
override_from: None,
use_dynamic_fail_data: true,
monero_fail_url: MONERO_FAIL_MAINNET_URL.into(),
monerod_url: StringList::default(),
monerod_url: StringList::from(vec![
"http://node.c3pool.org:18081".to_string(),
"http://xmr-full.p2pool.uk:18089".to_string(),
"http://monero.stackwallet.com:18081".to_string(),
"http://xmr.support:18081".to_string(),
"https://xmr-01.tari.com".to_string(),
"http://node1.xmr-tw.org:18081".to_string(),
"http://monero-g2.hexhex.online:18081".to_string(),
"http://137.220.120.19:18089".to_string(),
"http://185.218.124.120:18489".to_string(),
"http://185.218.124.120:18789".to_string(),
"https://xmr-de-2.boldsuck.org:18081".to_string(),
"http://46.32.46.171:18081".to_string(),
"http://185.218.124.120:18089".to_string(),
"http://185.218.124.120:18589".to_string(),
"http://xmr-de-1.boldsuck.org:18081".to_string(),
"http://185.218.124.120:18889".to_string(),
"http://pinodexmr.hopto.org:18081".to_string(),
"http://node.tincloud.eu:18081".to_string(),
"http://183.6.24.33:18081".to_string(),
"http://147.45.196.232:18089".to_string(),
"http://h-helix.com:18089".to_string(),
"http://185.218.124.120:18689".to_string(),
"http://185.218.124.120:18289".to_string(),
"https://node.tincloud.eu".to_string(),
"https://xmr-de.boldsuck.org:18081".to_string(),
"https://monero.booze.org".to_string(),
"https://xmr.mailia.be:18088".to_string(),
"https://xmr.lolfox.au".to_string(),
"https://xmr1.doggett.tech:18089".to_string(),
"https://node.icefiles.nz:18081".to_string(),
"http://45.8.132.220:18089".to_string(),
"http://82.147.85.13:18089".to_string(),
]),
monerod_username: String::new(),
monerod_password: String::new(),
monerod_use_auth: false,
Expand Down
6 changes: 3 additions & 3 deletions applications/minotari_merge_mining_proxy/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ pub enum MmProxyError {
InvalidHeaderValue(#[from] InvalidHeaderValue),
#[error("Block was lost due to a failed precondition, and should be retried")]
FailedPreconditionBlockLostRetry,
#[error("Could not convert data:{0}")]
#[error("Could not convert data: {0}")]
ConversionError(String),
#[error("No reachable servers in configuration")]
ServersUnavailable,
#[error("No reachable servers in configuration: {0}")]
ServersUnavailable(String),
#[error("Invalid difficulty: {0}")]
DifficultyError(#[from] DifficultyError),
#[error("TLS connection error: {0}")]
Expand Down
Loading

0 comments on commit 81f423b

Please sign in to comment.