Skip to content

fix lockscript proving paths and faster sync bitmask canonize#905

Open
mooncitydev wants to merge 1 commit intoNeptune-Crypto:masterfrom
mooncitydev:fix/lockscript-proof-mapping-and-canonize-perf
Open

fix lockscript proving paths and faster sync bitmask canonize#905
mooncitydev wants to merge 1 commit intoNeptune-Crypto:masterfrom
mooncitydev:fix/lockscript-proof-mapping-and-canonize-perf

Conversation

@mooncitydev
Copy link
Copy Markdown

@mooncitydev mooncitydev commented Apr 11, 2026

summary

  • **lockscript + \TransactionProofType**: \TxProvingCapability::LockScript\ used \unimplemented!()\ in \From\ for \TransactionProofType, so building \ProverJobSettings\ from CLI (e.g. --tx-proving-capability=lockscript) could panic at startup. It now maps to \PrimitiveWitness, which matches how \can_prove\ treats capability vs proof type and matches the absence of a separate on-chain lock-script-only proof variant.

  • proof upgrader: \LockScript\ hit \ odo!()\ in \UpgradeJob::from_primitive_witness, which could panic when broadcasting a primitive-witness-backed tx. Behavior now mirrors \PrimitiveWitness: mock networks upgrade toward single-proof; otherwise a clear panic message tells the user to use \proofcollection\ or \singleproof.

  • **\SynchronizationBitMask::canonize**: replaced the one-bit-at-a-time loop with batched trailing-ones steps so long runs of set bits do not scan linearly (this was marked as very slow in a TODO).

testing

Rust toolchain was not available in this environment; please run \cargo test -p neptune-cash\ before merge.

made by mooncitydev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant