Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Ozodimgba/bifrost
/ functions
Functions
54 in github.com/Ozodimgba/bifrost
⨍
Functions
54
◇
Types & classes
9
↓ 6 callers
Method
slot
(&self)
src/tpu_client/tracker/slots_tracker.rs:15
↓ 4 callers
Function
tracker_from_slots
(slots: Vec<Slot>)
src/tpu_client/tracker/slots_tracker.rs:109
↓ 3 callers
Method
is_start
(&self)
src/tpu_client/tracker/slots_tracker.rs:21
↓ 3 callers
Method
next_epoch_slot_start
(&self)
src/tpu_client/tracker/schedule_tracking.rs:115
↓ 2 callers
Function
build_transfer_transaction
Builds a transfer transaction.
examples/client.rs:131
↓ 2 callers
Method
current_slot
(&self)
src/tpu_client/tracker/slots_tracker.rs:40
↓ 2 callers
Method
get_connection
(&self, validator: &str)
src/tpu_client/manager.rs:146
↓ 2 callers
Method
get_future_leaders
(&self, start: u64, end: u64)
src/tpu_client/tracker/leader_tracker.rs:54
↓ 2 callers
Method
get_leaders
Get the current leader, and next leader if close to leader switch Output = Vec<(leader identity, leader socket, current slot)>
src/tpu_client/tracker/leader_tracker.rs:123
↓ 1 callers
Method
close_all
Closes all connections.
src/tpu_client/manager.rs:228
↓ 1 callers
Function
connect_to_bifrost
Connects to Bifrost WebTransport server.
examples/client.rs:63
↓ 1 callers
Function
create_test_without_airdrop
()
examples/client.rs:50
↓ 1 callers
Method
current_epoch_slot_start
(&self)
src/tpu_client/tracker/schedule_tracking.rs:111
↓ 1 callers
Method
estimate_current_slot
(&self)
src/tpu_client/tracker/slots_tracker.rs:64
↓ 1 callers
Method
get_leader_for_slot_index
(&self, slot_index: usize)
src/tpu_client/tracker/schedule_tracking.rs:107
↓ 1 callers
Method
get_or_create_connection
Gets an existing connection or creates a new one to the validator.
src/tpu_client/manager.rs:166
↓ 1 callers
Function
handle_session
Handles an individual WebTransport session. Accepts bidirectional streams, reads transaction data, deserializes it, and forwards to the TPU. # Argum
src/server/session.rs:24
↓ 1 callers
Function
load_certificates
Loads TLS certificates and private key from PEM files. # Arguments `cert_path` - Path to certificate file `key_path` - Path to private key file # R
src/server/cert.rs:28
↓ 1 callers
Method
maybe_rotate
Rotates to the next epoch and fetches the new next_schedule. # Returns Returns `true` if rotation occurred, `false` if current slot is still in curr
src/tpu_client/tracker/schedule_tracking.rs:128
↓ 1 callers
Method
record
Records a slot update and returns the new current slot estimate if processed
src/tpu_client/tracker/slots_tracker.rs:45
↓ 1 callers
Method
run
Starts the WebTransport server and begins accepting connections. # Errors Returns an error if: - Certificate loading fails - TPU manager initializat
src/server/mod.rs:47
↓ 1 callers
Function
send_transaction
Sends a transaction to Bifrost via WebTransport.
examples/client.rs:157
↓ 1 callers
Method
send_transaction
Sends a Solana transaction to the specified validator's TPU. # Arguments `validator` - TPU address (e.g., "127.0.0.1:8001") `transaction` - The tran
src/tpu_client/manager.rs:101
↓ 1 callers
Method
slot_to_index
Converts an absolute slot number to a slot index within the current epoch. Returns `None` if the slot is outside the current epoch range.
src/tpu_client/tracker/schedule_tracking.rs:153
Function
_create_test_transaction
Creates a test transaction by requesting an airdrop and transferring funds.
examples/client.rs:87
Function
_request_and_confirm_airdrop
Requests an airdrop and waits for confirmation.
examples/client.rs:108
Method
connection_count
Returns the number of active connections.
src/tpu_client/manager.rs:223
Method
curr_schedule_ref
(&self)
src/tpu_client/tracker/schedule_tracking.rs:168
Method
default
()
src/tpu_client/tracker/slots_tracker.rs:100
Method
drop
(&mut self)
src/tpu_client/manager.rs:240
Method
fetch_schedule
Fetches the leader schedule for a given epoch. # Arguments `rpc_client` - The RPC client to use `slot` - The first slot of the epoch # Returns A H
src/tpu_client/tracker/schedule_tracking.rs:78
Method
handle_slot_event
Handles a single slot update event.
src/tpu_client/tracker/leader_tracker.rs:179
Function
main
()
src/main.rs:5
Function
main
()
examples/client.rs:19
Method
new
Creates a new TPU connection manager. # Errors Returns an error if the QUIC endpoint cannot be initialized.
src/tpu_client/manager.rs:48
Method
new
Creates a new ScheduleTracker by fetching current and next epoch schedules. # Errors Returns an error if: - RPC connection fails - Epoch info is inv
src/tpu_client/tracker/schedule_tracking.rs:26
Method
new
()
src/tpu_client/tracker/leader_tracker.rs:40
Method
new
()
src/tpu_client/tracker/slots_tracker.rs:33
Method
new
Creates a new Bifrost server instance. # Arguments `addr` - Socket address to bind the server `cert_path` - Path to TLS certificate file `key_path`
src/server/mod.rs:31
Method
next_schedule_mut
(&mut self)
src/tpu_client/tracker/schedule_tracking.rs:173
Method
rotate_epoch
Rotates the schedule to the next epoch and fetches the new next_schedule.
src/tpu_client/tracker/leader_tracker.rs:206
Method
run
Run the slot updates listener
src/tpu_client/tracker/leader_tracker.rs:156
Method
slots_in_epoch
(&self)
src/tpu_client/tracker/schedule_tracking.rs:119
Function
test_connection_count
Requires live RPC connection
src/tpu_client/manager.rs:264
Function
test_estimate_with_reverse_order
()
src/tpu_client/tracker/slots_tracker.rs:128
Function
test_estimate_with_sequential_slots
()
src/tpu_client/tracker/slots_tracker.rs:122
Function
test_get_rpc_leader_schedule
()
src/tpu_client/tracker/leader_tracker.rs:245
Function
test_manager_creation
()
src/tpu_client/manager.rs:252
Function
test_outlier_rejection
()
src/tpu_client/tracker/slots_tracker.rs:157
Function
test_record_updates_estimate
()
src/tpu_client/tracker/slots_tracker.rs:134
Function
test_server_creation
()
src/server/mod.rs:147
Function
test_slot_to_index
()
src/tpu_client/tracker/schedule_tracking.rs:183
Function
test_tpu_client_creation
()
src/server/mod.rs:154
Method
update_leader_sockets
Get all cluster node leader IPs
src/tpu_client/tracker/leader_tracker.rs:128