Skip to content

darwin v0.3.11+ds.3

Choose a tag to compare

@github-actions github-actions released this 28 Oct 02:07
· 44 commits to main since this release

The darwin client v0.3.11+ds.3 for Linux x86_64 (Ubuntu 24.04 or newer).

Built from 779769c by the Build workflow (run 40617488680), and published once that run and the commit's Test run had passed.
Check the archive with: sha256sum -c SHA256SUMS.txt

The archive holds darwin, LICENSE-MIT and LICENSE-APACHE, plus THIRD-PARTY-NOTICES.txt and RUST-STD-COPYRIGHT.html with the licences and copyright notices of the third-party code in the binary and of the tools used to build it.

What changes

This release changes how payments are read, not how they are made. Every reader of payments in this client reads two vaults: the per-quote payment vault, as before, and the root vault, which records each wave of payments under one key. Nothing in this client pays the root vault. Prices and quotes don't change: uploads are still planned and paid at the full amount, through the per-quote vault, and the settlement version stays 1.

This release was tested against darwin-node 0.23.0+ds.17 (0deb787, the revision its tests pin). It reads the chain only, and asks nothing new of nodes.

Both vaults are read

  • The vault set. On the bundled network, readers take payments from the per-quote vault and from the root vault, DarwinRootVault, at 0xf6675722f443132b045857546E57e35360Bb03b9 on Robinhood Chain (root_vault_address in ant-core/resources/payment_network.toml). The per-quote vault stays the network's identity. A reader on any other network reads the per-quote vault alone, as before.
  • Who reads them. The listings producer, darwin file verify, listing lookups and envelope payment records all accept a payment from either vault. Each payment is checked by the vault whose log it is. A payment log from a contract outside the set is never a payment.
  • Root waves are checked by their tree. A root vault's payment counts only where its transaction's receipt shows the whole wave: its payments, in quote-hash order; the vault's RootPaid log naming the key the wave's tree gives and the wave's total; and one token transfer from the payer to each of the wave's payees, of the sum of its payments. A receipt that doesn't show the wave whole reads as unpaid.
  • A quote paid again. A root vault can record a quote again in a later wave, so a reader with one searches again when none of a quote's kept payments is the one a listing shows, and keeps what it finds beside them. A reader of the per-quote vault alone doesn't search again, as before.

One log query per vault, in one batch

  • One address per query. Each vault is asked in its own eth_getLogs, naming its one address, and both queries are sent in one batch and merged in chain order (block, then log index). Robinhood Chain's RPC allows 10,000,000 blocks per log query when each filter position holds one value, but only 100,000 when any position holds a list, so one query naming both addresses would fail a quote's search on its first query.
  • The log-query budget. A search for a quote's payment makes at most 64 rounds of log queries. A round is one query for a reader of the per-quote vault alone, and two, one per vault, with the root vault: at most 128 queries. A quote paid nowhere costs a round or two each time it is decided again (two to four queries with the root vault), not a new search.
  • Kept searches. How far a search that found nothing went through final blocks is kept, so a later search goes on from there. With the root vault, it is kept per listing log index, so a later search never skips a payment at that index; a reader of the per-quote vault alone keeps a search only when it saw no payment at all, and shares it across indexes, as before.

Kept receipts are read again once after upgrading

  • Kept receipts now hold each log's address and data, with the root vault's token's transfers, and are keyed by the vaults read.
  • The first start after upgrading of a reader with the root vault (every reader on the bundled network) drops the receipts and quote payments kept for the per-quote vault alone, since they lack the root vault's logs. Each is read again once, with both vaults' logs, as listings need it: a one-time burst of chain reads, paced like any other, after which they are kept again. Blocks already kept stay.

Also in this release

  • The vendored darwin-listings is darwin-listings 0.4.0 (vendor/ant-listings; the commit it was vendored at is in its VENDORED.md). It reads a set of vaults and a root vault's waves, checked against the root vault's own test vectors. The listing format, the upload proof format and the listings protocol's messages are unchanged.
  • A census test (every_payment_reader_reads_the_vault_set) lists every reader of payments, so a new one is reviewed before it ships.
  • Other readers. Readers that aren't updated (older darwin-listings, older CLIs, other indexers) read a payment through the root vault as unpaid: a listing or upload proof paid that way fails their check until they update.

Library users: ant-protocol from the same tag

As in v0.3.11+ds.2, a project that uses ant-core takes both lines below, with the same tag:

[dependencies]
ant-core = { git = "https://github.com/Project-DSpace/darwin-client", tag = "v0.3.11+ds.3" }

[patch.crates-io]
ant-protocol = { git = "https://github.com/Project-DSpace/darwin-client", tag = "v0.3.11+ds.3" }

ListingChain::new reads the bundled network's root vault on its own, and ListingChain::with_root_vault adds one elsewhere. The functions of ant_core::ant_listings that took one vault's address (find_payment, verify_listing, verify_listing_receipts, check_offline, check_proof) take a &VaultSet: VaultSet::v2_only(vault) reads as before, and VaultSet::with_root also reads a root vault. With the devnet feature, also repeat the webrtc patch from darwin-node at the rev in the tag's Cargo.toml.

Releases

  • This release is published only after the tagged commit's Test run (the end-to-end and browser tests, against darwin-node at its pinned revision) and its Build run on main both passed.
  • Going back. A revert is a re-pin to v0.3.11+ds.2, under the same pause used to move to this release: a service that takes ant-core by tag pauses, sets both lines' tags back, and resumes. v0.3.11+ds.2 reads the per-quote vault alone, so it reads a payment through the root vault as unpaid.
  • Nothing to finish first. This release changes no upload checkpoint, payment or price, so uploads interrupted under it resume under v0.3.11+ds.2 as they would under this release.