Skip to content

v0.22.0

Choose a tag to compare

@BRBussy BRBussy released this 17 Sep 11:31
· 58 commits to main since this release
50d1920

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).
  • MpcOutputCacheReader fetches a request's attested output bytes from the MPC's public output cache, an alternative to an EVM RPC with full debug_traceTransaction (#103).

New features

  • MpcOutputCacheReader and getMpcOutputCacheUrl, with the stagenet cache as the published default. Cached bytes are untrusted until the attestation signature verifies over them (#103).
  • SignetEventSource.streamSignetEvents(contractAddress): an AsyncIterable that yields each page of 100 before requesting the next, pins the walk to the first page's maxId, and issues no further requests once the consumer leaves the loop (#107).
  • signetEventSourceFromIndexer({ queryUrl }) yields IndexedSignetMiscEvent: the event plus id, maxId, transactionId, transactionHash, blockHeight, blockHash and blockTimestamp (#110).
  • Decoded events: decodeSignetEvent, tryDecodeSignetEvent (non-throwing, for live streams) and decodeSignetEventNamed, returning a DecodedSignetEvent union discriminated on name that keeps its source event (#110).
  • Verification over events already in hand, with no history walk per request id: reader.verifySignatureRespondedEvents and findVerifiedRespondBidirectionalEvent (#110).

Bug fixes

  • The attestation preimage is [requestId, width, output]. transientHash packs trailing zero bytes away, so without the width a failure attestation could be replayed as a success at another width (#96).

Refactoring

  • SignetRequestResponseReader is built on decodeSignetEventNamed: 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, signetEventSourceFromPublicDataProvider and SignetContractEventQuerySource. Construct the source with signetEventSourceFromIndexer({ queryUrl }) and collect with for await (#107, #110).
  • SignBidirectionalNotification.version is the literal 1, no longer number (#110).
  • The stagenet MPC root public key is the signet.js TESTNET key, replacing TESTNET_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