Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ee811d7
RKstratumV2
LiveLaughLove13 Jan 16, 2026
f556e06
clippy
LiveLaughLove13 Jan 16, 2026
f655a2f
--instance CLI
LiveLaughLove13 Jan 16, 2026
be72887
FMT
LiveLaughLove13 Jan 16, 2026
305a640
Lower dif Inst
LiveLaughLove13 Jan 16, 2026
22b9658
CPU feature
LiveLaughLove13 Jan 17, 2026
0cb38fd
Implement UI
LiveLaughLove13 Jan 17, 2026
0ba9cd1
fmt
LiveLaughLove13 Jan 17, 2026
47ea3e3
Merge branch 'kaspanet:master' into RKStratum2.0
LiveLaughLove13 Jan 18, 2026
6dfdc49
Merge branch 'kaspanet:master' into RKStratum2.0
LiveLaughLove13 Jan 18, 2026
97cd6bc
iternal-cpu-mode updates
LiveLaughLove13 Jan 18, 2026
81f7d7c
reformatting
LiveLaughLove13 Jan 19, 2026
5d70158
Update default_client.rs
LiveLaughLove13 Jan 19, 2026
5f6e8b0
Updated docker
LiveLaughLove13 Jan 19, 2026
e6569dd
clean up
LiveLaughLove13 Jan 19, 2026
0b1d1db
Update README.md
LiveLaughLove13 Jan 19, 2026
abfc362
naming clean up
LiveLaughLove13 Jan 19, 2026
f7d9fc8
frontend
LiveLaughLove13 Jan 19, 2026
178cd5f
Merge branch 'kaspanet:master' into RKStratum2.0
LiveLaughLove13 Jan 19, 2026
65f5bed
cargo update
LiveLaughLove13 Jan 19, 2026
0bc1cba
Build fix
LiveLaughLove13 Jan 19, 2026
9f4de7b
Update Cargo.toml
LiveLaughLove13 Jan 20, 2026
3c86df0
load website
LiveLaughLove13 Jan 20, 2026
534c90b
Merge branch 'kaspanet:master' into RKStratum2.0
LiveLaughLove13 Jan 20, 2026
4eaf195
rkstratum_cpu_miner
LiveLaughLove13 Jan 20, 2026
74e935d
fmt
LiveLaughLove13 Jan 20, 2026
738da33
share handler clean up
LiveLaughLove13 Jan 21, 2026
cc3a28e
UI clean up
LiveLaughLove13 Jan 22, 2026
99733e7
Ui Workers
LiveLaughLove13 Jan 22, 2026
16f334c
UI features
LiveLaughLove13 Jan 22, 2026
2c2e41a
UI mobile cleanup
LiveLaughLove13 Jan 22, 2026
2a17c94
Merge remote-tracking branch 'origin/master' into RKStratum2.0
LiveLaughLove13 Jan 22, 2026
31c64ff
fmt: cargo fmt --all
LiveLaughLove13 Jan 22, 2026
fc6b5b4
Merge branch 'kaspanet:master' into RKStratum2.0
LiveLaughLove13 Jan 23, 2026
a957b97
Merge branch 'master' into RKStratum2.0
LiveLaughLove13 Jan 26, 2026
05e5e7e
Code change request
LiveLaughLove13 Jan 28, 2026
ae36ac5
clippy
LiveLaughLove13 Jan 28, 2026
70bd81b
revert Utils Alloc
LiveLaughLove13 Jan 28, 2026
e7f63f5
Working cargo.toml
LiveLaughLove13 Jan 28, 2026
1e45de3
Vardif True
LiveLaughLove13 Jan 28, 2026
10280f3
UI + Clippy
LiveLaughLove13 Jan 28, 2026
64b0bd9
Disconnected worker clean up
LiveLaughLove13 Jan 28, 2026
9dfe415
UI update
LiveLaughLove13 Jan 29, 2026
ffa223c
fix: stabilize bridge config + web pipeline
elldeeone Jan 30, 2026
d61ff85
fix: forward testnet flag and restore inprocess logs
elldeeone Jan 30, 2026
8964e40
fix: escape worker and wallet in dashboard
elldeeone Jan 30, 2026
be51c98
fix: restore defaults and escape dashboard strings
elldeeone Jan 30, 2026
60bb4b7
fix: honor log-to-file override and cap cpu cache
elldeeone Jan 30, 2026
67178a8
fix: validate instance ports and config path
elldeeone Jan 30, 2026
b3afff9
fix: unblock shutdown and escape dashboard labels
elldeeone Jan 30, 2026
7751746
fix: avoid panic when logger already initialized
elldeeone Jan 30, 2026
8a6584b
Merge pull request #2 from elldeeone/RKStratum2.0-review
LiveLaughLove13 Jan 30, 2026
3b57e9a
Update raw.html
LiveLaughLove13 Jan 30, 2026
29be82e
Goldshell Json Patched
LiveLaughLove13 Jan 31, 2026
bab99d9
fmt Goldshell patch
LiveLaughLove13 Jan 31, 2026
ee94eb8
testnet 12 terminal readout + test
LiveLaughLove13 Feb 2, 2026
d6ff817
UI+Prom
LiveLaughLove13 Feb 2, 2026
df344b8
UI clean up- Readme addition(test)
LiveLaughLove13 Feb 3, 2026
c70a903
Update share_handler.rs
LiveLaughLove13 Feb 3, 2026
9d5f7f9
Update share_handler.rs
LiveLaughLove13 Feb 3, 2026
ce06697
Requested changes
LiveLaughLove13 Feb 4, 2026
f6da5e5
revert cargo
LiveLaughLove13 Feb 9, 2026
a40d5b2
Alloc fix for bridge
LiveLaughLove13 Feb 9, 2026
2d4755c
cargo
LiveLaughLove13 Feb 9, 2026
3db9176
different approach for alloc
LiveLaughLove13 Feb 9, 2026
463c4d6
.cargo
LiveLaughLove13 Feb 9, 2026
21aaf3a
Merge master: resolve conflicts in prom.rs, keep rkstratum_cpu_miner …
LiveLaughLove13 Feb 10, 2026
3ab9119
Fix: Add internal CPU miner blocks to total_blocks_all_time for corre…
LiveLaughLove13 Feb 10, 2026
c5c8afb
Update ci.yaml
LiveLaughLove13 Feb 11, 2026
3a5323c
Update README.md
LiveLaughLove13 Feb 11, 2026
1642e55
Merge branch 'master' into RKStratum2.0-Fixed
coderofstuff Mar 3, 2026
7668224
Update Readme
LiveLaughLove13 Mar 4, 2026
3fd7518
read me log revert
LiveLaughLove13 Mar 4, 2026
2d43a3e
readme update
LiveLaughLove13 Mar 4, 2026
5d48147
Strategy:reverted to match master
LiveLaughLove13 Mar 4, 2026
bbe14bb
log update
LiveLaughLove13 Mar 4, 2026
5de8733
ci and deploy fix
LiveLaughLove13 Mar 4, 2026
a63d55c
revert
LiveLaughLove13 Mar 4, 2026
7b54b9e
Merge remote-tracking branch 'upstream/master' into RKStratum2.0-Fixed
LiveLaughLove13 Mar 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Cargo configuration for musl builds
# This configures linker flags to handle mimalloc conflicts with libstdc++
# Since kaspa-alloc uses mimalloc with 'override' feature (which conflicts with
# libstdc++'s operator new/delete in musl static builds), we use linker flags
# to allow multiple definitions. The linker will use the first definition it encounters.

[target.x86_64-unknown-linux-musl]
rustflags = [
"-C", "link-arg=-Wl,--allow-multiple-definition",
]
Comment on lines +7 to +10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary? Have you verified that this does not impact the kaspad binary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the flag exists:
kaspa-alloc uses mimalloc with "override" for non-macos targets (including musl)
The bridge also has a direct mimalloc dependency for musl builds (without override)
This creates a dual mimalloc dependency structure that requires the flag.

It does not impact kaspad binary.

The change was so that we did not have to make any changes directly to Util

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biryukovmaxim do you have any recommendations here? I'm just concerned this applied at the top level like this affects all binaries

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biryukovmaxim do you have any recommendations here? I'm just concerned this applied at the top level like this affects all binaries

Sry I have no expertise of what it could lead to. @saefstroem since you built musl step in ci, maybe you have any advices, considerations here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the flag exists: kaspa-alloc uses mimalloc with "override" for non-macos targets (including musl) The bridge also has a direct mimalloc dependency for musl builds (without override)

Doesn't it mean you can remove direct dependency

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biryukovmaxim do you have any recommendations here? I'm just concerned this applied at the top level like this affects all binaries

// build.rs
fn main() {
    println!("cargo:rustc-link-arg=-Wl,--allow-multiple-definition");
}

Probably will do the same only for bridge crate

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into this more, this is probably fine to have.

@saefstroem would like to get your confirmation here too.


# Static link CRT on Windows to avoid VCRedist dependency
# (similar to how we use musl on Linux for portable binaries)
[target.x86_64-pc-windows-msvc]
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
name: Test Suite
# runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
# strategy:
# fail-fast: false
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
# Clean unnecessary files to save disk space
- name: clean unnecessary files to save space
Expand Down Expand Up @@ -422,5 +422,9 @@ jobs:
run: |
# Run build script for musl toolchain
source musl-toolchain/build.sh
# Build for musl
# Build other binaries first (without the allow-multiple-definition flag)
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl
# Build bridge with allow-multiple-definition flag to handle mimalloc conflicts with libstdc++ in musl builds
# This flag is only needed for kaspa-stratum-bridge due to its dual mimalloc dependency structure
export RUSTFLAGS="$RUSTFLAGS -C link-arg=-Wl,--allow-multiple-definition"
cargo --verbose build --bin stratum-bridge --release --target x86_64-unknown-linux-musl
8 changes: 6 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,12 @@ jobs:
# Go back to the workspace
cd $GITHUB_WORKSPACE

# Build for musl
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --bin stratum-bridge --release --target x86_64-unknown-linux-musl
# Build non-bridge binaries first
cargo --verbose build --bin kaspad --bin rothschild --bin kaspa-wallet --release --target x86_64-unknown-linux-musl
# Build bridge with allow-multiple-definition to resolve mimalloc/libstdc++ symbol collisions.
# musl-toolchain/build.sh sets RUSTFLAGS directly, so we append this flag here explicitly.
export RUSTFLAGS="$RUSTFLAGS -C link-arg=-Wl,--allow-multiple-definition"
cargo --verbose build --bin stratum-bridge --release --target x86_64-unknown-linux-musl
mkdir bin || true
cp target/x86_64-unknown-linux-musl/release/kaspad bin/
cp target/x86_64-unknown-linux-musl/release/rothschild bin/
Expand Down
39 changes: 23 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -386,4 +386,4 @@ opt-level = 2

[workspace.lints.clippy]
empty_docs = "allow"
uninlined_format_args = "allow"
uninlined_format_args = "allow"
4 changes: 2 additions & 2 deletions bridge/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ============================================
# RustBridge .gitignore
# RKStratum .gitignore
# Only tracks: src/, Cargo.toml, config.yaml
# ============================================

Expand All @@ -9,7 +9,7 @@ Cargo.lock

# Log files (runtime artifacts)
*.log
rustbridge_*.log
RKStratum_*.log

# Backup files
*.backup
Expand Down
17 changes: 15 additions & 2 deletions bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ kaspa-notify = { workspace = true }
kaspa-core = { workspace = true }
kaspa-utils = { workspace = true }
kaspad = { workspace = true }
kaspa-alloc = { workspace = true }
dirs = { workspace = true }

# External dependencies - using workspace versions where available
Expand Down Expand Up @@ -50,10 +51,19 @@ tracing-appender = "0.2"
blake2 = "0.10"
num-bigint = "0.4"
prometheus = "0.13"
yaml-rust = "0.4"
serde_yaml = "0.9"
faster-hex = "0.1"
windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_System_Console"] }
chrono = { workspace = true }
include_dir = "0.7"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.52", features = ["Win32_Foundation", "Win32_System_Console"] }

# For musl builds, we declare mimalloc without 'override' to override kaspa-alloc's version
# The .cargo/config.toml linker flag handles any remaining conflicts
[target.'cfg(all(not(target_os = "macos"), target_env = "musl"))'.dependencies]
mimalloc = { version = "0.1.48", default-features = false }


[dev-dependencies]
tokio-test = "0.4"
Expand All @@ -62,5 +72,8 @@ tokio-test = "0.4"
name = "stratum-bridge"
path = "src/main.rs"

[features]
rkstratum_cpu_miner = []

[lints]
workspace = true
77 changes: 25 additions & 52 deletions bridge/config.yaml
Original file line number Diff line number Diff line change
@@ -1,84 +1,57 @@
# RustBridge Multi-Instance Test Configuration
# RKStratum Multi-Instance Test Configuration
# This configuration runs 4 instances for testing the multi-instance feature
# All instances share the same Kaspa node (kaspad_address)
#
# NOTE: Comments in this file will be lost if you update the configuration
# through the web dashboard. The web UI uses serde_yaml which does not
# preserve comments. For production, consider keeping a backup or using
# version control.

# ============================================
# GLOBAL SETTINGS (shared by all instances)
# ============================================

# Kaspa node gRPC address (SHARED - all instances use the same node)
# Format: "HOST:PORT" or "grpc://HOST:PORT"
# Default HTTP gRPC port is typically 16110
# Use 127.0.0.1 instead of localhost to force IPv4
kaspad_address: "127.0.0.1:16110"

# Block template wait time in milliseconds (shared)
# How long to wait between checking for new block templates
block_wait_time: 1000

# Print statistics to console (shared)
print_stats: true

# Default log to file setting (can be overridden per-instance)
log_to_file: true

# Health check server port (optional, leave empty to disable)
# This is a GLOBAL health check endpoint
health_check_port: ""

# Variable difficulty settings (defaults, can be overridden per-instance)
var_diff: false
shares_per_min: 20
var_diff_stats: false

# Power-of-2 difficulty clamping (default, can be overridden per-instance)
web_dashboard_port: ":3030"
var_diff: true
shares_per_min: 30
var_diff_stats: true
pow2_clamp: true

# Extranonce size (auto-detected per client, this is just for backward compatibility)
extranonce_size: 2

# Optional: append a custom identifier to the built-in coinbase tag (applies to BOTH node modes).
# You CANNOT change/override the built-in base tag; you can only append a suffix.
# Built-in base tag is fixed:
# - "RK-Stratum"
# Set this to a short identifier (no leading slash). It will be appended as `/SUFFIX`.
# Examples (if coinbase_tag_suffix: "supertypo"):
# - "RK-Stratum/supertypo"
coinbase_tag_suffix: ""

# ============================================
# INSTANCE CONFIGURATIONS
# ============================================
# Each instance runs independently with its own:
# - Stratum port (REQUIRED, must be unique)
# - Minimum share difficulty (REQUIRED)
# - Prometheus port (OPTIONAL, per-instance)
# - Log to file (OPTIONAL, per-instance, defaults to global setting)

instances:
# Instance 1: Low difficulty pool (for smaller miners or testing)
- stratum_port: ":5559"
min_share_diff: 4
prom_port: ":2118"
log_to_file: true

- stratum_port: ":5560"
min_share_diff: 512
prom_port: ":2119"
log_to_file: true

- stratum_port: ":5561"
min_share_diff: 1024
prom_port: ":2120"
log_to_file: true

Comment on lines +24 to +38
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These extra ports aren't documented.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default config / ports (Port | Purpose table), including :5559, :5560, :5561 and prom ports.”

- stratum_port: ":5555"
min_share_diff: 2048
prom_port: ":2114"
log_to_file: true

# Instance 2: Medium difficulty pool
- stratum_port: ":5556"
min_share_diff: 4096
prom_port: ":2115"
log_to_file: true

# Instance 3: High difficulty pool (for powerful miners)
- stratum_port: ":5557"
min_share_diff: 8192
prom_port: ":2116"
log_to_file: true

# Instance 4: Very high difficulty pool (for very powerful miners)
- stratum_port: ":5558"
min_share_diff: 16384
prom_port: ":2117"
log_to_file: true
# Optional: instance-specific overrides
# var_diff: true
# shares_per_min: 30
Loading