Structsยง
- Bitvm
Cache - Bitvm
Cache With Metadata - Clementine
BitVM Public Keys - Clementine
BitVM Replacement Data - 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_PATHenv var or a default based on RISC0 dev/prod mode. - load_
or_ generate_ bitvm_ cache - replace_
disprove_ scripts