Module bitvm_client

Source

Structsยง

BitvmCache
BitvmCacheWithMetadata
ClementineBitVMPublicKeys
ClementineBitVMReplacementData
SECP
Global secp context.
UNSPENDABLE_XONLY_PUBKEY
This is an unspendable pubkey.

Staticsยง

BITVM_CACHE
Global BitVM cache wrapped in a OnceLock.
REPLACE_SCRIPTS_LOCK
Replacing bitvm scripts require cloning the scripts, which can be ~4GB. And this operation is done every deposit. So we ensure only 1 thread is doing this at a time to avoid OOM.

Functionsยง

calculate_replacement_operations ๐Ÿ”’
Helper function to calculate the total number of replacement operations
generate_fresh_data ๐Ÿ”’
get_cache_path ๐Ÿ”’
Returns the BitVM cache file path from BITVM_CACHE_PATH env var or a default based on RISC0 dev/prod mode.
load_or_generate_bitvm_cache
replace_disprove_scripts