feat(leios): Made changes to wire leios endorser block decoding
Signed-off-by: Akhil Repala <[email protected]>
Signed-off-by: Akhil Repala <[email protected]>
Signed-off-by: cryptodj413 <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: Chris Gianelloni <[email protected]>
Signed-off-by: cryptodj413 <[email protected]>
Add diagnostic-only logging (no behaviour change) to pinpoint the `InvalidWitnessesUTXOW` rejection seen when submitting legacy-DRep ballot votes. Conway `voting_procedures` bodies are re-encoded by some wallets, so a vkey witness ends up signed over a different body hash than the one reaching the node. Three [ballot-witness-diag] log points: - txScriptRecovery: new diagnoseTxWitnesses() verifies every vkey witness against the exact body being submitted, logging any stale witness (with pubkey/keyhash) right before submitTx. Covers both signing paths. - txSignUtils.mergeSignerWitnesses: logs wallet body re-canonicalisation, distinguishing first-signer (body adopted) from co-signer (swap skipped, witness may be stale). - api/v1/signTransaction: logs when merge/rebuild changes the body hash the collected signatures were made over. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
The mocks used jest.mock(..., { virtual: true }) on real modules. Virtual
mocks register by literal specifier, so they applied when the handler imported
e.g. @/utils/nativeScriptUtils directly but not reliably when the real
resolveWalletScriptAddress imported it — under suite pollution the real decode
ran instead of the mock, so the "canonical fallback cannot decode" test saw
"unknown error" instead of "invalid canonical cbor". Removing virtual:true makes
jest resolve by file path, applying each mock to every importer. Verified: the
full CJS suite passes across repeated --runInBand runs.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
When freeUtxos.bot.test.ts runs in the full suite, three cases that
exercise the canonical-scriptCbor fallback in resolveWalletScriptAddress
fail intermittently — decodeNativeScriptFromCbor is never observed as
called and the error path produces "unknown error" instead of the
mocked message. In isolation the same tests pass.
Root cause: nativeScriptUtils.test.ts imports the real
@/utils/nativeScriptUtils (no mock), caching the module in Jest's
registry. By the time this suite declares its jest.mock(..., {virtual:
true}) replacement, the bindings inside the transitively imported
@/lib/server/walletScriptAddress are already wired to the real
implementation, so the mocks never fire.
jest.resetModules() in beforeAll forces the dynamic handler import to
walk a fresh module graph that honours this suite's mocks. Verified
with `npx jest` (full suite): 357 pass / 0 fail / 2 skipped.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Content was already integrated via #269 (staging/preprod-prisma7-mesh2, which merged origin/main into preprod and resolved all conflicts). That PR was squash-merged, so main was not in preprod's ancestry and the preprod->main PR re-conflicted. This records main as a parent without changing preprod's tree, making the preprod->main merge clean.
cardano-node: remove iohk-monitoring tracing backend
Signed-off-by: Jonathan Lim <[email protected]>
Signed-off-by: Jonathan Lim <[email protected]>
sim-rs: fix build by migrating to spec-faithful Praos lottery API
Signed-off-by: cryptodj413 <[email protected]>