Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/256foundation/mujina
/ functions
Functions
923 in github.com/256foundation/mujina
⨍
Functions
923
◇
Types & classes
227
↓ 88 callers
Method
send
Send a message to the client.
mujina-miner/src/stratum_v1/connection.rs:236
↓ 72 callers
Method
push
Add a board registration.
mujina-miner/src/api/registry.rs:22
↓ 70 callers
Function
channel
Compute a final channel value with scaling, gamma, and brightness baked in.
mujina-miner/src/peripheral/led/calibrated.rs:43
↓ 55 callers
Method
len
Get the total number of values in the range. Returns `u64::MAX` if the range spans the entire u64 space (the true count would be 2^64 which doesn't f
mujina-miner/src/job_source/extranonce2.rs:157
↓ 43 callers
Method
iter
Create an iterator over this range.
mujina-miner/src/job_source/extranonce2.rs:207
↓ 38 callers
Method
contains
Check if value bits fit within this mask
mujina-miner/src/job_source/version.rs:36
↓ 36 callers
Method
read_word
(&mut self, command: PmbusCommand)
mujina-miner/src/peripheral/tps546.rs:1180
↓ 29 callers
Method
read_byte
(&mut self, command: PmbusCommand)
mujina-miner/src/peripheral/tps546.rs:1165
↓ 28 callers
Method
recv
Receive a message the client wrote.
mujina-miner/src/stratum_v1/connection.rs:241
↓ 26 callers
Method
to_target
Get the underlying target (lossless). Use this for actual share validation (comparing against block hashes).
mujina-miner/src/types/difficulty.rs:101
↓ 26 callers
Method
write_word
(&mut self, command: PmbusCommand, data: u16)
mujina-miner/src/peripheral/tps546.rs:1188
↓ 21 callers
Method
is_empty
Check if the range is empty.
mujina-miner/src/job_source/extranonce2.rs:163
↓ 20 callers
Method
record_at
Record work from a share at the given timestamp.
mujina-miner/src/types/hashrate_estimator.rs:61
↓ 19 callers
Function
send_reg
Send a register write command, converting the sink error to anyhow.
mujina-miner/src/asic/bm13xx/thread.rs:267
↓ 19 callers
Function
work
Helper: create a Work value from a u64 hash count.
mujina-miner/src/types/hashrate_estimator.rs:140
↓ 18 callers
Function
make_device
( vid: u16, pid: u16, manufacturer: Option<&str>, product: Option<&str>,
mujina-miner/src/board/pattern.rs:288
↓ 17 callers
Method
cancel
Cancel the animation and return the LED. Stops a running task immediately. Returns at once if the task has already completed.
mujina-miner/src/peripheral/led/animation/mod.rs:56
↓ 17 callers
Method
to_le_bytes
Convert to little-endian bytes.
mujina-miner/src/u256.rs:31
↓ 16 callers
Method
decode
(address: RegisterAddress, bytes: &[u8; 4])
mujina-miner/src/asic/bm13xx/protocol.rs:570
↓ 16 callers
Method
finish
Wait for the animation to reach a natural stopping point. For looping animations, waits until the end of the current cycle. For one-shot animations,
mujina-miner/src/peripheral/led/animation/mod.rs:66
↓ 16 callers
Method
split
Split the stream into reader, writer, and control handles. This allows concurrent reading and writing while maintaining the ability to reconfigure th
mujina-miner/src/transport/serial.rs:266
↓ 15 callers
Method
maybe_suggest_difficulty
Suggest difficulty for the latest hashrate, subject to the deadband and the cooldown. A material change during the cooldown is held; `flush_suggest`
mujina-miner/src/job_source/stratum_v1.rs:435
↓ 15 callers
Method
write
(&mut self, addr: u8, data: &[u8])
mujina-miner/src/mgmt_protocol/bitaxe_raw/i2c.rs:25
↓ 13 callers
Method
check
Update the alarm with the current condition. Returns an [`AlarmStatus`] describing what happened: | Previous state | condition | Result | |---------
mujina-miner/src/types/debounced_alarm.rs:102
↓ 12 callers
Method
as_f64
Get difficulty as f64. Exact to 12 significant digits for any difficulty a source would reasonably assign. Only difficulties above 2^53 (~9.0P) lose
mujina-miner/src/types/difficulty.rs:71
↓ 12 callers
Function
get
(app: Router, uri: &str)
mujina-miner/src/api/server.rs:181
↓ 12 callers
Method
insert
(&mut self, task: HashTask)
mujina-miner/src/asic/bm13xx/thread.rs:48
↓ 11 callers
Method
as_u8
(self)
mujina-miner/src/peripheral/pmbus.rs:561
↓ 11 callers
Method
get
(&self, chip_job_id: u8)
mujina-miner/src/asic/bm13xx/thread.rs:55
↓ 11 callers
Method
id
Get the message ID if present.
mujina-miner/src/stratum_v1/messages.rs:373
↓ 11 callers
Method
next_delay
Return the next backoff delay (with jitter) and advance the state. The nominal delay (1s, 2s, 4s, ...) is scaled by a jitter factor in [0.5, 1.0] to
mujina-miner/src/job_source/stratum_v1.rs:88
↓ 11 callers
Method
value
Get the voltage value as f32
mujina-miner/src/peripheral/pmbus.rs:183
↓ 10 callers
Function
assert_frame_eq
(cmd: Command, expect: &[u8])
mujina-miner/src/asic/bm13xx/protocol.rs:1756
↓ 10 callers
Method
broadcast_write
Helper to create a broadcast write command
mujina-miner/src/asic/bm13xx/protocol.rs:2466
↓ 10 callers
Function
build_test_router
( miner_state: MinerTelemetry, board_states: Vec<BoardTelemetry>, )
mujina-miner/src/api/server.rs:158
↓ 10 callers
Method
encode_voltage
Convert f32 to Linear16 format using cached VOUT_MODE
mujina-miner/src/peripheral/tps546.rs:1253
↓ 10 callers
Method
read_register
(&mut self, reg: u8)
mujina-miner/src/peripheral/emc2101.rs:300
↓ 10 callers
Method
write_byte
(&mut self, command: PmbusCommand, data: u8)
mujina-miner/src/peripheral/tps546.rs:1173
↓ 9 callers
Method
off
Turn the LED off, stopping any animation.
mujina-miner/src/peripheral/led/status_led.rs:54
↓ 9 callers
Function
test_client
Helper to create a minimal client for testing notification handlers.
mujina-miner/src/stratum_v1/client.rs:1104
↓ 8 callers
Function
apply_serial_config
Apply serial configuration to a file descriptor. This helper function configures termios settings for a serial port, including baud rate, data bits,
mujina-miner/src/transport/serial.rs:141
↓ 8 callers
Function
breathe_brightness
Compute breathing brightness for a position in the cycle. `cycle_fraction` ranges from 0.0 (start) to 1.0 (end). Values outside this range wrap via m
mujina-miner/src/peripheral/led/animation/breathe.rs:92
↓ 8 callers
Function
create_virtual_pair
Virtual serial port pair for integration tests using pty
mujina-miner/src/transport/serial.rs:606
↓ 8 callers
Function
extract_5bit_exponent
Extract 5-bit two's complement exponent from PMBus format
mujina-miner/src/peripheral/pmbus.rs:963
↓ 8 callers
Method
handle_set_difficulty
Handle mining.set_difficulty notification.
mujina-miner/src/stratum_v1/client.rs:580
↓ 8 callers
Method
int_to_slinear11
(&self, value: i32)
mujina-miner/src/peripheral/tps546.rs:1230
↓ 8 callers
Method
load
Load configuration from the default location.
mujina-miner/src/config.rs:90
↓ 8 callers
Method
record_registered
Count a newly-registered thread.
mujina-miner/src/scheduler.rs:1101
↓ 8 callers
Method
record_reported
Count a thread's first report.
mujina-miner/src/scheduler.rs:1108
↓ 8 callers
Function
source_with_state
Helper to create a StratumV1Source with protocol state for testing.
mujina-miner/src/job_source/stratum_v1.rs:751
↓ 7 callers
Method
apply_to_version
Apply these bits to a base version to produce the final version. Shifts these bits left 13 positions and ORs with the base version. # Example ``` u
mujina-miner/src/job_source/version.rs:58
↓ 7 callers
Function
compute_merkle_root
Compute merkle root for a task (called once when task is assigned).
mujina-miner/src/cpu_miner/hasher.rs:283
↓ 7 callers
Method
decode_voltage
Convert Linear16 format to f32 using cached VOUT_MODE
mujina-miner/src/peripheral/tps546.rs:1261
↓ 7 callers
Method
float_to_slinear11
(&self, value: f32)
mujina-miner/src/peripheral/tps546.rs:1226
↓ 7 callers
Function
make_device_with_bcd
( vid: u16, pid: u16, bcd_device: u16, manufacturer: Option<&str>, pro
mujina-miner/src/board/pattern.rs:562
↓ 7 callers
Method
name
Get the source name.
mujina-miner/src/job_source/messages.rs:85
↓ 7 callers
Method
next
(&mut self)
mujina-miner/src/job_source/extranonce2.rs:240
↓ 7 callers
Method
read
Read the current temperature.
mujina-miner/src/peripheral/tmp1075.rs:89
↓ 7 callers
Method
record_enumeration_complete
Record the enumeration-complete signal.
mujina-miner/src/scheduler.rs:1116
↓ 7 callers
Method
send_packet
Send a raw packet and wait for response.
mujina-miner/src/mgmt_protocol/bitaxe_raw/channel.rs:50
↓ 7 callers
Method
write_read
(&mut self, addr: u8, write: &[u8], read: &mut [u8])
mujina-miner/src/mgmt_protocol/bitaxe_raw/i2c.rs:65
↓ 6 callers
Method
find
Find a virtual board descriptor by device type.
mujina-miner/src/board/mod.rs:108
↓ 6 callers
Function
flash
Flash the LED with a color for a fixed duration. Spawns a task that sets the color and sleeps for the duration. The handle can be awaited via [`Anima
mujina-miner/src/peripheral/led/animation/flash.rs:18
↓ 6 callers
Method
handle_set_version_mask
Handle mining.set_version_mask notification.
mujina-miner/src/stratum_v1/client.rs:617
↓ 6 callers
Method
init
Initialize the TPS546
mujina-miner/src/peripheral/tps546.rs:139
↓ 6 callers
Method
is_zero
Returns true if the hashrate is zero.
mujina-miner/src/types/hash_rate.rs:55
↓ 6 callers
Method
read_byte
(&mut self, reg: Register)
mujina-miner/src/peripheral/tmp451.rs:136
↓ 6 callers
Method
to_f32
(self)
mujina-miner/src/peripheral/pmbus/pmbus_types.rs:90
↓ 6 callers
Function
update_status
Update shared status.
mujina-miner/src/cpu_miner/hasher.rs:324
↓ 5 callers
Method
boards
Snapshot all connected boards. Removes boards whose sender has been dropped (board disconnected) and returns the current state of each.
mujina-miner/src/api/registry.rs:30
↓ 5 callers
Function
breathe
Start a breathe animation with the default period. Takes ownership of the LED and fades it in a sinusoidal cycle. Cancel or interrupt via the returne
mujina-miner/src/peripheral/led/animation/breathe.rs:23
↓ 5 callers
Function
decode_frame
(frame: &[u8])
mujina-miner/src/asic/bm13xx/protocol.rs:1879
↓ 5 callers
Method
encode
(&self, dst: &mut BytesMut)
mujina-miner/src/asic/bm13xx/protocol.rs:866
↓ 5 callers
Function
extranonce1_bytes
Extranonce1 (pool-assigned) as used in this block
mujina-miner/src/job_source/test_blocks.rs:183
↓ 5 callers
Method
hashrate_at
Hashrate estimate at the given timestamp. Divides total work by the span from the oldest sample to `now`. This gives an accurate estimate as soon as
mujina-miner/src/types/hashrate_estimator.rs:85
↓ 5 callers
Method
job_to_template
Convert Stratum JobNotification to JobTemplate.
mujina-miner/src/job_source/stratum_v1.rs:205
↓ 5 callers
Function
make_board
Create a board registration with the given name, returning the state sender so the test can update or drop it.
mujina-miner/src/api/registry.rs:53
↓ 5 callers
Method
reset
Reset the alarm to idle, regardless of current state. Use when an external event invalidates the condition (e.g., hashrate changed, difficulty change
mujina-miner/src/types/debounced_alarm.rs:139
↓ 5 callers
Method
run
Run the source (main event loop). Defers pool connection until the scheduler reports a positive hashrate via `UpdateHashRate`---no point fetching job
mujina-miner/src/job_source/stratum_v1.rs:494
↓ 5 callers
Method
send_request
Send a request and wait for its response. Sends the request and then loops reading messages from the connection, handling notifications along the way
mujina-miner/src/stratum_v1/client.rs:143
↓ 5 callers
Method
set
Update the LED to reflect a new board status.
mujina-miner/src/peripheral/led/status_led.rs:47
↓ 5 callers
Function
source_with_mock_transports
Create a StratumV1Source wired to a mock transport channel. Returns (source, event_rx, command_tx, mock_tx, shutdown).
mujina-miner/src/job_source/stratum_v1.rs:1578
↓ 5 callers
Method
stats
Get statistics about the serial port.
mujina-miner/src/transport/serial.rs:507
↓ 5 callers
Method
stop
(mut self, mode: StopMode)
mujina-miner/src/peripheral/led/animation/mod.rs:91
↓ 5 callers
Function
test_pool_integration
Common integration test logic for pool connections. # Test Strategy This test validates that the client can successfully connect to a pool and maint
mujina-miner/src/stratum_v1/client.rs:933
↓ 5 callers
Method
to_stratum_json
Convert to Stratum hex string format for transmission. Converts Bitcoin types back to the hex strings expected by the pool.
mujina-miner/src/stratum_v1/messages.rs:289
↓ 5 callers
Method
to_wire_bytes
Encode ticket mask to wire format bytes
mujina-miner/src/asic/bm13xx/protocol.rs:346
↓ 4 callers
Function
calculate_pll_for_frequency
Calculate PLL configuration for a specific frequency
mujina-miner/src/asic/bm13xx/thread.rs:537
↓ 4 callers
Function
coinbase1_bytes
Coinbase transaction prefix (coinbase1 in Stratum v1) Everything before the extranonce space: version + witness flag + input count + prev output + pr
mujina-miner/src/job_source/test_blocks.rs:178
↓ 4 callers
Function
coinbase2_bytes
Coinbase transaction suffix (coinbase2 in Stratum v1) Everything after the extranonce space: rest of scriptsig + sequence + outputs + witness + lockt
mujina-miner/src/job_source/test_blocks.rs:196
↓ 4 callers
Method
compute_merkle_root
Compute merkle root for the given extranonce2. Returns an error if this is a fixed merkle root (header-only job) or if merkle computation fails.
mujina-miner/src/job_source/job.rs:57
↓ 4 callers
Method
configure_nonce_ranges
(&self, chain_length: usize)
mujina-miner/src/asic/bm13xx/protocol.rs:2626
↓ 4 callers
Method
decode_fault_response
(&self, response: u8)
mujina-miner/src/peripheral/tps546.rs:1159
↓ 4 callers
Method
decode_linear16
Convert Linear16 value using this VOUT_MODE
mujina-miner/src/peripheral/pmbus/pmbus_types.rs:64
↓ 4 callers
Method
encode
Encode packet to bytes
mujina-miner/src/mgmt_protocol/bitaxe_raw/mod.rs:194
↓ 4 callers
Method
encode_linear16
Encode to Linear16 using this VOUT_MODE
mujina-miner/src/peripheral/pmbus/pmbus_types.rs:69
↓ 4 callers
Function
expected_time_to_share
Calculate expected time between shares at given difficulty and hashrate. Returns the average time to find a share. Actual time varies due to randomne
mujina-miner/src/types/mod.rs:31
↓ 4 callers
Method
exponent
Get the 5-bit exponent (bits 4:0)
mujina-miner/src/peripheral/pmbus/pmbus_types.rs:47
↓ 4 callers
Function
extranonce2_bytes
Extranonce2 (miner-chosen) as used in this block
mujina-miner/src/job_source/test_blocks.rs:188
↓ 4 callers
Function
extranonce2_from_bytes
Helper to convert extranonce2 bytes to Extranonce2 type.
mujina-miner/src/job_source/stratum_v1.rs:741
next →
1–100 of 923, ranked by callers