Skip to content

v0.4.3

Choose a tag to compare

@manishmeganathan manishmeganathan released this 20 Oct 20:44
· 234 commits to main since this release

Job orders on the Quip Network. SolverQuip.create_order places an order you can follow, read back through its receipt, and reclaim. Orders take payout rules, access rules and quality floors. Coefficients are now rounded to milli precision instead of refused, and the Quip modules move into the xqsa.quip package; the old names still work until v0.5.0.

Highlights

  • SolverQuip.create_order(model) returns a JobOrder. list_orders() and get_receipt(id) read orders back, JobOrder.best() and JobOrder.solutions() decode the answers, and a receipt can reclaim its order.
  • Payout rules: ResolutionSingleBest, ResolutionTopNEqual(n) and ResolutionTopNWeighted(n). Top-N orders settle on the receipt.
  • Access rules: AccessOpen() and AccessAllow(accounts=…, types=…) restrict which solvers may answer.
  • Quality floors: max_energy, min_solutions and min_diversity.
  • Orders, quotes and receipts print as readable boxes.

Behaviour changes

  • Coefficients are rounded to milli precision (ties to even) instead of off-grid models being refused. A warning is issued once, and metadata["quantization_error"] records the error.
  • A model that is all zeros, or contains NaN, raises EncodingError.
  • solve() returns the solver the chain ranks first and pays, not the lowest stored energy.
  • Order options are checked before signing and raise QuipOrderOptionError: a reward below MinReward, deadline_blocks outside the allowed range, block_wait above the maximum, or a bad resolution or access value.
  • solve(resolution=…) now takes effect; it used to be ignored.
  • A node rejecting a transaction raises QuipSigningError instead of a connection error, and a failed extrinsic names the pallet error.

Deprecations

Each of these warns with DeprecationWarning and is removed in v0.5.0.

  • The flat Quip names on xqsa and xquad.sa, and the module paths xqsa.quip_codec, xqsa.quip_signing, xqsa.quip_metadata, xqsa.quip_faucet and xqsa.quip_networks: import them from xqsa.quip (or xquad.sa.quip).
  • SolverQuip.status(id): use get_receipt(id).status().
  • SolverQuip.query(id, model): use get_receipt(id) and JobOrder.best().
  • SolverQuip.quote(model): use create_order(model).quote().
  • mode=: use access=. Passing both raises TypeError.
  • Raw chain dicts and unknown keywords on solve() and quote().

Packages

Registry Packages
crates.io xqvm · xqasm · xqcli
PyPI xquad · xqsa · xqcp · xqffi · xqvm_py
pip install xquad==0.4.3
cargo install xqcli --version 0.4.3   # installs the xquad command

Documentation: developers.quip.network/docs/xquad

Full changelog (54 changes)

Added

  • xqsa: List the deprecated flat Quip names in dir()
  • xquad: Expose xqsa.quip as xquad.sa.quip
  • xqsa: Export the access option classes
  • xqsa: Name the allowlist when no solver answers
  • xqsa: Warn on allowlisted accounts that are not solvers
  • xqsa: Read an order's access rule back
  • xqsa: Take access= on orders and client defaults
  • xqsa: Add the access option classes
  • xqsa: Read an order's payout rule back
  • xqsa: Export the payout rules
  • xqsa: Settle top-N orders on the receipt
  • xqsa: Take payout rules on SolverQuip orders
  • xqsa: Payout rules for Quip orders
  • xqsa: Name the quality floors when an order goes unanswered
  • xqsa: Show quality floors on orders and receipts
  • xqsa: Minimum solutions and diversity for job orders
  • xqsa: Energy ceiling for job orders
  • xqsa: Keep the binary-to-spin offset on IsingJob
  • xqsa: Add JobOrder.best and JobOrder.solutions
  • xqsa: Report the ranked energy in solvers()
  • xqsa: Decode every stored answer into a Solution
  • xqsa: Display a JobOrderReceipt
  • xqsa: Add SolverQuip.list_orders
  • xqsa: Reclaim an order through its receipt
  • xqsa: Add JobOrderReceipt and SolverQuip.get_receipt
  • xqsa: Chain readers for order receipts
  • xqsa: Unconfirmed and failed JobOrder states
  • xqsa: Add JobOrder and SolverQuip.create_order
  • xqsa: Box display and placement fields for JobQuote
  • xqsa: Validate SolverQuip order options before signing
  • xqsa: Read Quip chain limits and genesis hash once per client

Changed

  • xqsa: Move the Quip modules into an xqsa.quip package

Deprecated

  • xqsa: Reach Quip objects through xqsa.quip and xquad.sa.quip
  • xqsa: Route order status and query through the receipt

Documentation

  • xqsa: Rebuild the first Quip job around create_order
  • xqsa: Cover job orders in the README and the live test guide
  • xquad: State the model refusals both backends share
  • spec: Update the network mempool family for v0.4.3
  • xqsa: Explain the max_energy ceiling in model units
  • xqsa: Document SolverQuip job orders, receipts and order options
  • xqsa: Bring the Quip Network page up to v0.4.3
  • xqsa: Export JobOrder and document the order lifecycle
  • xqsa: Point Quip references at the xqsa.quip package

Fixed

  • xqsa: Import the quip subpackage from xqsa
  • xqsa: Name a dispatch error decoded as a positional list
  • xqsa: Decode raw JobMode dicts and refuse non-rule access values
  • xqsa: Name the chain error when a call fails on chain
  • xqsa: Refuse invalid payout rules before signing
  • xqsa: Keep the reclaim retry hint for faults
  • xqsa: Solve returns the solver the chain pays
  • xqsa: Classify node rejections and keep the block on event faults
  • xqsa: Reject SolverQuip models that round to all zeros
  • xqsa: Round SolverQuip coefficients to milli precision

Performance

  • xqsa: Stop repeating allowlist and order reads

Full diff: v0.4.2...v0.4.3