Repository navigation
v0.22.0
Highlights
- Attestation digests bind the output width, closing a replay where one MPC signature verified the same bytes at two widths (#96).
- Signet events are streamed, decoded and located: one direct indexer route yields typed events carrying their transaction hash, block height and block time (#107, #110).
MpcOutputCacheReaderfetches a request's attested output bytes from the MPC's public output cache, an alternative to an EVM RPC with fulldebug_traceTransaction(#103).
New features
MpcOutputCacheReaderandgetMpcOutputCacheUrl, with the stagenet cache as the published default. Cached bytes are untrusted until the attestation signature verifies over them (#103).SignetEventSource.streamSignetEvents(contractAddress): anAsyncIterablethat yields each page of 100 before requesting the next, pins the walk to the first page'smaxId, and issues no further requests once the consumer leaves the loop (#107).signetEventSourceFromIndexer({ queryUrl })yieldsIndexedSignetMiscEvent: the event plusid,maxId,transactionId,transactionHash,blockHeight,blockHashandblockTimestamp(#110).- Decoded events:
decodeSignetEvent,tryDecodeSignetEvent(non-throwing, for live streams) anddecodeSignetEventNamed, returning aDecodedSignetEventunion discriminated onnamethat keeps itssourceevent (#110). - Verification over events already in hand, with no history walk per request id:
reader.verifySignatureRespondedEventsandfindVerifiedRespondBidirectionalEvent(#110).
Bug fixes
- The attestation preimage is
[requestId, width, output].transientHashpacks trailing zero bytes away, so without the width a failure attestation could be replayed as a success at another width (#96).
Refactoring
SignetRequestResponseReaderis built ondecodeSignetEventNamed: it filters and decodes as events arrive, and an undecodable event of another kind cannot fail a read that never asked for it (#107, #110).- ABI word tests are typed case tables pinning both the compiled circuits and their TS twins to golden big-endian bytes, including the 2^64 boundaries (#106).
Breaking changes
- Attestation digest: signatures over the 0.21.0 preimage no longer verify. Recompile verifying contracts and upgrade the responder together (the matched fakenet release is
0.25.0) (#96). - Removed
SignetEventSource.querySignetEvents,signetEventSourceFromPublicDataProviderandSignetContractEventQuerySource. Construct the source withsignetEventSourceFromIndexer({ queryUrl })and collect withfor await(#107, #110). SignBidirectionalNotification.versionis the literal1, no longernumber(#110).- The stagenet MPC root public key is the signet.js
TESTNETkey, replacingTESTNET_DEV(#103). - Default indexer URLs for every network use
/api/v4/graphql(#104).
Closes
- #63: compiled ABI word circuits with golden vectors to test the TS twins against (#106).
- #105: stream signet contract events with an async generator (#107).
- #109: decoded signet event union and a name-dispatching decoder (#110).
- #111: indexer event source yielding transaction hash, block height and block time (#110).
- Also closed during this cycle, outside any pull request: #40 (README section on recovering foreign transaction output), #49, #67, #80, #81, #82.
Full Changelog: v0.21.0...v0.22.0